aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
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
parentb58607ea6a24dc9f69115520950215bb01a2a220 (diff)
downloadgsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar
gsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar.gz
gsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar.bz2
gsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar.lz
gsoc2013-evolution-faea9f4360005a0869a62e4da5d459a6067ca9c5.tar.xz
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')
-rw-r--r--calendar/gui/dialogs/comp-editor.c2
-rw-r--r--calendar/gui/dialogs/save-comp.c18
-rw-r--r--calendar/gui/dialogs/save-comp.h3
3 files changed, 17 insertions, 6 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 2ce4647c19..8d26689eca 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -330,7 +330,7 @@ prompt_to_save_changes (CompEditor *editor, gboolean send)
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only)
return TRUE;
- switch (save_component_dialog (GTK_WINDOW (editor))) {
+ switch (save_component_dialog (GTK_WINDOW(editor), priv->comp)) {
case GTK_RESPONSE_YES: /* Save */
if (e_cal_component_is_instance (priv->comp))
if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
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;
+ }
}
diff --git a/calendar/gui/dialogs/save-comp.h b/calendar/gui/dialogs/save-comp.h
index a9aedd2bce..79abe30453 100644
--- a/calendar/gui/dialogs/save-comp.h
+++ b/calendar/gui/dialogs/save-comp.h
@@ -23,7 +23,8 @@
#define SAVE_COMP_H
#include <gtk/gtkdialog.h>
+#include <libecal/e-cal-component.h>
-GtkResponseType save_component_dialog (GtkWindow *parent);
+GtkResponseType save_component_dialog (GtkWindow *parent, ECalComponent *comp);
#endif