diff options
author | JP Rosevear <jpr@ximian.com> | 2001-11-07 23:43:32 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-11-07 23:43:32 +0800 |
commit | f7c509da222e019b85e30621d4ee455335195379 (patch) | |
tree | d4535a3967e23db6961078c805617bab22660bd0 /calendar/gui/dialogs/event-editor.c | |
parent | 68459c289cc021f255ad780b9221bcde1d3952e9 (diff) | |
download | gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.tar gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.tar.gz gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.tar.bz2 gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.tar.lz gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.tar.xz gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.tar.zst gsoc2013-evolution-f7c509da222e019b85e30621d4ee455335195379.zip |
make sure to remove all attendees from the model when we edit a new comp,
2001-11-06 JP Rosevear <jpr@ximian.com>
* gui/dialogs/event-editor.c (event_editor_edit_comp): make sure
to remove all attendees from the model when we edit a new comp,
append the pages if they are needed and we weren't showing them
before
* gui/dialogs/task-editor.c (task_editor_edit_comp): same as above
* gui/dialogs/comp-editor.c (comp_editor_remove_page): check for a
return value indicating the page was not found and return if so
svn path=/trunk/; revision=14615
Diffstat (limited to 'calendar/gui/dialogs/event-editor.c')
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 20 |
1 files changed, 15 insertions, 5 deletions
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); |