tMessage boxes now use pretty GTK+2 icons where appropriate. - vaccinewars - be… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 07236bc9caf3a4de10bbc136329bcba49f0fb558 | |
parent c1efd5f98f6a6f0ee63c42e9c8b82342867d4340 | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 25 Mar 2002 16:50:32 +0000 | |
Message boxes now use pretty GTK+2 icons where appropriate. | |
Diffstat: | |
M src/gtkport/gtkport.c | 18 +++++++++++++----- | |
1 file changed, 13 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c | |
t@@ -4908,11 +4908,20 @@ void gtk_progress_bar_realize(GtkWidget *widget) | |
} | |
gint GtkMessageBox(GtkWidget *parent, const gchar *Text, | |
- const gchar *Title, gint Options) | |
+ const gchar *Title, GtkMessageType type, gint Options) | |
{ | |
gint retval; | |
RecurseLevel++; | |
+ | |
+ switch(type) { | |
+ case GTK_MESSAGE_WARNING: | |
+ Options |= MB_ICONWARNING; break; | |
+ case GTK_MESSAGE_ERROR: | |
+ Options |= MB_ICONERROR; break; | |
+ default: | |
+ } | |
+ | |
retval = MessageBox(parent && parent->hWnd ? parent->hWnd : NULL, | |
Text, Title, Options); | |
RecurseLevel--; | |
t@@ -5086,7 +5095,7 @@ gint OldGtkMessageBox(GtkWidget *parent, const gchar *Te… | |
#ifdef HAVE_GLIB2 | |
gint GtkMessageBox(GtkWidget *parent, const gchar *Text, | |
- const gchar *Title, gint Options) | |
+ const gchar *Title, GtkMessageType type, gint Options) | |
{ | |
GtkWidget *dialog; | |
gint retval; | |
t@@ -5102,8 +5111,7 @@ gint GtkMessageBox(GtkWidget *parent, const gchar *Text, | |
dialog = gtk_message_dialog_new(GTK_WINDOW(parent), | |
GTK_DIALOG_MODAL, | |
- GTK_MESSAGE_INFO, | |
- buttons, Text); | |
+ type, buttons, Text); | |
if (Title) gtk_window_set_title(GTK_WINDOW(dialog), Title); | |
retval = gtk_dialog_run(GTK_DIALOG(dialog)); | |
t@@ -5114,7 +5122,7 @@ gint GtkMessageBox(GtkWidget *parent, const gchar *Text, | |
#else | |
gint GtkMessageBox(GtkWidget *parent, const gchar *Text, | |
- const gchar *Title, gint Options) | |
+ const gchar *Title, GtkMessageType type, gint Options) | |
{ | |
return OldGtkMessageBox(parent, Text, Title, Options); | |
} |