diff options
Diffstat (limited to 'calendar/gui/dialogs/save-comp.c')
-rw-r--r-- | calendar/gui/dialogs/save-comp.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c index 47a4b7221c..fa5eae8659 100644 --- a/calendar/gui/dialogs/save-comp.c +++ b/calendar/gui/dialogs/save-comp.c @@ -25,12 +25,13 @@ #include "widgets/misc/e-error.h" #include "save-comp.h" - +#include "comp-editor.h" /** * save_component_dialog: * @parent: Window to use as the transient dialog's parent. - * + * @comp: Pointer to the EcalComponent + * * Pops up a dialog box asking the user whether he wants to save changes for * a calendar component. * @@ -38,7 +39,16 @@ **/ GtkResponseType -save_component_dialog (GtkWindow *parent) +save_component_dialog (GtkWindow *parent, ECalComponent *comp) { - return e_error_run (parent, "calendar:prompt-save-appointment", NULL); + ECalComponentVType vtype = e_cal_component_get_vtype(comp); + + switch(vtype) { + case E_CAL_COMPONENT_EVENT: + return e_error_run (parent, "calendar:prompt-save-appointment", NULL); + case E_CAL_COMPONENT_TODO: + return e_error_run (parent, "calendar:prompt-save-task", NULL); + default: + return GTK_RESPONSE_NO; + } } |