aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/gui/comp-editor-factory.c5
-rw-r--r--calendar/gui/dialogs/event-editor.c30
-rw-r--r--calendar/gui/e-day-view.c5
4 files changed, 32 insertions, 19 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index eef8c9ac11..b80f414fa0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,14 @@
+2004-10-19 Harish Krishnaswamy <kharish@novell.com>
+
+ * gui/comp-editor-factory.c: (edit_existing):
+ Use e_cal_component_has_attendees to test if it is a meeting.
+ * gui/dialogs/event-editor.c: (event_editor_init):
+ By default, the event is not a meeting.
+ (event_editor_construct): Do not add the invitation, scheduling pages
+ to the editor if it is not a meeting.
+ * gui/e-day-view.c: (e_day_view_on_event_double_click):
+ check the icalproperty to test if the event is a meeting.
+
2004-10-19 JP Rosevear <jpr@novell.com>
* gui/gnome-cal.c (connect_list_view_focus): listen to the canvas
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index da7bba1a93..ea809b35e5 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -245,8 +245,6 @@ edit_existing (OpenClient *oc, const char *uid)
icalcomponent *icalcomp;
CompEditor *editor;
ECalComponentVType vtype;
- /* Presence of attendees indicates that component is a meeting */
- GSList *attendees = NULL;
g_assert (oc->open);
@@ -271,8 +269,7 @@ edit_existing (OpenClient *oc, const char *uid)
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
- e_cal_component_get_attendee_list (comp, &attendees);
- editor = COMP_EDITOR (event_editor_new (oc->client, attendees ? TRUE: FALSE));
+ editor = COMP_EDITOR (event_editor_new (oc->client, e_cal_component_has_attendees (comp)));
break;
case E_CAL_COMPONENT_TODO:
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index d520fd809b..886a4ddea8 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -120,6 +120,7 @@ event_editor_init (EventEditor *ee)
priv->model = E_MEETING_STORE (e_meeting_store_new ());
priv->meeting_shown = TRUE;
priv->updating = FALSE;
+ priv->is_meeting = FALSE;
}
EventEditor *
@@ -145,20 +146,21 @@ event_editor_construct (EventEditor *ee, ECal *client)
COMP_EDITOR_PAGE (priv->recur_page),
_("Recurrence"));
- priv->sched_page = schedule_page_new (priv->model);
- g_object_ref (priv->sched_page);
- gtk_object_sink (GTK_OBJECT (priv->sched_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
-
- priv->meet_page = meeting_page_new (priv->model, client);
- g_object_ref (priv->meet_page);
- gtk_object_sink (GTK_OBJECT (priv->meet_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Invitations"));
-
+ if (priv->is_meeting) {
+ priv->sched_page = schedule_page_new (priv->model);
+ g_object_ref (priv->sched_page);
+ gtk_object_sink (GTK_OBJECT (priv->sched_page));
+ comp_editor_append_page (COMP_EDITOR (ee),
+ COMP_EDITOR_PAGE (priv->sched_page),
+ _("Scheduling"));
+
+ priv->meet_page = meeting_page_new (priv->model, client);
+ g_object_ref (priv->meet_page);
+ gtk_object_sink (GTK_OBJECT (priv->meet_page));
+ comp_editor_append_page (COMP_EDITOR (ee),
+ COMP_EDITOR_PAGE (priv->meet_page),
+ _("Invitations"));
+ }
comp_editor_set_e_cal (COMP_EDITOR (ee), client);
init_widgets (ee);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index bd43acdabd..98d591706b 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -3246,6 +3246,7 @@ e_day_view_on_event_double_click (EDayView *day_view,
gint event_num)
{
EDayViewEvent *event;
+ icalproperty *attendee_prop = NULL;
if (day == -1)
event = &g_array_index (day_view->long_events, EDayViewEvent,
@@ -3256,9 +3257,11 @@ e_day_view_on_event_double_click (EDayView *day_view,
e_day_view_stop_editing_event (day_view);
+
+ attendee_prop = icalcomponent_get_first_property (event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY);
e_calendar_view_edit_appointment (E_CALENDAR_VIEW (day_view),
event->comp_data->client,
- event->comp_data->icalcomp, FALSE);
+ event->comp_data->icalcomp, attendee_prop ? TRUE:FALSE);
}
static void