aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-meeting-model.c12
2 files changed, 17 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 7471edd26d..ce949deca9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
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
+
+2002-08-22 JP Rosevear <jpr@ximian.com>
+
* gui/calendar-model.c (set_completed): if the value given is a
date, convert to a time in the current zone
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));
}
}