aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@src.gnome.org>2004-10-20 00:20:07 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2004-10-20 00:20:07 +0800
commit87abd6ffee84ee9dfa54e1966d23168e6629a3f8 (patch)
treee73ac7fc9c63db70ba73f5fff7fa9e6d60edf681 /calendar/gui
parentda657db10113fc2fbb1b0b17f8482899f2abf772 (diff)
downloadgsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.tar
gsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.tar.gz
gsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.tar.bz2
gsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.tar.lz
gsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.tar.xz
gsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.tar.zst
gsoc2013-evolution-87abd6ffee84ee9dfa54e1966d23168e6629a3f8.zip
Use e_cal_component_has_attendees to test if it is a meeting. By default,
* 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. svn path=/trunk/; revision=27628
Diffstat (limited to 'calendar/gui')
-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
3 files changed, 21 insertions, 19 deletions
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