aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--calendar/ChangeLog15
-rw-r--r--calendar/calendar-errors.xml9
-rw-r--r--calendar/calendar-errors.xml.h6
-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
6 files changed, 47 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 4517f180de..cfb6f59dd2 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,18 @@
+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
+
2004-08-05 Rodrigo Moya <rodrigo@novell.com>
Fixes #62030
diff --git a/calendar/calendar-errors.xml b/calendar/calendar-errors.xml
index 14c36de2e2..3e38b7e71a 100644
--- a/calendar/calendar-errors.xml
+++ b/calendar/calendar-errors.xml
@@ -115,6 +115,15 @@
<button label="Save Changes" response="GTK_RESPONSE_YES"/>
</error>
+ <error id="prompt-save-task" type="question" default="GTK_RESPONSE_YES">
+ <title>Save Task</title>
+ <primary>Would you like to save your changes to this task?</primary>
+ <secondary>You have made changes to this task, but not yet saved them.</secondary>
+ <button label="Discard Changes" response="GTK_RESPONSE_NO"/>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="Save Changes" response="GTK_RESPONSE_YES"/>
+ </error>
+
<error id="prompt-meeting-invite" type="question" default="GTK_RESPONSE_YES">
<primary>Would you like to send meeting invitations to participants?</primary>
<secondary>Email invitations will be sent to all participants and allow them to RSVP.</secondary>
diff --git a/calendar/calendar-errors.xml.h b/calendar/calendar-errors.xml.h
index cc4681c966..7398713a2b 100644
--- a/calendar/calendar-errors.xml.h
+++ b/calendar/calendar-errors.xml.h
@@ -72,6 +72,12 @@ char *s = N_("Would you like to save your changes to this appointment?");
char *s = N_("You have made changes to this appointment, but not yet saved them.");
char *s = N_("Discard Changes");
char *s = N_("Save Changes");
+/* calendar:prompt-save-task title */
+char *s = N_("Save Task");
+/* calendar:prompt-save-task primary */
+char *s = N_("Would you like to save your changes to this task?");
+/* calendar:prompt-save-task secondary */
+char *s = N_("You have made changes to this task, but not yet saved them.");
/* calendar:prompt-meeting-invite primary */
char *s = N_("Would you like to send meeting invitations to participants?");
/* calendar:prompt-meeting-invite secondary */
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