diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 20 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 6 |
3 files changed, 22 insertions, 10 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 9e07e7a2cf..b3b934996c 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -583,12 +583,14 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page) priv = editor->priv; page_widget = comp_editor_page_get_widget (page); - + page_num = gtk_notebook_page_num (priv->notebook, page_widget); + if (page_num == -1) + return; + /* Disconnect all the signals added in append_page(). */ gtk_signal_disconnect_by_data (GTK_OBJECT (page), editor); gtk_signal_disconnect_by_data (GTK_OBJECT (page_widget), page); - page_num = gtk_notebook_page_num (priv->notebook, page_widget); gtk_notebook_remove_page (priv->notebook, page_num); priv->pages = g_list_remove (priv->pages, page); diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index b592606dec..7fa48546cc 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -244,24 +244,34 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp) priv->updating = TRUE; priv->existing_org = cal_component_has_organizer (comp); - cal_component_get_attendee_list (comp, &attendees); + + e_meeting_model_remove_all_attendees (priv->model); if (attendees == NULL) { comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page)); comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->sched_page)); - e_meeting_model_remove_all_attendees (priv->model); priv->meeting_shown = FALSE; } else { GSList *l; + if (!priv->meeting_shown) { + comp_editor_append_page (COMP_EDITOR (ee), + COMP_EDITOR_PAGE (priv->sched_page), + _("Scheduling")); + comp_editor_append_page (COMP_EDITOR (ee), + COMP_EDITOR_PAGE (priv->meet_page), + _("Meeting")); + } + for (l = attendees; l != NULL; l = l->next) { CalComponentAttendee *ca = l->data; - EMeetingAttendee *ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca)); - + EMeetingAttendee *ia; + + ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca)); e_meeting_model_add_attendee (priv->model, ia); gtk_object_unref (GTK_OBJECT (ia)); } - priv->meeting_shown = TRUE; + priv->meeting_shown = TRUE; } cal_component_free_attendee_list (attendees); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 9956137c4c..e59582873f 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -212,11 +212,11 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp) priv->updating = TRUE; priv->existing_org = cal_component_has_organizer (comp); - cal_component_get_attendee_list (comp, &attendees); + + e_meeting_model_remove_all_attendees (priv->model); if (attendees == NULL) { - if (priv->meeting_shown) - comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page)); + comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page)); priv->meeting_shown = FALSE; } else { GSList *l; |