tWorkaround for different behaviour of hbbox spacing between GTK+1 and GTK+2. - 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 aec2e9bfe0a119335d9fd203e0809edd0012b17c
 (DIR) parent 482848d95dd585ef8b425e24c0a8e3c263d76c47
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Mon, 25 Mar 2002 16:55:20 +0000
       
       Workaround for different behaviour of hbbox spacing between GTK+1 and GTK+2.
       
       
       Diffstat:
         M src/gui_client/gtk_client.c         |       8 +++++++-
       
       1 file changed, 7 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
       t@@ -187,13 +187,15 @@ static void LogMessage(const gchar *log_domain, GLogLevelFlags log_level,
        /*
         * Creates an hbutton_box widget, and sets a sensible spacing.
         * N.B. Should use gtk_hbutton_box_set_spacing_default() instead, but
       - * I can't get this to actually work...
       + * this doesn't seem to actually work with GTK+2...
         */
        GtkWidget *my_hbbox_new(void)
        {
          GtkWidget *hbbox = gtk_hbutton_box_new();
        
       +#ifdef HAVE_GLIB2
          gtk_box_set_spacing(GTK_BOX(hbbox), 8);
       +#endif
          return hbbox;
        }
        
       t@@ -2113,6 +2115,10 @@ gboolean GtkLoop(int *argc, char **argv[], gboolean ReturnOnFail)
          gtk_hbutton_box_set_layout_default(GTK_BUTTONBOX_END);
          gtk_vbutton_box_set_layout_default(GTK_BUTTONBOX_SPREAD);
        
       +#ifndef HAVE_GLIB2
       +  gtk_hbutton_box_set_spacing_default(8);
       +#endif
       +
          window = MainWindow = ClientData.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        
          /* Title of main window in GTK+ client */