tMessage dialogs now use stock GTK+2 buttons where available. - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4f503e5f23a2c7b5f0e895829a8dcc12536d74a4
 (DIR) parent a4695c4af0899e053d4d1ac98de0c5093d4530da
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Mon, 25 Mar 2002 17:42:03 +0000
       
       Message dialogs now use stock GTK+2 buttons where available.
       
       
       Diffstat:
         M src/gtkport/gtkport.c               |       6 ++----
         M src/gui_client/gtk_client.c         |       4 ++--
       
       2 files changed, 4 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c
       t@@ -5081,7 +5081,7 @@ gint OldGtkMessageBox(GtkWidget *parent, const gchar *Text,
          static gint retval;
          gboolean imm_return;
          gchar *ButtonData[MB_MAX] = {
       -    N_("OK"), N_("Cancel"), N_("_Yes"), N_("_No")
       +    GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_YES, GTK_STOCK_NO
          };
        
          imm_return = Options & MB_IMMRETURN;
       t@@ -5114,9 +5114,7 @@ gint OldGtkMessageBox(GtkWidget *parent, const gchar *Text,
          hbbox = gtk_hbutton_box_new();
          for (i = 0; i < MB_MAX; i++) {
            if (Options & (1 << i)) {
       -      button = gtk_button_new_with_label("");
       -      SetAccelerator(button, _(ButtonData[i]), button,
       -                     "clicked", accel_group, FALSE);
       +      button = gtk_button_new_from_stock(ButtonData[i]);
              if (!imm_return) {
                gtk_object_set_data(GTK_OBJECT(button), "retval", &retval);
              }
 (DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
       t@@ -73,7 +73,7 @@ struct ClientDataStruct {
          guint JetAccel;
        };
        
       -GtkWidget *MainWindow;
       +GtkWidget *MainWindow = NULL;
        
        static struct ClientDataStruct ClientData;
        static gboolean InGame = FALSE;
       t@@ -176,7 +176,7 @@ static gchar *MenuTranslate(const gchar *path, gpointer func_data)
        static void LogMessage(const gchar *log_domain, GLogLevelFlags log_level,
                               const gchar *message, gpointer user_data)
        {
       -  GtkMessageBox(NULL, message,
       +  GtkMessageBox(MainWindow, message,
                        /* Titles of the message boxes for warnings and errors */
                        log_level & G_LOG_LEVEL_WARNING ? _("Warning") :
                        log_level & G_LOG_LEVEL_CRITICAL ? _("Error") :