aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorAnna Marie Dirks <anna@ximian.com>2003-05-21 00:19:15 +0800
committerAnna Dirks <anna@src.gnome.org>2003-05-21 00:19:15 +0800
commit9c42c5b193c83a19586508803a81ba590e7b1887 (patch)
tree8dad9994e15a47e17349493eff2dcb8719db41a8 /calendar
parentdefcee226b79b846243958d04884dec873e61e5e (diff)
downloadgsoc2013-evolution-9c42c5b193c83a19586508803a81ba590e7b1887.tar.gz
gsoc2013-evolution-9c42c5b193c83a19586508803a81ba590e7b1887.tar.zst
gsoc2013-evolution-9c42c5b193c83a19586508803a81ba590e7b1887.zip
Change this dialog from using a gnome_message_box (which has been
2003-05-20 Anna Marie Dirks <anna@ximian.com> * gui/dialogs/save-comp.c (save_component_dialog): Change this dialog from using a gnome_message_box (which has been deprecated), to using a gtk_message_dialog. This HIG-ifies this dialog, and fixes bug #42046. svn path=/trunk/; revision=21285
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/dialogs/save-comp.c37
2 files changed, 27 insertions, 17 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 1881dc11a6..9623642526 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-20 Anna Marie Dirks <anna@ximian.com>
+
+ * gui/dialogs/save-comp.c (save_component_dialog): Change this
+ dialog from using a gnome_message_box (which has been deprecated),
+ to using a gtk_message_dialog. This HIG-ifies this dialog, and
+ fixes bug #42046.
+
2003-05-20 Hans Petter Jansson <hpj@ximian.com>
Fixes #42056
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
index 499a278dc3..548c210b46 100644
--- a/calendar/gui/dialogs/save-comp.c
+++ b/calendar/gui/dialogs/save-comp.c
@@ -25,9 +25,9 @@
#include <glib.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock-icons.h>
#include <gal/widgets/e-unicode.h>
+#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtkstock.h>
#include "save-comp.h"
@@ -41,28 +41,31 @@
*
* Return value: the response_id of the button selected.
**/
+
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,
- GTK_STOCK_CANCEL,
- GTK_STOCK_NO,
- GTK_STOCK_YES,
- NULL);
+ dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
+ _("This event has been changed, but has not been saved.\n\n"
+ "Do you wish to save your changes?"));
+
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ _("_Discard Changes"),GTK_RESPONSE_NO,
+ GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE, GTK_RESPONSE_YES,
+ NULL);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Save Event"));
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gnome_dialog_grab_focus (GNOME_DIALOG (dialog), 0);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
+ r = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (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 r;
- return GTK_RESPONSE_CANCEL;
}