diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-05-26 04:41:32 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-26 04:41:32 +0800 |
commit | 7dfee05355fb0086563434285ac1a524e78cd2bd (patch) | |
tree | 79bb392a6e972455a18e88076b7a91ba8dd81bab /calendar/gui/dialogs/cancel-comp.c | |
parent | 64b6b3d827e931ae17281acf72f2de9b259afe0f (diff) | |
download | gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.tar gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.tar.gz gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.tar.bz2 gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.tar.lz gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.tar.xz gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.tar.zst gsoc2013-evolution-7dfee05355fb0086563434285ac1a524e78cd2bd.zip |
Make calendar-errors.xml.h and install the xml file.
2004-05-25 Jeffrey Stedfast <fejj@novell.com>
* Makefile.am: Make calendar-errors.xml.h and install the xml
file.
* calendar-errors.xml: New error definitions file.
* gui/gnome-cal.c (backend_died_cb): Use e-error
* gui/e-tasks.c (backend_died_cb): Use e-error
* gui/dialogs/send-comp.c (send_component_dialog): Use e-error
* gui/dialogs/save-comp.c (save_component_dialog): Use e-error
* gui/dialogs/delete-comp.c (delete_component_dialog): Use e-error
* gui/dialogs/cancel-comp.c (cancel_component_dialog): Use e-error
svn path=/trunk/; revision=26084
Diffstat (limited to 'calendar/gui/dialogs/cancel-comp.c')
-rw-r--r-- | calendar/gui/dialogs/cancel-comp.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c index 3b72e5b31e..008f70e39e 100644 --- a/calendar/gui/dialogs/cancel-comp.c +++ b/calendar/gui/dialogs/cancel-comp.c @@ -27,6 +27,7 @@ #include <libgnome/gnome-i18n.h> #include <libgnomeui/gnome-uidefs.h> #include <e-util/e-icon-factory.h> +#include "widgets/misc/e-error.h" #include "cancel-comp.h" @@ -42,42 +43,34 @@ gboolean cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting) { - GtkWidget *dialog; ECalComponentVType vtype; - char *str; - gint response; - + const char *id; + if (deleting && e_cal_get_save_schedules (client)) return TRUE; - + vtype = e_cal_component_get_vtype (comp); - + switch (vtype) { case E_CAL_COMPONENT_EVENT: if (deleting) - str = g_strdup_printf (_("The event being deleted is a meeting, " - "would you like to send a cancellation notice?")); + id = "calendar:prompt-delete-meeting"; else - str = g_strdup_printf (_("Are you sure you want to cancel " - "and delete this meeting?")); + id = "calendar:prompt-cancel-meeting"; break; case E_CAL_COMPONENT_TODO: if (deleting) - str = g_strdup_printf (_("The task being deleted is assigned, " - "would you like to send a cancellation notice?")); + id = "calendar:prompt-delete-task"; else - str = g_strdup_printf (_("Are you sure you want to cancel " - "and delete this task?")); + id = "calendar:prompt-cancel-task"; break; case E_CAL_COMPONENT_JOURNAL: if (deleting) - str = g_strdup_printf (_("The journal entry being deleted is published, " - "would you like to send a cancellation notice?")); + id = "calendar:prompt-delete-journal"; else - str = g_strdup_printf (_("Are you sure you want to cancel " - "and delete this journal entry?")); + id = "calendar:prompt-cancel-journal"; break; default: @@ -86,16 +79,7 @@ cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, g return FALSE; } - dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, str); - - gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon("stock_calendar", 32)); - - response = gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - if (response == GTK_RESPONSE_YES) + if (e_error_run (parent, id, NULL) == GTK_RESPONSE_YES) return TRUE; else return FALSE; |