aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/save-comp.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-03-13 00:04:50 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-03-13 00:04:50 +0800
commit460a3fb010bb5c636b823df67364e39addaf8078 (patch)
tree8a8b7fd30c87fa5f60a973013d26bea677ada981 /calendar/gui/dialogs/save-comp.c
parentbdad58fc5f68ee7bcf42a2a6537b7d744abd16af (diff)
downloadgsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.tar
gsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.tar.gz
gsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.tar.bz2
gsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.tar.lz
gsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.tar.xz
gsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.tar.zst
gsoc2013-evolution-460a3fb010bb5c636b823df67364e39addaf8078.zip
corrected button ordering and changed the return type to be a
2003-03-12 Rodrigo Moya <rodrigo@ximian.com> * gui/dialogs/save-comp.[ch] (save_component_dialog): corrected button ordering and changed the return type to be a GtkResponseType. * gui/dialogs/comp-editor.c (prompt_to_save_changes): adapted to changes in save_component_dialog. svn path=/trunk/; revision=20261
Diffstat (limited to 'calendar/gui/dialogs/save-comp.c')
-rw-r--r--calendar/gui/dialogs/save-comp.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
index 29701f92d7..899ff34ec2 100644
--- a/calendar/gui/dialogs/save-comp.c
+++ b/calendar/gui/dialogs/save-comp.c
@@ -39,23 +39,30 @@
* Pops up a dialog box asking the user whether he wants to save changes for
* a calendar component.
*
- * Return value: TRUE if changes shold be saved, FALSE otherwise.
+ * Return value: the response_id of the button selected.
**/
-gint
+GtkResponseType
save_component_dialog (GtkWindow *parent)
{
GtkWidget *dialog;
+ gint r;
dialog = gnome_message_box_new (_("Do you want to save changes?"),
GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
GNOME_STOCK_BUTTON_CANCEL,
+ GNOME_STOCK_BUTTON_NO,
+ GNOME_STOCK_BUTTON_YES,
NULL);
gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
gnome_dialog_grab_focus (GNOME_DIALOG (dialog), 0);
gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
- return gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ r = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ if (r == 1)
+ return GTK_RESPONSE_NO;
+ else if (r == 2)
+ return GTK_RESPONSE_YES;
+
+ return GTK_RESPONSE_CANCEL;
}