[gnome-applets/wip/gnome-3.10+: 1/29] don't use deprecated gtk_[h/v]box_new



commit 660e9ba89fa90c8d5baf9649fea85d92d352d9c8
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Jul 4 17:57:30 2014 +0300

    don't use deprecated gtk_[h/v]box_new

 accessx-status/applet.c                    |   18 +++++++------
 battstat/battstat_applet.c                 |    6 ++--
 battstat/power-management.c                |    2 +-
 charpick/charpick.c                        |   16 +++++++-----
 charpick/properties.c                      |   18 +++++++-------
 cpufreq/src/cpufreq-applet.c               |   20 +++++++-------
 geyes/geyes.c                              |    4 +-
 geyes/themes.c                             |   10 ++++----
 gweather/gweather-applet.c                 |    8 +++---
 gweather/gweather-dialog.c                 |    6 ++--
 gweather/gweather-pref.c                   |   22 ++++++++--------
 mini-commander/src/mini-commander_applet.c |   14 ++++++----
 mixer/dock.c                               |   23 ++++++++++++-----
 mixer/preferences.c                        |    2 +-
 multiload/load-graph.c                     |    4 +-
 multiload/main.c                           |    4 +-
 multiload/properties.c                     |   37 ++++++++++++++-------------
 trashapplet/src/trashapplet.c              |    4 +-
 18 files changed, 117 insertions(+), 101 deletions(-)
---
diff --git a/accessx-status/applet.c b/accessx-status/applet.c
index 202128a..4c928d9 100644
--- a/accessx-status/applet.c
+++ b/accessx-status/applet.c
@@ -1063,13 +1063,14 @@ create_applet (PanelApplet *applet)
        sapplet->orient = panel_applet_get_orient (applet);
        if (sapplet->orient == PANEL_APPLET_ORIENT_LEFT || 
            sapplet->orient == PANEL_APPLET_ORIENT_RIGHT) {
-               box = gtk_vbox_new (FALSE, 0); 
-               stickyfoo = gtk_vbox_new (TRUE, 0);
+               box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+               stickyfoo = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
        }
        else {
-               box = gtk_hbox_new (FALSE, 0);
-               stickyfoo = gtk_hbox_new (TRUE, 0);
+               box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+               stickyfoo = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        }
+       gtk_box_set_homogeneous (GTK_BOX (stickyfoo), TRUE);
        large_toolbar_pixels = 24; /* FIXME */
        if (panel_applet_get_size (sapplet->applet) >= large_toolbar_pixels)
                icon_size_spec = GTK_ICON_SIZE_LARGE_TOOLBAR;       
@@ -1149,13 +1150,14 @@ accessx_status_applet_reorient (GtkWidget *widget, PanelAppletOrient o, gpointer
 
        if (o == PANEL_APPLET_ORIENT_LEFT || 
            o == PANEL_APPLET_ORIENT_RIGHT) {
-               box = gtk_vbox_new (FALSE, 0); 
-               stickyfoo = gtk_vbox_new (TRUE, 0);
+               box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+               stickyfoo = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
        }
        else {
-               box = gtk_hbox_new (FALSE, 0);
-               stickyfoo = gtk_hbox_new (TRUE, 0);
+               box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+               stickyfoo = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        }
+       gtk_box_set_homogeneous (GTK_BOX (stickyfoo), TRUE);
        accessx_status_applet_layout_box (sapplet, box, stickyfoo);
 }
 
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index 6c1ee32..ffcc733 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -446,7 +446,7 @@ battery_full_dialog (GtkWidget *applet)
                            G_OBJECT (dialog));
 
   gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
-  hbox = gtk_hbox_new (FALSE, 6);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
   pixbuf = gtk_icon_theme_load_icon (
                gtk_icon_theme_get_default (),
                "battery",
@@ -606,7 +606,7 @@ battery_low_dialog( ProgressData *battery, BatteryStatus *info )
 
   gtk_container_set_border_width (GTK_CONTAINER (battery->battery_low_dialog),
                  6);
-  hbox = gtk_hbox_new (FALSE, 6);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
   pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
                 "battery",
@@ -615,7 +615,7 @@ battery_low_dialog( ProgressData *battery, BatteryStatus *info )
                 NULL);
   image = gtk_image_new_from_pixbuf (pixbuf);
   g_object_unref (pixbuf);
-  vbox = gtk_vbox_new (FALSE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 6);
   gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, FALSE, 0);
   label = gtk_label_new ("");
diff --git a/battstat/power-management.c b/battstat/power-management.c
index c368835..4295b30 100644
--- a/battstat/power-management.c
+++ b/battstat/power-management.c
@@ -117,7 +117,7 @@ initialise_test( void )
   test_status.on_ac_power = FALSE;
   test_status.charging = FALSE;
 
-  box = GTK_BOX( gtk_vbox_new( 5, FALSE ) );
+  box = GTK_BOX( gtk_box_new (GTK_ORIENTATION_VERTICAL, 5) );
 
   gtk_box_pack_start( box, gtk_label_new( "percent" ), TRUE, TRUE, 0);
   w = gtk_spin_button_new_with_range( -1.0, 100.0, 1 );
diff --git a/charpick/charpick.c b/charpick/charpick.c
index b2f0846..f508f1c 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -426,9 +426,9 @@ build_table(charpick_data *p_curr_data)
     gtk_widget_destroy(p_curr_data->box);
     
   if (p_curr_data->panel_vertical)
-    box = gtk_vbox_new (FALSE, 0);
+    box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   else 
-    box = gtk_hbox_new (FALSE, 0);
+    box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_widget_show (box);
   p_curr_data->box = box;
   
@@ -515,20 +515,22 @@ build_table(charpick_data *p_curr_data)
   
   if (p_curr_data->panel_vertical) {
     size_ratio = p_curr_data->panel_size / max_width;
-    button_box = gtk_hbox_new (TRUE, 0);
+    button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   } else {
     size_ratio = p_curr_data->panel_size / max_height;
-    button_box = gtk_vbox_new (TRUE, 0);
+    button_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   }
 
+  gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
   gtk_box_pack_start (GTK_BOX (box), button_box, TRUE, TRUE, 0);
   
   size_ratio = MAX (size_ratio, 1);
   row_box = g_new0 (GtkWidget *, size_ratio);
   for (i=0; i < size_ratio; i++) {
-       if (!p_curr_data->panel_vertical) row_box[i] = gtk_hbox_new (TRUE, 0);
-       else row_box[i] = gtk_vbox_new (TRUE, 0);
-       gtk_box_pack_start (GTK_BOX (button_box), row_box[i], TRUE, TRUE, 0);
+    if (!p_curr_data->panel_vertical) row_box[i] = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+    else row_box[i] = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+    gtk_box_set_homogeneous (GTK_BOX (button_box), TRUE);
+    gtk_box_pack_start (GTK_BOX (button_box), row_box[i], TRUE, TRUE, 0);
   }
   
   for (i = 0; i <len; i++) {   
diff --git a/charpick/properties.c b/charpick/properties.c
index 9d020b2..a24c639 100644
--- a/charpick/properties.c
+++ b/charpick/properties.c
@@ -106,11 +106,11 @@ add_edit_dialog_create (charpick_data *curr_data, gchar *string, gchar *title)
 
        dbox = gtk_dialog_get_content_area(GTK_DIALOG (dialog));
        
-       vbox = gtk_vbox_new (FALSE, 12);
+       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
        gtk_box_pack_start (GTK_BOX (dbox), vbox, TRUE, TRUE, 0);
        gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
        
-       hbox = gtk_hbox_new (FALSE, 12);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
        gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
        
        label = gtk_label_new_with_mnemonic (_("_Palette:"));
@@ -410,7 +410,7 @@ create_hig_catagory (GtkWidget *main_box, gchar *title)
        GtkWidget *label;
        gchar *tmp;
                
-       vbox = gtk_vbox_new (FALSE, 6);
+       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (main_box), vbox, TRUE, TRUE, 0);
 
        tmp = g_strdup_printf ("<b>%s</b>", title);
@@ -420,13 +420,13 @@ create_hig_catagory (GtkWidget *main_box, gchar *title)
        g_free (tmp);
        gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
-       hbox = gtk_hbox_new (FALSE, 0);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
        
        label = gtk_label_new ("    ");
        gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
        
-       vbox2 = gtk_vbox_new (FALSE, 6);
+       vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
 
        return vbox2;
@@ -444,13 +444,13 @@ static void default_chars_frame_create(charpick_data *curr_data)
 
   dbox = gtk_dialog_get_content_area(GTK_DIALOG (dialog));
 
-  vbox = gtk_vbox_new (FALSE, 18);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
   gtk_box_pack_start (GTK_BOX (dbox), vbox, TRUE, TRUE, 0);
 
   vbox1 = create_hig_catagory (vbox, _("Character Palette")); 
   
-  vbox3 = gtk_vbox_new (FALSE, 6);
+  vbox3 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_box_pack_start (GTK_BOX (vbox1), vbox3, TRUE, TRUE, 0);
   
   label = gtk_label_new_with_mnemonic(_("_Palettes:"));
@@ -458,12 +458,12 @@ static void default_chars_frame_create(charpick_data *curr_data)
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_widget_show(label);
          
-  hbox = gtk_hbox_new (FALSE, 12);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
   gtk_box_pack_start (GTK_BOX (vbox3), hbox, TRUE, TRUE, 0); 
   scrolled = create_palettes_tree (curr_data, label);
   gtk_box_pack_start (GTK_BOX (hbox), scrolled, TRUE, TRUE, 0);
   
-  vbox2 = gtk_vbox_new (FALSE, 6);
+  vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
   button = gtk_button_new_from_stock (GTK_STOCK_ADD);
   gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index 87c6793..8f2b05c 100644
--- a/cpufreq/src/cpufreq-applet.c
+++ b/cpufreq/src/cpufreq-applet.c
@@ -397,7 +397,7 @@ cpufreq_applet_get_preferred_width (GtkWidget *widget,
                gint icon_width;
 
                 gtk_widget_get_preferred_width (applet->icon, &icon_width, NULL);
-               width = GTK_IS_HBOX (applet->box) ?
+               width = gtk_orientable_get_orientation (GTK_ORIENTABLE (applet->box)) == 
GTK_ORIENTATION_HORIZONTAL ?
                        labels_width + icon_width + 2 :
                        MAX (labels_width, icon_width + 2);
        } else {
@@ -880,21 +880,21 @@ cpufreq_applet_refresh (CPUFreqApplet *applet)
         }
 
        if (horizontal) {
-               applet->labels_box = gtk_hbox_new (FALSE, 2);
+               applet->labels_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
                if ((label_size + pixmap_size) <= panel_size)
-                       applet->box = gtk_vbox_new (FALSE, 2);
+                       applet->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
                else
-                       applet->box = gtk_hbox_new (FALSE, 2);
+                       applet->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
        } else {
                 if (total_size <= panel_size) {
-                        applet->box = gtk_hbox_new (FALSE, 2);
-                        applet->labels_box  = gtk_hbox_new (FALSE, 2);
+                        applet->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
+                        applet->labels_box  = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
                 } else if ((label_size + unit_label_size) <= (panel_size - size_step)) {
-                        applet->box = gtk_vbox_new (FALSE, 2);
-                        applet->labels_box  = gtk_hbox_new (FALSE, 2);
+                        applet->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
+                        applet->labels_box  = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
                 } else {
-                        applet->box = gtk_vbox_new (FALSE, 2);
-                        applet->labels_box  = gtk_vbox_new (FALSE, 2);
+                        applet->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
+                        applet->labels_box  = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
                 }
        }
 
diff --git a/geyes/geyes.c b/geyes/geyes.c
index acb4dd1..1cfebd7 100644
--- a/geyes/geyes.c
+++ b/geyes/geyes.c
@@ -185,7 +185,7 @@ setup_eyes (EyesApplet *eyes_applet)
 {
        int i;
 
-        eyes_applet->hbox = gtk_hbox_new (FALSE, 0);
+        eyes_applet->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
         gtk_box_pack_start (GTK_BOX (eyes_applet->vbox), eyes_applet->hbox, TRUE, TRUE, 0);
 
        eyes_applet->eyes = g_new0 (GtkWidget *, eyes_applet->num_eyes);
@@ -249,7 +249,7 @@ create_eyes (PanelApplet *applet)
        EyesApplet *eyes_applet = g_new0 (EyesApplet, 1);
 
         eyes_applet->applet = applet;
-        eyes_applet->vbox = gtk_vbox_new (FALSE, 0);
+        eyes_applet->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
        gtk_container_add (GTK_CONTAINER (applet), eyes_applet->vbox);
 
diff --git a/geyes/themes.c b/geyes/themes.c
index 30fdd54..1929cba 100644
--- a/geyes/themes.c
+++ b/geyes/themes.c
@@ -294,18 +294,18 @@ properties_cb (GtkAction  *action,
                          G_CALLBACK (presponse_cb),
                          eyes_applet);
        
-       vbox = gtk_vbox_new (FALSE, 0);
+       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
        gtk_widget_show (vbox);
        
        gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (pbox))), vbox,
                            TRUE, TRUE, 0);
 
-       categories_vbox = gtk_vbox_new (FALSE, 18);
+       categories_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
        gtk_box_pack_start (GTK_BOX (vbox), categories_vbox, TRUE, TRUE, 0);
        gtk_widget_show (categories_vbox);
 
-       category_vbox = gtk_vbox_new (FALSE, 6);
+       category_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (categories_vbox), category_vbox, TRUE, TRUE, 0);
        gtk_widget_show (category_vbox);
        
@@ -317,7 +317,7 @@ properties_cb (GtkAction  *action,
        gtk_box_pack_start (GTK_BOX (category_vbox), label, FALSE, FALSE, 0);
        g_free (title);
        
-       hbox = gtk_hbox_new (FALSE, 0);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start (GTK_BOX (category_vbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
        
@@ -326,7 +326,7 @@ properties_cb (GtkAction  *action,
        gtk_box_pack_start (GTK_BOX (hbox), indent, FALSE, FALSE, 0);
        gtk_widget_show (indent);
        
-       control_vbox = gtk_vbox_new (FALSE, 6);
+       control_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox), control_vbox, TRUE, TRUE, 0);
        gtk_widget_show (control_vbox);
        
diff --git a/gweather/gweather-applet.c b/gweather/gweather-applet.c
index 0d3d645..15a61c4 100644
--- a/gweather/gweather-applet.c
+++ b/gweather/gweather-applet.c
@@ -184,13 +184,13 @@ static void place_widgets (GWeatherApplet *gw_applet)
         gtk_widget_destroy (gw_applet->box);
     
     if (horizontal && (total_size <= panel_size))
-        gw_applet->box = gtk_vbox_new(FALSE, 0);
+        gw_applet->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     else if (horizontal && (total_size > panel_size))
-        gw_applet->box = gtk_hbox_new(FALSE, 2);
+        gw_applet->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
     else if (!horizontal && (total_size <= panel_size))
-        gw_applet->box = gtk_hbox_new(FALSE, 2);
+        gw_applet->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
     else 
-        gw_applet->box = gtk_vbox_new(FALSE, 0);
+        gw_applet->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
     /* Rebuild the applet it's visual area */
     gtk_container_add (GTK_CONTAINER (gw_applet->container), gw_applet->box);
diff --git a/gweather/gweather-dialog.c b/gweather/gweather-dialog.c
index 911adf2..9ae5865 100644
--- a/gweather/gweather-dialog.c
+++ b/gweather/gweather-dialog.c
@@ -179,7 +179,7 @@ gweather_dialog_create (GWeatherDialog *dialog)
   gtk_widget_show (weather_notebook);
   gtk_box_pack_start (GTK_BOX (weather_vbox), weather_notebook, TRUE, TRUE, 0);
 
-  cond_hbox = gtk_hbox_new (FALSE, 2);
+  cond_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
   gtk_widget_show (cond_hbox);
   gtk_container_add (GTK_CONTAINER (weather_notebook), cond_hbox);
   gtk_container_set_border_width (GTK_CONTAINER (cond_hbox), 4);
@@ -425,7 +425,7 @@ gweather_dialog_create (GWeatherDialog *dialog)
   gtk_widget_show (current_note_lbl);
   gtk_notebook_set_tab_label (GTK_NOTEBOOK (weather_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK 
(weather_notebook), 0), current_note_lbl);
 
-  forecast_hbox = gtk_hbox_new(FALSE, 0);
+  forecast_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_container_set_border_width (GTK_CONTAINER (forecast_hbox), 12);
   gtk_widget_show (forecast_hbox);
 
@@ -455,7 +455,7 @@ gweather_dialog_create (GWeatherDialog *dialog)
       radar_note_lbl = gtk_label_new_with_mnemonic (_("Radar Map"));
       gtk_widget_show (radar_note_lbl);
 
-      radar_vbox = gtk_vbox_new (FALSE, 6);
+      radar_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
       gtk_widget_show (radar_vbox);
       gtk_notebook_append_page (GTK_NOTEBOOK (weather_notebook), radar_vbox, radar_note_lbl);
       gtk_container_set_border_width (GTK_CONTAINER (radar_vbox), 6);
diff --git a/gweather/gweather-pref.c b/gweather/gweather-pref.c
index f7af9eb..7379bf5 100644
--- a/gweather/gweather-pref.c
+++ b/gweather/gweather-pref.c
@@ -498,7 +498,7 @@ create_hig_catagory (GtkWidget *main_box, gchar *title)
        GtkWidget *label;
        gchar *tmp;
        
-       vbox = gtk_vbox_new (FALSE, 6);
+       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (main_box), vbox, FALSE, FALSE, 0);
 
        tmp = g_strdup_printf ("<b>%s</b>", title);
@@ -508,13 +508,13 @@ create_hig_catagory (GtkWidget *main_box, gchar *title)
        g_free (tmp);
        gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
        
-       hbox = gtk_hbox_new (FALSE, 0);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
        
        label = gtk_label_new ("    ");
        gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
        
-       vbox2 = gtk_vbox_new (FALSE, 6);
+       vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
 
        return vbox2;           
@@ -752,7 +752,7 @@ gweather_pref_create (GWeatherPref *pref)
    * General settings page.
    */
 
-    pref_basic_vbox = gtk_vbox_new (FALSE, 18);
+    pref_basic_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
     gtk_container_set_border_width (GTK_CONTAINER (pref_basic_vbox), 12);
     gtk_container_add (GTK_CONTAINER (pref_notebook), pref_basic_vbox);
 
@@ -886,7 +886,7 @@ gweather_pref_create (GWeatherPref *pref)
     g_signal_connect (G_OBJECT (pref->priv->basic_radar_btn), "toggled",
                      G_CALLBACK (radar_toggled), pref);
     
-    radar_toggle_hbox = gtk_hbox_new (FALSE, 12);
+    radar_toggle_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
     gtk_widget_show (radar_toggle_hbox);
     
     label = gtk_label_new ("    ");
@@ -900,7 +900,7 @@ gweather_pref_create (GWeatherPref *pref)
     g_signal_connect (G_OBJECT (pref->priv->basic_radar_url_btn), "toggled",
                      G_CALLBACK (use_radar_url_toggled), pref);
                      
-    pref->priv->basic_radar_url_hbox = gtk_hbox_new (FALSE, 12);
+    pref->priv->basic_radar_url_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
     gtk_widget_show (pref->priv->basic_radar_url_hbox);
 
     label = gtk_label_new ("    ");
@@ -922,7 +922,7 @@ gweather_pref_create (GWeatherPref *pref)
 
     frame = create_hig_catagory (pref_basic_vbox, _("Update"));
 
-    pref_basic_update_hbox = gtk_hbox_new (FALSE, 12);
+    pref_basic_update_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
 
     pref_basic_update_lbl = gtk_label_new_with_mnemonic (_("_Automatically update every:"));
     gtk_widget_show (pref_basic_update_lbl);
@@ -947,7 +947,7 @@ gweather_pref_create (GWeatherPref *pref)
     pref_basic_update_sec_lbl = gtk_label_new (_("minutes"));
     gtk_widget_show (pref_basic_update_sec_lbl);
 
-    value_hbox = gtk_hbox_new (FALSE, 6);
+    value_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
 
     gtk_box_pack_start (GTK_BOX (pref_basic_update_hbox), pref_basic_update_alignment, FALSE, TRUE, 0);
     gtk_box_pack_start (GTK_BOX (pref_basic_update_hbox), value_hbox, FALSE, FALSE, 0);
@@ -958,7 +958,7 @@ gweather_pref_create (GWeatherPref *pref)
 
     frame = create_hig_catagory (pref_basic_vbox, _("Display"));
 
-    vbox = gtk_vbox_new (FALSE, 6);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
 
        gtk_box_pack_start (GTK_BOX (vbox), unit_table, TRUE, TRUE, 0);
 
@@ -980,7 +980,7 @@ gweather_pref_create (GWeatherPref *pref)
   /*
    * Location page.
    */
-    pref_loc_hbox = gtk_vbox_new (FALSE, 6);
+    pref_loc_hbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     gtk_container_set_border_width (GTK_CONTAINER (pref_loc_hbox), 12);
     gtk_container_add (GTK_CONTAINER (pref_notebook), pref_loc_hbox);
 
@@ -1008,7 +1008,7 @@ gweather_pref_create (GWeatherPref *pref)
     gtk_box_pack_start (GTK_BOX (pref_loc_hbox), scrolled_window, TRUE, TRUE, 0);
     load_locations(pref);
 
-    pref_find_hbox = gtk_hbox_new (FALSE, 6);
+    pref_find_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
     pref_find_label = gtk_label_new (_("_Find:"));
     gtk_label_set_use_underline (GTK_LABEL (pref_find_label), TRUE);
 
diff --git a/mini-commander/src/mini-commander_applet.c b/mini-commander/src/mini-commander_applet.c
index 83870ab..1bc0ee2 100644
--- a/mini-commander/src/mini-commander_applet.c
+++ b/mini-commander/src/mini-commander_applet.c
@@ -203,9 +203,9 @@ mc_applet_draw (MCData *mc)
     }
 
     if ( ((mc->orient == PANEL_APPLET_ORIENT_LEFT) || (mc->orient == PANEL_APPLET_ORIENT_RIGHT)) && 
(prefs.panel_size_x < 36) )
-      mc->applet_box = gtk_vbox_new (FALSE, 0);
+      mc->applet_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     else
-      mc->applet_box = gtk_hbox_new (FALSE, 0);
+      mc->applet_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
     gtk_container_set_border_width (GTK_CONTAINER (mc->applet_box), 0);
 
@@ -219,14 +219,16 @@ mc_applet_draw (MCData *mc)
     /* hbox for message label and buttons */
     if ((mc->orient == PANEL_APPLET_ORIENT_LEFT) || (mc->orient == PANEL_APPLET_ORIENT_RIGHT))
       if (prefs.panel_size_x < 36)
-       hbox_buttons = gtk_vbox_new (TRUE, 0);
+       hbox_buttons = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
       else
-       hbox_buttons = gtk_hbox_new (TRUE, 0);
+       hbox_buttons = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
     else
       if (prefs.normal_size_y > 36)
-       hbox_buttons = gtk_vbox_new (TRUE, 0);
+       hbox_buttons = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
       else
-       hbox_buttons = gtk_hbox_new (TRUE, 0);
+       hbox_buttons = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+
+    gtk_box_set_homogeneous (GTK_BOX (hbox_buttons), TRUE);
 
     /* add file-browser button */
     button = gtk_button_new ();
diff --git a/mixer/dock.c b/mixer/dock.c
index 0fc8565..a9fc33c 100644
--- a/mixer/dock.c
+++ b/mixer/dock.c
@@ -146,18 +146,27 @@ gnome_volume_applet_dock_new (GtkOrientation orientation,
   GtkWidget *button, *scale, *more;
   GtkWidget *container, *outerline, *innerline, *frame;
   GnomeVolumeAppletDock *dock;
+  GtkOrientation containerOrientation, subcontainerOrientation;
   gint i;
   static struct {
     GtkWidget * (* sfunc) (GtkAdjustment *adj);
-    GtkWidget * (* container) (gboolean, gint);
-    GtkWidget * (* subcontainer) (gboolean, gint);
+    GtkWidget * (* container) (GtkOrientation, gint);
+    GtkWidget * (* subcontainer) (GtkOrientation, gint);
     gint sw, sh;
     gboolean inverted;
   } magic[2] = {
-    { gtk_vscale_new, gtk_hbox_new, gtk_vbox_new, -1, 200, TRUE},
-    { gtk_hscale_new, gtk_vbox_new, gtk_hbox_new, 200, -1, FALSE}
+    { gtk_vscale_new, gtk_box_new, gtk_box_new, -1, 200, TRUE},
+    { gtk_hscale_new, gtk_box_new, gtk_box_new, 200, -1, FALSE}
   };
 
+  if (orientation == GTK_ORIENTATION_HORIZONTAL) {
+    containerOrientation = GTK_ORIENTATION_HORIZONTAL;
+    subcontainerOrientation = GTK_ORIENTATION_VERTICAL;
+  } else {
+    containerOrientation = GTK_ORIENTATION_VERTICAL;
+    subcontainerOrientation = GTK_ORIENTATION_HORIZONTAL;
+  }
+
   dock = g_object_new (GNOME_VOLUME_APPLET_TYPE_DOCK,
                       NULL);
   gtk_window_set_screen (GTK_WINDOW (dock),
@@ -171,11 +180,11 @@ gnome_volume_applet_dock_new (GtkOrientation orientation,
   gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
   gtk_container_add (GTK_CONTAINER (dock), frame);
 
-  container = magic[orientation].container (FALSE, 0);
+  container = magic[orientation].container (containerOrientation, 0);
   gtk_container_set_border_width (GTK_CONTAINER (container), 6);
   gtk_container_add (GTK_CONTAINER (frame), container);
-  outerline = magic[orientation].subcontainer (FALSE, 0);
-  innerline = magic[orientation].subcontainer (FALSE, 0);
+  outerline = magic[orientation].subcontainer (subcontainerOrientation, 0);
+  innerline = magic[orientation].subcontainer (subcontainerOrientation, 0);
   gtk_box_pack_start (GTK_BOX (container), outerline, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (container), innerline, FALSE, FALSE, 0);
 
diff --git a/mixer/preferences.c b/mixer/preferences.c
index 4f7ba73..fb717e2 100644
--- a/mixer/preferences.c
+++ b/mixer/preferences.c
@@ -96,7 +96,7 @@ gnome_volume_applet_preferences_init (GnomeVolumeAppletPreferences *prefs)
                          NULL);
 
   /* add a treeview for all the properties */
-  box = gtk_vbox_new (FALSE, 6);
+  box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_container_set_border_width (GTK_CONTAINER (box), 5);
 
   label = gtk_label_new (_("Select the device and track to control."));
diff --git a/multiload/load-graph.c b/multiload/load-graph.c
index 68c5504..58a5dd2 100644
--- a/multiload/load-graph.c
+++ b/multiload/load-graph.c
@@ -288,9 +288,9 @@ load_graph_new (MultiloadApplet *ma, guint n, const gchar *label,
     g->show_frame = TRUE;
     g->multiload = ma;
                
-    g->main_widget = gtk_vbox_new (FALSE, 0);
+    g->main_widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
-    g->box = gtk_vbox_new (FALSE, 0);
+    g->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     
     orient = panel_applet_get_orient (g->multiload->applet);
     switch (orient)
diff --git a/multiload/main.c b/multiload/main.c
index 1f37d7d..a8030b1 100644
--- a/multiload/main.c
+++ b/multiload/main.c
@@ -429,10 +429,10 @@ multiload_applet_refresh(MultiloadApplet *ma)
        
        if ( (orientation == PANEL_APPLET_ORIENT_UP) || 
             (orientation == PANEL_APPLET_ORIENT_DOWN) ) {
-               ma->box = gtk_hbox_new(FALSE, 0);
+                       ma->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        }
        else
-               ma->box = gtk_vbox_new(FALSE, 0);
+               ma->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
        
        gtk_container_add(GTK_CONTAINER(ma->applet), ma->box);
                        
diff --git a/multiload/properties.c b/multiload/properties.c
index 22214cd..c9b37a0 100644
--- a/multiload/properties.c
+++ b/multiload/properties.c
@@ -223,7 +223,8 @@ add_page(GtkWidget *notebook, gchar *label)
        GtkWidget *page;
        GtkWidget *page_label;
        
-       page = gtk_hbox_new(TRUE, 0);
+       page = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+       gtk_box_set_homogeneous (GTK_BOX (page), TRUE);
        page_label = gtk_label_new(label);
        gtk_container_set_border_width(GTK_CONTAINER(page), 6);
                
@@ -295,7 +296,7 @@ add_color_selector(GtkWidget *page, gchar *name, gchar *gconf_path, MultiloadApp
                        + g_ascii_xdigit_value(color_string[6])) * 256;
        g_free (color_string);
                
-       vbox = gtk_vbox_new (FALSE, 6);
+       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        label = gtk_label_new_with_mnemonic(name);
        color_picker = gtk_color_button_new();
        gtk_label_set_mnemonic_widget (GTK_LABEL (label), color_picker);
@@ -337,18 +338,18 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gchar *label_text;
        gchar *title;
 
-       vbox = gtk_vbox_new (FALSE, 0);
+       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
        gtk_widget_show (vbox);
        
        gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), vbox,
                            TRUE, TRUE, 0);
 
-       categories_vbox = gtk_vbox_new (FALSE, 18);
+       categories_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
        gtk_box_pack_start (GTK_BOX (vbox), categories_vbox, TRUE, TRUE, 0);
        gtk_widget_show (categories_vbox);
 
-       category_vbox = gtk_vbox_new (FALSE, 6);
+       category_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (categories_vbox), category_vbox, TRUE, TRUE, 0);
        gtk_widget_show (category_vbox);
        
@@ -360,7 +361,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_box_pack_start (GTK_BOX (category_vbox), label, FALSE, FALSE, 0);
        g_free (title);
        
-       hbox = gtk_hbox_new (FALSE, 0);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start (GTK_BOX (category_vbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
        
@@ -369,11 +370,11 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_box_pack_start (GTK_BOX (hbox), indent, FALSE, FALSE, 0);
        gtk_widget_show (indent);
        
-       control_vbox = gtk_vbox_new (FALSE, 6);
+       control_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox), control_vbox, TRUE, TRUE, 0);
        gtk_widget_show (control_vbox);
        
-       control_hbox = gtk_hbox_new (FALSE, 12);
+       control_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
        gtk_box_pack_start (GTK_BOX (control_vbox), control_hbox, TRUE, TRUE, 0);
        gtk_widget_show (control_hbox);
        
@@ -454,7 +455,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
                        G_CALLBACK (property_toggled_cb), "view_diskload");
        gtk_box_pack_start (GTK_BOX (control_hbox), check_box, FALSE, FALSE, 0);
 
-       category_vbox = gtk_vbox_new (FALSE, 6);
+       category_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (categories_vbox), category_vbox, TRUE, TRUE, 0);
        gtk_widget_show (category_vbox);
 
@@ -467,7 +468,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_widget_show (label);
        g_free (title);
        
-       hbox = gtk_hbox_new (FALSE, 0);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start (GTK_BOX (category_vbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
 
@@ -476,11 +477,11 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_box_pack_start (GTK_BOX (hbox), indent, FALSE, FALSE, 0);
        gtk_widget_show (indent);
 
-       control_vbox = gtk_vbox_new (FALSE, 6);
+       control_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox), control_vbox, TRUE, TRUE, 0);
        gtk_widget_show (control_vbox);
        
-       control_hbox = gtk_hbox_new (FALSE, 12);
+       control_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
        gtk_box_pack_start (GTK_BOX (control_vbox), control_hbox, TRUE, TRUE, 0);
        gtk_widget_show (control_hbox);
        
@@ -497,7 +498,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_size_group_add_widget (label_size, label);
         gtk_box_pack_start (GTK_BOX (control_hbox), label, FALSE, FALSE, 0);
        
-       hbox = gtk_hbox_new (FALSE, 6);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
        gtk_box_pack_start (GTK_BOX (control_hbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
 
@@ -525,7 +526,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
        gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
        
-       control_hbox = gtk_hbox_new (FALSE, 12);
+       control_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
        gtk_box_pack_start (GTK_BOX (control_vbox), control_hbox, TRUE, TRUE, 0);
        gtk_widget_show (control_hbox);
        
@@ -534,7 +535,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_size_group_add_widget (label_size, label);
        gtk_box_pack_start (GTK_BOX (control_hbox), label, FALSE, FALSE, 0);
        
-       hbox = gtk_hbox_new (FALSE, 6);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
        gtk_box_pack_start (GTK_BOX (control_hbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
        
@@ -562,7 +563,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        g_free(label_text);
        
        
-       category_vbox = gtk_vbox_new (FALSE, 6);
+       category_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (categories_vbox), category_vbox, TRUE, TRUE, 0);
        gtk_widget_show (category_vbox);
 
@@ -575,7 +576,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_widget_show (label);
        g_free (title);
        
-       hbox = gtk_hbox_new (FALSE, 0);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start (GTK_BOX (category_vbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
 
@@ -584,7 +585,7 @@ fill_properties(GtkWidget *dialog, MultiloadApplet *ma)
        gtk_box_pack_start (GTK_BOX (hbox), indent, FALSE, FALSE, 0);
        gtk_widget_show (indent);
 
-       control_vbox = gtk_vbox_new (FALSE, 6);
+       control_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox), control_vbox, TRUE, TRUE, 0);
        gtk_widget_show (control_vbox);
 
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index 24ab444..d8dc2d5 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -460,7 +460,7 @@ confirm_delete_immediately (GtkWidget *parent_view,
 
   gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
 
-  hbox = gtk_hbox_new (FALSE, 12);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
   gtk_widget_show (hbox);
   gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox,
@@ -472,7 +472,7 @@ confirm_delete_immediately (GtkWidget *parent_view,
   gtk_widget_show (image);
   gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
 
-  vbox = gtk_vbox_new (FALSE, 12);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
   gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
   gtk_widget_show (vbox);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]