aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-08-23 01:57:48 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-08-23 01:57:48 +0800
commit34208006ae99718571b35055cec8d8e2718df1dc (patch)
tree4cb3cf99ee063a1699d9deb71d5b8747e841ab98 /calendar/gui
parentdc1062fa9fcd86a2c3aafbf0bd3b296b4aededa7 (diff)
downloadgsoc2013-evolution-34208006ae99718571b35055cec8d8e2718df1dc.tar.gz
gsoc2013-evolution-34208006ae99718571b35055cec8d8e2718df1dc.tar.zst
gsoc2013-evolution-34208006ae99718571b35055cec8d8e2718df1dc.zip
if its a non-participant, add it as a resource to match dialog label
2002-08-22 JP Rosevear <jpr@ximian.com> * gui/e-meeting-model.c (process_section): if its a non-participant, add it as a resource to match dialog label (set_value_at): if the type is set to be a resource, switch the role to non-participant by default svn path=/trunk/; revision=17840
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-meeting-model.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
index a59533853c..f85fb04e01 100644
--- a/calendar/gui/e-meeting-model.c
+++ b/calendar/gui/e-meeting-model.c
@@ -84,7 +84,7 @@ struct _EMeetingModelPrivate
static char *sections[] = {N_("Chair Persons"),
N_("Required Participants"),
N_("Optional Participants"),
- N_("Non-Participants"),
+ N_("Resources"),
NULL};
static icalparameter_role roles[] = {ICAL_ROLE_CHAIR,
ICAL_ROLE_REQPARTICIPANT,
@@ -455,7 +455,8 @@ set_value_at (ETableModel *etm, int col, int row, const void *val)
EMeetingModel *im;
EMeetingModelPrivate *priv;
EMeetingAttendee *ia;
-
+ icalparameter_cutype type;
+
im = E_MEETING_MODEL (etm);
priv = im->priv;
@@ -471,7 +472,12 @@ set_value_at (ETableModel *etm, int col, int row, const void *val)
e_meeting_attendee_set_member (ia, g_strdup (val));
break;
case E_MEETING_MODEL_TYPE_COL:
+ type = text_to_type (val);
e_meeting_attendee_set_cutype (ia, text_to_type (val));
+ if (type == ICAL_CUTYPE_RESOURCE) {
+ e_meeting_attendee_set_role (ia, ICAL_ROLE_NONPARTICIPANT);
+ e_table_model_cell_changed (etm, E_MEETING_MODEL_ROLE_COL, row);
+ }
break;
case E_MEETING_MODEL_ROLE_COL:
e_meeting_attendee_set_role (ia, text_to_role (val));
@@ -1775,6 +1781,8 @@ process_section (EMeetingModel *im, EDestination **destv, icalparameter_role rol
e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", address));
e_meeting_attendee_set_role (ia, role);
+ if (role == ICAL_ROLE_NONPARTICIPANT)
+ e_meeting_attendee_set_cutype (ia, ICAL_CUTYPE_RESOURCE);
e_meeting_attendee_set_cn (ia, g_strdup (name));
}
}