aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/simple_dialog.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-10-09 06:38:36 +0000
committerGuy Harris <guy@alum.mit.edu>2000-10-09 06:38:36 +0000
commit677abe54e1f521aa8c562eccca0825118cb41d90 (patch)
tree00352eb04da21683ce2edd79b649c6b2ed02139e /gtk/simple_dialog.c
parentfedb22f4145e731dbad704ec33c04c4b3ecf796a (diff)
Add support for modal message boxes ("simple dialog").
Make the message boxes popped up for errors when selecting a font modal, so that the user has to say "yes, I know, I'll do better next time" before hitting "OK" again, so that you don't get a pile of message boxes. svn path=/trunk/; revision=2485
Diffstat (limited to 'gtk/simple_dialog.c')
-rw-r--r--gtk/simple_dialog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index 61269534a2..d0377422d0 100644
--- a/gtk/simple_dialog.c
+++ b/gtk/simple_dialog.c
@@ -1,7 +1,7 @@
/* simple_dialog.c
* Simple message dialog box routines.
*
- * $Id: simple_dialog.c,v 1.6 2000/08/23 06:56:31 guy Exp $
+ * $Id: simple_dialog.c,v 1.7 2000/10/09 06:38:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -76,7 +76,7 @@ simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
gchar **icon;
/* Main window */
- switch (type) {
+ switch (type & ~ESD_TYPE_MODAL) {
case ESD_TYPE_WARN :
icon = icon_excl_xpm;
win = dlg_window_new("Ethereal: Warning");
@@ -92,6 +92,9 @@ simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
break;
}
+ if (type & ESD_TYPE_MODAL)
+ gtk_window_set_modal(GTK_WINDOW(win), TRUE);
+
gtk_container_border_width(GTK_CONTAINER(win), 7);
gtk_object_set_data(GTK_OBJECT(win), bm_key, btn_mask);