diff options
author | JP Rosevear <jpr@ximian.com> | 2001-08-09 06:16:08 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-08-09 06:16:08 +0800 |
commit | ec730bb5f70e7600085befbd3bf9cc334187973e (patch) | |
tree | d216848c8661ba84e221ead9f0ef59711c275465 /calendar/gui/dialogs/event-editor.c | |
parent | e239e423ddddf3a5e0613f03aef8e8381e6f753c (diff) | |
download | gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.tar gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.tar.gz gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.tar.bz2 gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.tar.lz gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.tar.xz gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.tar.zst gsoc2013-evolution-ec730bb5f70e7600085befbd3bf9cc334187973e.zip |
set the attendees of a component (meeting_page_fill_component): use above
2001-08-08 JP Rosevear <jpr@ximian.com>
* gui/dialogs/meeting-page.c (set_attendees): set the attendees of
a component
(meeting_page_fill_component): use above
(meeting_page_get_cancel_comp): return a comp with the attendees
to be cancelled
* gui/dialogs/meeting-page.h: get a component that will be sent as
a cancellation
* gui/dialogs/event-editor.c (event_editor_class_init): override
send_comp class method
(event_editor_send_comp): send cancellation notices to deleted
attendees
(refresh_meeting_cmd): save before send
(forward_cmd): ditto
* gui/dialogs/comp-editor.c (comp_editor_class_init): set default
send_comp method
(real_send_comp): do the real work
(comp_editor_send_comp): call class method
(save_comp): don't do any sending
(save_comp_with_send): save and send here
(prompt_to_save_changes): use above
(save_close_cmd): ditto
* gui/dialogs/comp-editor.h: add virtual function
svn path=/trunk/; revision=11803
Diffstat (limited to 'calendar/gui/dialogs/event-editor.c')
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 59c587b18b..a58d1d4b82 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -52,6 +52,7 @@ struct _EventEditorPrivate { static void event_editor_class_init (EventEditorClass *class); static void event_editor_init (EventEditor *ee); static void event_editor_edit_comp (CompEditor *editor, CalComponent *comp); +static void event_editor_send_comp (CompEditor *editor, CalComponentItipMethod method); static void event_editor_destroy (GtkObject *object); static void schedule_meeting_cmd (GtkWidget *widget, gpointer data); @@ -117,6 +118,7 @@ event_editor_class_init (EventEditorClass *klass) parent_class = gtk_type_class (TYPE_COMP_EDITOR); editor_class->edit_comp = event_editor_edit_comp; + editor_class->send_comp = event_editor_send_comp; object_class->destroy = event_editor_destroy; } @@ -198,6 +200,29 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp) parent_class->edit_comp (editor, comp); } +static void +event_editor_send_comp (CompEditor *editor, CalComponentItipMethod method) +{ + EventEditor *ee = EVENT_EDITOR (editor); + EventEditorPrivate *priv; + CalComponent *comp = NULL; + + priv = ee->priv; + + /* Don't cancel more than once */ + if (method == CAL_COMPONENT_METHOD_CANCEL) + return; + + comp = meeting_page_get_cancel_comp (priv->meet_page); + if (comp != NULL) { + itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp); + gtk_object_unref (GTK_OBJECT (comp)); + } + + if (parent_class->send_comp) + parent_class->send_comp (editor, method); +} + /* Destroy handler for the event editor */ static void event_editor_destroy (GtkObject *object) @@ -258,7 +283,8 @@ static void refresh_meeting_cmd (GtkWidget *widget, gpointer data) { EventEditor *ee = EVENT_EDITOR (data); - + + comp_editor_save_comp (COMP_EDITOR (ee)); comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_REFRESH); } @@ -280,6 +306,7 @@ forward_cmd (GtkWidget *widget, gpointer data) { EventEditor *ee = EVENT_EDITOR (data); + comp_editor_save_comp (COMP_EDITOR (ee)); comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_PUBLISH); } |