aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-12-02 12:32:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-12-02 12:32:10 +0800
commit0ac49c9334cc8078430999fe6de49e42fa664408 (patch)
tree4e7a9517d31cb8f8161299c22492b10c15491e5c /widgets/misc
parent4354c0ac032ef2837a80f801d1d1cad9036f2b37 (diff)
downloadgsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.tar
gsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.tar.gz
gsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.tar.bz2
gsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.tar.lz
gsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.tar.xz
gsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.tar.zst
gsoc2013-evolution-0ac49c9334cc8078430999fe6de49e42fa664408.zip
Add include of gnome-dialog.h
2002-11-27 Not Zed <NotZed@Ximian.com> * e-charset-picker.c: Add include of gnome-dialog.h * *.[ch]: ran fix.sh script over everything. svn path=/trunk/; revision=18979
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-gui-utils.c31
-rw-r--r--widgets/misc/e-gui-utils.h4
2 files changed, 10 insertions, 25 deletions
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c
index 5572333521..e91dfb5f9d 100644
--- a/widgets/misc/e-gui-utils.c
+++ b/widgets/misc/e-gui-utils.c
@@ -33,40 +33,25 @@
/* should probably just deprecate/remove this and have callers change
to using gtk_message_dialog_new */
+/* This should probably be moved into evolution/e-util */
void
-e_notice (GtkWindow *window, const char *type, const char *format, ...)
+e_notice (GtkWindow *parent, GtkMessageType type, const char *format, ...)
{
- GtkMessageType gtk_type;
-
GtkWidget *dialog;
va_list args;
char *str;
- if (!strcmp (type, GNOME_MESSAGE_BOX_INFO)
- || !strcmp (type, GNOME_MESSAGE_BOX_GENERIC))
- gtk_type = GTK_MESSAGE_INFO;
- else if (!strcmp (type, GNOME_MESSAGE_BOX_WARNING))
- gtk_type = GTK_MESSAGE_WARNING;
- else if (!strcmp (type, GNOME_MESSAGE_BOX_ERROR))
- gtk_type = GTK_MESSAGE_ERROR;
- else if (!strcmp (type, GNOME_MESSAGE_BOX_QUESTION))
- gtk_type = GTK_MESSAGE_QUESTION;
- else {
- g_warning ("invalid dialog type '%s'", type);
- gtk_type = GTK_MESSAGE_INFO;
- }
-
va_start (args, format);
str = g_strdup_vprintf (format, args);
- dialog = gtk_message_dialog_new (window, 0, gtk_type,
- GTK_BUTTONS_OK,
- str,
- NULL);
+ dialog = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT, type,
+ GTK_BUTTONS_CLOSE,
+ "%s",
+ str);
va_end (args);
g_free (str);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy(dialog);
+ g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
+ gtk_widget_show (dialog);
}
static void
diff --git a/widgets/misc/e-gui-utils.h b/widgets/misc/e-gui-utils.h
index 43b1c0b0f2..b401748e20 100644
--- a/widgets/misc/e-gui-utils.h
+++ b/widgets/misc/e-gui-utils.h
@@ -27,7 +27,7 @@
#include <gtk/gtkmenu.h>
#include <gtk/gtkwindow.h>
-#include <libgnomeui/gnome-messagebox.h>
+#include <gtk/gtkmessagedialog.h>
#include <glade/glade-xml.h>
G_BEGIN_DECLS
@@ -36,7 +36,7 @@ void e_popup_menu (GtkMenu *menu,
GdkEvent *event);
void e_auto_kill_popup_menu_on_hide (GtkMenu *menu);
void e_notice (GtkWindow *window,
- const char *type,
+ GtkMessageType type,
const char *format,
...);
void e_container_foreach_leaf (GtkContainer *container,