aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/save-comp.c
diff options
context:
space:
mode:
authorParthasarathi S A <sparthasarathi@novell.com>2004-08-06 18:05:23 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-08-06 18:05:23 +0800
commitfaea9f4360005a0869a62e4da5d459a6067ca9c5 (patch)
tree0e186a5afbcb2dba1a0c70370328897a1a636cc4 /calendar/gui/dialogs/save-comp.c
parentb58607ea6a24dc9f69115520950215bb01a2a220 (diff)
downloadgsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar.gz
gsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar.zst
gsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.zip
Fix for bug #61673. The function takes two arguments now, instead of one.
2004-08-05 Parthasarathi S A <sparthasarathi@novell.com> Fix for bug #61673. * calendar/gui/dialogs/save_comp.c(save_component_dialog): The function takes two arguments now, instead of one. The second argument is the pointer to the ECalComponent from which the component type can be determined. Based on the component type the corresponding error message is displayed. * calendar/gui/dialogs/save_comp.h: Function definition updated for save_component_dialog. * calendar/gui/dialogs/comp_editor.c(prompt_to_save_changes): passing the ECalComponent pointer to the 'save_component_dialog' function * calendar/calendar-errors.xml: New error message string for task included * calendar/calendar-errors.xml.h svn path=/trunk/; revision=26839
Diffstat (limited to 'calendar/gui/dialogs/save-comp.c')
-rw-r--r--calendar/gui/dialogs/save-comp.c18
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;
+ }
}