Re: [evolution-patches] Updated Patch for bug #61673 (Tasks)
- From: Parthasarathi Susarla <sparthasarathi novell com>
- To: JP Rosevear <jpr novell com>
- Cc: Rodrigo Moya <rodrigo novell com>, Evolution Patches <evolution-patches lists ximian com>
- Subject: Re: [evolution-patches] Updated Patch for bug #61673 (Tasks)
- Date: Fri, 06 Aug 2004 10:20:12 +0530
On Thu, 2004-08-05 at 23:18 -0400, JP Rosevear wrote:
> On Thu, 2004-08-05 at 16:03 +0200, Rodrigo Moya wrote:
> > > #include "widgets/misc/e-error.h"
> > > +#include <libecal/e-cal-component.h>
> > > #include "save-comp.h"
> > >
> > you should include e-cal-component.h in save-comp.h, since ECalComponent
> > is used there in the function prototype.
> >
> > is this needed (Discard/Save changes)? Those strings are already present
> > in the calendar-errors.xml|.h files.
>
> These are just auto extracted from the .xml I believe.
>
> -JP
Attached is the updated patch for bug #61673. The following changes are
made:
1. included in the e-cal-component.h file in the save-comp.h
2. removed duplicate strings in caledar-errors.xml.h
-partha
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2472
diff -u -r1.2472 ChangeLog
--- calendar/ChangeLog 4 Aug 2004 04:32:12 -0000 1.2472
+++ calendar/ChangeLog 6 Aug 2004 04:22:42 -0000
@@ -1,3 +1,17 @@
+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-04 Harish Krishnaswamy <kharish novell com>
* gui/e-itip-control.c: (ok_clicked_cb): Handle decline request by
Index: calendar/gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.108
diff -u -r1.108 comp-editor.c
--- calendar/gui/dialogs/comp-editor.c 16 Jul 2004 02:28:21 -0000 1.108
+++ calendar/gui/dialogs/comp-editor.c 6 Aug 2004 04:23:07 -0000
@@ -330,7 +330,7 @@
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)))
Index: calendar/gui/dialogs/save-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/save-comp.c,v
retrieving revision 1.14
diff -u -r1.14 save-comp.c
--- calendar/gui/dialogs/save-comp.c 25 May 2004 20:41:32 -0000 1.14
+++ calendar/gui/dialogs/save-comp.c 6 Aug 2004 04:23:14 -0000
@@ -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;
+ }
}
Index: calendar/gui/dialogs/save-comp.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/save-comp.h,v
retrieving revision 1.5
diff -u -r1.5 save-comp.h
--- calendar/gui/dialogs/save-comp.h 12 Mar 2003 16:04:50 -0000 1.5
+++ calendar/gui/dialogs/save-comp.h 6 Aug 2004 04:23:25 -0000
@@ -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
Index: calendar/calendar-errors.xml
===================================================================
RCS file: /cvs/gnome/evolution/calendar/calendar-errors.xml,v
retrieving revision 1.1
diff -u -r1.1 calendar-errors.xml
--- calendar/calendar-errors.xml 25 May 2004 20:41:32 -0000 1.1
+++ calendar/calendar-errors.xml 6 Aug 2004 04:23:34 -0000
@@ -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>
Index: calendar/calendar-errors.xml.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/calendar-errors.xml.h,v
retrieving revision 1.1
diff -u -r1.1 calendar-errors.xml.h
--- calendar/calendar-errors.xml.h 25 May 2004 20:41:32 -0000 1.1
+++ calendar/calendar-errors.xml.h 6 Aug 2004 04:23:49 -0000
@@ -72,6 +72,12 @@
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]