[gdl] Replace deprecated functions in gtk+



commit 08eab35e1643b695dd490062b4544486e0a60db2
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sat May 26 21:26:02 2012 +0200

    Replace deprecated functions in gtk+

 gdl/gdl-dock-bar.c       |   21 +++-----
 gdl/gdl-dock-item-grip.c |   49 +++----------------
 gdl/gdl-dock-item.c      |   18 ++++---
 gdl/gdl-dock-master.c    |    4 +-
 gdl/gdl-dock-tablabel.c  |  117 +++++++++++++++++++++----------------------
 gdl/gdl-switcher.c       |  122 +++++++++++++++++++++++-----------------------
 gdl/libgdlmarshal.list   |    2 +-
 gdl/test-dock.c          |   49 +++++++++---------
 8 files changed, 173 insertions(+), 209 deletions(-)
---
diff --git a/gdl/gdl-dock-bar.c b/gdl/gdl-dock-bar.c
index 4fcc984..b82310e 100644
--- a/gdl/gdl-dock-bar.c
+++ b/gdl/gdl-dock-bar.c
@@ -307,10 +307,7 @@ gdl_dock_bar_add_item (GdlDockBar  *dockbar,
     button = gtk_button_new ();
     gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
 
-    if (dockbar->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-        box = gtk_hbox_new (FALSE, 0);
-    else
-        box = gtk_vbox_new (FALSE, 0);
+    box = gtk_box_new (dockbar->priv->orientation, 0);
 
     g_object_get (item, "stock-id", &stock_id, "pixbuf-icon", &pixbuf_icon,
                   "long-name", &name, NULL);
@@ -527,7 +524,7 @@ static void gdl_dock_bar_size_vrequest (GtkWidget *widget,
             gboolean fill;
             GtkPackType pack_type;
 
-            gtk_widget_size_request (GTK_WIDGET (child->data), &child_requisition);
+            gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
 
             gtk_box_query_child_packing (box,
                                          child->data,
@@ -667,7 +664,7 @@ static void gdl_dock_bar_size_vallocate (GtkWidget     *widget,
                 {
                     GtkRequisition child_requisition;
 
-                    gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
+                    gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
                     child_height = child_requisition.height + padding * 2;
 
                     if (expand)
@@ -691,7 +688,7 @@ static void gdl_dock_bar_size_vallocate (GtkWidget     *widget,
                 {
                     GtkRequisition child_requisition;
 
-                    gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
+                    gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
                     child_allocation.height = child_requisition.height;
                     child_allocation.y = y + (child_height - child_allocation.height) / 2;
                 }
@@ -722,7 +719,7 @@ static void gdl_dock_bar_size_vallocate (GtkWidget     *widget,
             if ((pack_type == GTK_PACK_END) && gtk_widget_get_visible (GTK_WIDGET (child->data)))
             {
                 GtkRequisition child_requisition;
-                gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
+                gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
 
                 if (gtk_box_get_homogeneous (box))
                 {
@@ -803,7 +800,7 @@ static void gdl_dock_bar_size_hrequest (GtkWidget *widget,
         {
             GtkRequisition child_requisition;
 
-            gtk_widget_size_request (GTK_WIDGET (child->data), &child_requisition);
+            gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
 
             if (gtk_box_get_homogeneous (box))
             {
@@ -938,7 +935,7 @@ static void gdl_dock_bar_size_hallocate (GtkWidget     *widget,
                 {
                     GtkRequisition child_requisition;
 
-                    gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
+                    gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
 
                     child_width = child_requisition.width + padding * 2;
 
@@ -963,7 +960,7 @@ static void gdl_dock_bar_size_hallocate (GtkWidget     *widget,
                 {
                     GtkRequisition child_requisition;
 
-                    gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
+                    gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
                     child_allocation.width = child_requisition.width;
                     child_allocation.x = x + (child_width - child_allocation.width) / 2;
                 }
@@ -997,7 +994,7 @@ static void gdl_dock_bar_size_hallocate (GtkWidget     *widget,
             if ((pack_type == GTK_PACK_END) && gtk_widget_get_visible (GTK_WIDGET (child->data)))
             {
                 GtkRequisition child_requisition;
-                gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
+                gtk_widget_get_preferred_size (GTK_WIDGET (child->data), &child_requisition, NULL);
 
                 if (gtk_box_get_homogeneous (box))
                 {
diff --git a/gdl/gdl-dock-item-grip.c b/gdl/gdl-dock-item-grip.c
index 1bd7fdc..fa563ed 100644
--- a/gdl/gdl-dock-item-grip.c
+++ b/gdl/gdl-dock-item-grip.c
@@ -292,44 +292,6 @@ gdl_dock_item_grip_close_clicked (GtkWidget       *widget,
 }
 
 static void
-gdl_dock_item_grip_fix_iconify_button (GdlDockItemGrip *grip)
-{
-    GtkWidget *iconify_button = grip->priv->iconify_button;
-    GdkWindow *window = NULL;
-    GdkEvent  *event = NULL;
-
-    GdkModifierType modifiers;
-    gint x = 0, y = 0;
-    gboolean ev_ret;
-
-    g_return_if_fail (gtk_widget_get_realized (iconify_button));
-
-    window = gtk_widget_get_parent_window (iconify_button);
-    event = gdk_event_new (GDK_LEAVE_NOTIFY);
-
-    g_assert (GDK_IS_WINDOW (window));
-    gdk_window_get_pointer (window, &x, &y, &modifiers);
-
-    event->crossing.window = g_object_ref (window);
-    event->crossing.send_event = FALSE;
-    event->crossing.subwindow = g_object_ref (window);
-    event->crossing.time = GDK_CURRENT_TIME;
-    event->crossing.x = x;
-    event->crossing.y = y;
-    event->crossing.x_root = event->crossing.y_root = 0;
-    event->crossing.mode = GDK_CROSSING_STATE_CHANGED;
-    event->crossing.detail = GDK_NOTIFY_NONLINEAR;
-    event->crossing.focus = FALSE;
-    event->crossing.state = modifiers;
-
-    //GTK_BUTTON (iconify_button)->in_button = FALSE;
-    g_signal_emit_by_name (iconify_button, "leave-notify-event",
-                           event, &ev_ret, 0);
-
-    gdk_event_free (event);
-}
-
-static void
 gdl_dock_item_grip_iconify_clicked (GtkWidget       *widget,
                                     GdlDockItemGrip *grip)
 {
@@ -337,9 +299,6 @@ gdl_dock_item_grip_iconify_clicked (GtkWidget       *widget,
 
     g_return_if_fail (grip->item != NULL);
 
-    /* Workaround to unhighlight the iconify button. */
-    gdl_dock_item_grip_fix_iconify_button (grip);
-
     parent = gtk_widget_get_parent (GTK_WIDGET (grip->item));
     if (GDL_IS_SWITCHER (parent))
     {
@@ -363,6 +322,12 @@ gdl_dock_item_grip_iconify_clicked (GtkWidget       *widget,
     {
         gdl_dock_item_iconify_item (grip->item);
     }
+
+    /* Workaround to unhighlight the iconify button. See bug #676890
+     * Set button insensitive in order to set priv->in_button = FALSE
+     */
+    gtk_widget_set_state_flags (grip->priv->iconify_button, GTK_STATE_FLAG_INSENSITIVE, TRUE);
+    gtk_widget_set_state_flags (grip->priv->iconify_button, GTK_STATE_FLAG_NORMAL, TRUE);
 }
 
 static void
@@ -469,7 +434,7 @@ gdl_dock_item_grip_realize (GtkWidget *widget)
                                              GDK_HAND2);
         gdk_window_set_cursor (grip->title_window, cursor);
         if (cursor)
-            gdk_cursor_unref (cursor);
+            g_object_unref (cursor);
     }
 }
 
diff --git a/gdl/gdl-dock-item.c b/gdl/gdl-dock-item.c
index 56db7b4..2ce5384 100644
--- a/gdl/gdl-dock-item.c
+++ b/gdl/gdl-dock-item.c
@@ -398,6 +398,7 @@ gdl_dock_item_class_init (GdlDockItemClass *klass)
     /**
      * GdlDockItem::dock-drag-motion:
      * @item: The dock item which is being dragged.
+     * @device: The device used.
      * @x: The x-position that the dock item has been dragged to.
      * @y: The y-position that the dock item has been dragged to.
      *
@@ -410,9 +411,10 @@ gdl_dock_item_class_init (GdlDockItemClass *klass)
                       G_STRUCT_OFFSET (GdlDockItemClass, dock_drag_motion),
                       NULL, /* accumulator */
                       NULL, /* accu_data */
-                      gdl_marshal_VOID__INT_INT,
+                      gdl_marshal_VOID__OBJECT_INT_INT,
                       G_TYPE_NONE,
-                      2,
+                      3,
+                      GDK_TYPE_DEVICE,
                       G_TYPE_INT,
                       G_TYPE_INT);
 
@@ -609,7 +611,7 @@ gdl_dock_item_constructor (GType                  type,
 
         g_object_get (g_object, "long-name", &long_name, "stock-id", &stock_id, NULL);
 
-        hbox = gtk_hbox_new (FALSE, 5);
+        hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
         label = gtk_label_new (long_name);
         icon = gtk_image_new ();
         if (stock_id)
@@ -1002,7 +1004,7 @@ gdl_dock_item_size_allocate (GtkWidget     *widget,
             GtkAllocation grip_alloc = child_allocation;
             GtkRequisition grip_req;
 
-            gtk_widget_size_request (item->priv->grip, &grip_req);
+            gtk_widget_get_preferred_size (item->priv->grip, &grip_req, NULL);
 
             if (item->orientation == GTK_ORIENTATION_HORIZONTAL) {
                 child_allocation.x += grip_req.width;
@@ -1187,7 +1189,7 @@ gdl_dock_item_button_changed (GtkWidget      *widget,
                                                  GDK_FLEUR);
             gdk_window_set_cursor (GDL_DOCK_ITEM_GRIP (item->priv->grip)->title_window,
                                    cursor);
-            gdk_cursor_unref (cursor);
+            g_object_unref (cursor);
 
             event_handled = TRUE;
         };
@@ -1243,7 +1245,7 @@ gdl_dock_item_motion (GtkWidget      *widget,
     new_y = event->y_root;
 
     g_signal_emit (item, gdl_dock_item_signals [DOCK_DRAG_MOTION],
-                   0, new_x, new_y);
+                   0, event->device, new_x, new_y);
 
     return TRUE;
 }
@@ -1705,7 +1707,7 @@ gdl_dock_item_drag_end (GdlDockItem *item,
                                              GDK_HAND2);
         gdk_window_set_cursor (GDL_DOCK_ITEM_GRIP (item->priv->grip)->title_window,
                                cursor);
-        gdk_cursor_unref (cursor);
+        g_object_unref (cursor);
     }
 
     return TRUE;
@@ -1800,7 +1802,7 @@ gdl_dock_item_showhide_grip (GdlDockItem *item)
         gdk_window_set_cursor (GDL_DOCK_ITEM_GRIP (item->priv->grip)->title_window, cursor);
 
     if (cursor)
-        gdk_cursor_unref (cursor);
+        g_object_unref (cursor);
 
     gtk_widget_queue_resize (GTK_WIDGET (item));
 }
diff --git a/gdl/gdl-dock-master.c b/gdl/gdl-dock-master.c
index a9312fe..9eeeff1 100644
--- a/gdl/gdl-dock-master.c
+++ b/gdl/gdl-dock-master.c
@@ -83,6 +83,7 @@ static void     gdl_dock_master_drag_end      (GdlDockItem        *item,
                                                gboolean            cancelled,
                                                gpointer            data);
 static void     gdl_dock_master_drag_motion   (GdlDockItem        *item,
+                                               GdkDevice          *device,
                                                gint                x,
                                                gint                y,
                                                gpointer            data);
@@ -492,6 +493,7 @@ gdl_dock_master_drag_end (GdlDockItem *item,
 
 static void
 gdl_dock_master_drag_motion (GdlDockItem *item,
+                             GdkDevice *device,
                              gint         root_x,
                              gint         root_y,
                              gpointer     data)
@@ -515,7 +517,7 @@ gdl_dock_master_drag_motion (GdlDockItem *item,
     my_request = *request;
 
     /* first look under the pointer */
-    window = gdk_window_at_pointer (&win_x, &win_y);
+    window = gdk_device_get_window_at_position (device, &win_x, &win_y);
     if (window) {
         GtkWidget *widget;
         /* ok, now get the widget who owns that window and see if we can
diff --git a/gdl/gdl-dock-tablabel.c b/gdl/gdl-dock-tablabel.c
index b7dbd1a..b4f6a0d 100644
--- a/gdl/gdl-dock-tablabel.c
+++ b/gdl/gdl-dock-tablabel.c
@@ -58,7 +58,7 @@ static void  gdl_dock_tablabel_get_preferred_height (GtkWidget *widget,
                                                      gint      *natural);
 static void  gdl_dock_tablabel_size_allocate (GtkWidget          *widget,
                                               GtkAllocation      *allocation);
-                                              
+
 static void  gdl_dock_tablabel_paint         (GtkWidget      *widget,
                                               cairo_t *cr);
 static gboolean  gdl_dock_tablabel_draw        (GtkWidget      *widget,
@@ -107,7 +107,7 @@ gdl_dock_tablabel_class_init (GdlDockTablabelClass *klass)
     g_object_class = G_OBJECT_CLASS (klass);
     widget_class = GTK_WIDGET_CLASS (klass);
     container_class = GTK_CONTAINER_CLASS (klass);
-    
+
     g_object_class->set_property = gdl_dock_tablabel_set_property;
     g_object_class->get_property = gdl_dock_tablabel_get_property;
 
@@ -134,7 +134,7 @@ gdl_dock_tablabel_class_init (GdlDockTablabelClass *klass)
         g_signal_new ("button_pressed_handle",
                       G_TYPE_FROM_CLASS (klass),
                       G_SIGNAL_RUN_LAST,
-                      G_STRUCT_OFFSET (GdlDockTablabelClass, 
+                      G_STRUCT_OFFSET (GdlDockTablabelClass,
                                        button_pressed_handle),
                       NULL, NULL,
                       gdl_marshal_VOID__BOXED,
@@ -178,7 +178,7 @@ gdl_dock_tablabel_set_property (GObject      *object,
     switch (prop_id) {
         case PROP_ITEM:
             if (tablabel->item) {
-                g_object_remove_weak_pointer (G_OBJECT (tablabel->item), 
+                g_object_remove_weak_pointer (G_OBJECT (tablabel->item),
                                               (gpointer *) &tablabel->item);
                 g_signal_handlers_disconnect_by_func (
                     tablabel->item, gdl_dock_tablabel_item_notify, tablabel);
@@ -188,8 +188,8 @@ gdl_dock_tablabel_set_property (GObject      *object,
             if (tablabel->item) {
                 gboolean locked;
                 gchar   *long_name;
-                
-                g_object_add_weak_pointer (G_OBJECT (tablabel->item), 
+
+                g_object_add_weak_pointer (G_OBJECT (tablabel->item),
                                            (gpointer *) &tablabel->item);
 
                 g_signal_connect (tablabel->item, "notify::locked",
@@ -210,7 +210,7 @@ gdl_dock_tablabel_set_property (GObject      *object,
 
                 if (locked)
                     tablabel->drag_handle_size = 0;
-                
+
                 bin = GTK_BIN (tablabel);
                 if (gtk_bin_get_child (bin) && g_object_class_find_property (
                     G_OBJECT_GET_CLASS (gtk_bin_get_child (bin)), "label"))
@@ -218,7 +218,7 @@ gdl_dock_tablabel_set_property (GObject      *object,
                 g_free (long_name);
             };
             break;
-            
+
         default:
             G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
             break;
@@ -254,7 +254,7 @@ gdl_dock_tablabel_item_notify (GObject    *master,
     gboolean         locked;
     gchar           *label;
     GtkBin          *bin;
-    
+
     g_object_get (master,
                   "locked", &locked,
                   "grip-size", &tablabel->drag_handle_size,
@@ -344,19 +344,19 @@ gdl_dock_tablabel_size_allocate (GtkWidget     *widget,
     g_return_if_fail (widget != NULL);
     g_return_if_fail (GDL_IS_DOCK_TABLABEL (widget));
     g_return_if_fail (allocation != NULL);
-  
+
     bin = GTK_BIN (widget);
     tablabel = GDL_DOCK_TABLABEL (widget);
 
     border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-  
+
     gtk_widget_set_allocation (widget, allocation);
 
     if (gtk_widget_get_realized (widget))
-        gdk_window_move_resize (tablabel->event_window, 
-                                allocation->x, 
+        gdk_window_move_resize (tablabel->event_window,
+                                allocation->x,
                                 allocation->y,
-                                allocation->width, 
+                                allocation->width,
                                 allocation->height);
 
     if (gtk_bin_get_child (bin) && gtk_widget_get_visible (gtk_bin_get_child (bin))) {
@@ -366,13 +366,13 @@ gdl_dock_tablabel_size_allocate (GtkWidget     *widget,
         child_allocation.x = widget_allocation.x + border_width;
         child_allocation.y = widget_allocation.y + border_width;
 
-        allocation->width = MAX (1, (int) allocation->width - 
+        allocation->width = MAX (1, (int) allocation->width -
                                  (int) tablabel->drag_handle_size);
         child_allocation.x += tablabel->drag_handle_size;
 
-        child_allocation.width = 
+        child_allocation.width =
             MAX (1, (int) allocation->width - 2 * border_width);
-        child_allocation.height = 
+        child_allocation.height =
             MAX (1, (int) allocation->height - 2 * border_width);
 
         gtk_widget_size_allocate (gtk_bin_get_child (bin), &child_allocation);
@@ -398,15 +398,15 @@ gdl_dock_tablabel_paint (GtkWidget      *widget,
     rect.y = widget_allocation.y + border_width;
     rect.width = tablabel->drag_handle_size * HANDLE_RATIO;
     rect.height = widget_allocation.height - 2*border_width;
-    
+
     if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
     {
         GtkStyleContext* context = gtk_widget_get_style_context (widget);
         gtk_style_context_set_state (context,
                                      tablabel->active ? 0 : GTK_STATE_FLAG_ACTIVE);
-        
+
         gtk_render_handle (gtk_widget_get_style_context (widget),
-                           cr, rect.x, rect.y, rect.width, rect.height);                           
+                           cr, rect.x, rect.y, rect.width, rect.height);
     };
 }
 
@@ -422,29 +422,29 @@ gdl_dock_tablabel_draw (GtkWidget      *widget,
         GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->draw (widget, cr);
         gdl_dock_tablabel_paint (widget, cr);
     };
-  
+
     return FALSE;
 }
 
-static gboolean 
+static gboolean
 gdl_dock_tablabel_button_event (GtkWidget      *widget,
                                 GdkEventButton *event)
 {
     GdlDockTablabel *tablabel;
     GtkAllocation    widget_allocation;
     gboolean         event_handled;
-  
+
     g_return_val_if_fail (widget != NULL, FALSE);
     g_return_val_if_fail (GDL_IS_DOCK_TABLABEL (widget), FALSE);
     g_return_val_if_fail (event != NULL, FALSE);
-    
+
     tablabel = GDL_DOCK_TABLABEL (widget);
-    
+
     event_handled = FALSE;
 
     if (event->window != tablabel->event_window)
         return FALSE;
-    
+
     switch (event->type) {
         case GDK_BUTTON_PRESS:
             if (tablabel->active) {
@@ -459,7 +459,7 @@ gdl_dock_tablabel_button_event (GtkWidget      *widget,
                 rel_x = event->x - border_width;
                 rel_y = event->y - border_width;
 
-                /* Check if user clicked on the drag handle. */      
+                /* Check if user clicked on the drag handle. */
                 in_handle = (rel_x < tablabel->drag_handle_size * HANDLE_RATIO) &&
                     (rel_x > 0);
 
@@ -468,12 +468,12 @@ gdl_dock_tablabel_button_event (GtkWidget      *widget,
                     tablabel->drag_start_event = *event;
                 }
                 else {
-                    g_signal_emit (widget, 
+                    g_signal_emit (widget,
                                    dock_tablabel_signals [BUTTON_PRESSED_HANDLE],
                                    0,
                                    event);
                 }
-                
+
                 event_handled = TRUE;
             }
             break;
@@ -485,7 +485,7 @@ gdl_dock_tablabel_button_event (GtkWidget      *widget,
         default:
             break;
     }
-    
+
     if (!event_handled) {
         /* propagate the event to the parent's gdkwindow */
         GdkEventButton e;
@@ -495,32 +495,32 @@ gdl_dock_tablabel_button_event (GtkWidget      *widget,
         gtk_widget_get_allocation (widget, &widget_allocation);
         e.x += widget_allocation.x;
         e.y += widget_allocation.y;
-        
+
         gdk_event_put ((GdkEvent *) &e);
     };
 
     return event_handled;
 }
 
-static gboolean 
+static gboolean
 gdl_dock_tablabel_motion_event (GtkWidget      *widget,
                                 GdkEventMotion *event)
 {
     GdlDockTablabel *tablabel;
     GtkAllocation    widget_allocation;
     gboolean         event_handled;
-  
+
     g_return_val_if_fail (widget != NULL, FALSE);
     g_return_val_if_fail (GDL_IS_DOCK_TABLABEL (widget), FALSE);
     g_return_val_if_fail (event != NULL, FALSE);
-    
+
     tablabel = GDL_DOCK_TABLABEL (widget);
-    
+
     event_handled = FALSE;
 
     if (event->window != tablabel->event_window)
         return FALSE;
-    
+
     if (tablabel->pre_drag) {
         if (gtk_drag_check_threshold (widget,
                                       tablabel->drag_start_event.x,
@@ -528,14 +528,14 @@ gdl_dock_tablabel_motion_event (GtkWidget      *widget,
                                       event->x,
                                       event->y)) {
             tablabel->pre_drag = FALSE;
-            g_signal_emit (widget, 
+            g_signal_emit (widget,
                            dock_tablabel_signals [BUTTON_PRESSED_HANDLE],
                            0,
                            &tablabel->drag_start_event);
             event_handled = TRUE;
         }
     }
-    
+
     if (!event_handled) {
         /* propagate the event to the parent's gdkwindow */
         GdkEventMotion e;
@@ -545,23 +545,23 @@ gdl_dock_tablabel_motion_event (GtkWidget      *widget,
         gtk_widget_get_allocation (widget, &widget_allocation);
         e.x += widget_allocation.x;
         e.y += widget_allocation.y;
-        
+
         gdk_event_put ((GdkEvent *) &e);
     };
 
     return event_handled;
 }
 
-static void   
+static void
 gdl_dock_tablabel_realize (GtkWidget *widget)
 {
     GdlDockTablabel *tablabel;
     GdkWindowAttr attributes;
     GtkAllocation widget_allocation;
     int attributes_mask;
-    
+
     tablabel = GDL_DOCK_TABLABEL (widget);
-    
+
     attributes.window_type = GDK_WINDOW_CHILD;
     gtk_widget_get_allocation (widget, &widget_allocation);
     attributes.x = widget_allocation.x;
@@ -570,53 +570,50 @@ gdl_dock_tablabel_realize (GtkWidget *widget)
     attributes.height = widget_allocation.height;
     attributes.wclass = GDK_INPUT_ONLY;
     attributes.event_mask = gtk_widget_get_events (widget);
-    attributes.event_mask |= (GDK_EXPOSURE_MASK | 
+    attributes.event_mask |= (GDK_EXPOSURE_MASK |
                               GDK_BUTTON_PRESS_MASK |
-                              GDK_BUTTON_RELEASE_MASK | 
-                              GDK_ENTER_NOTIFY_MASK | 
-                              GDK_POINTER_MOTION_MASK | 
+                              GDK_BUTTON_RELEASE_MASK |
+                              GDK_ENTER_NOTIFY_MASK |
+                              GDK_POINTER_MOTION_MASK |
                               GDK_LEAVE_NOTIFY_MASK);
     attributes_mask = GDK_WA_X | GDK_WA_Y;
-    
+
     gtk_widget_set_window (widget, gtk_widget_get_parent_window (widget));
     g_object_ref (gtk_widget_get_window (widget));
-    
-    tablabel->event_window = 
+
+    tablabel->event_window =
         gdk_window_new (gtk_widget_get_parent_window (widget),
                         &attributes, attributes_mask);
     gdk_window_set_user_data (tablabel->event_window, widget);
-   
-    gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget),
-                                                    gtk_widget_get_window (widget)));
-    
+
     gtk_widget_set_realized (widget, TRUE);
 }
 
-static void   
+static void
 gdl_dock_tablabel_unrealize (GtkWidget *widget)
 {
     GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget);
-    
+
     if (tablabel->event_window) {
         gdk_window_set_user_data (tablabel->event_window, NULL);
         gdk_window_destroy (tablabel->event_window);
         tablabel->event_window = NULL;
     }
-    
+
     GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->unrealize (widget);
 }
 
-static void  
+static void
 gdl_dock_tablabel_map (GtkWidget *widget)
 {
     GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget);
 
     GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->map (widget);
-    
+
     gdk_window_show (tablabel->event_window);
 }
 
-static void   
+static void
 gdl_dock_tablabel_unmap (GtkWidget *widget)
 {
     GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget);
@@ -636,7 +633,7 @@ gdl_dock_tablabel_new (GdlDockItem *item)
     tablabel = GDL_DOCK_TABLABEL (g_object_new (GDL_TYPE_DOCK_TABLABEL,
                                                 "item", item,
                                                 NULL));
-    
+
     return GTK_WIDGET (tablabel);
 }
 
diff --git a/gdl/gdl-switcher.c b/gdl/gdl-switcher.c
index 961cf57..0726209 100644
--- a/gdl/gdl-switcher.c
+++ b/gdl/gdl-switcher.c
@@ -21,7 +21,7 @@
  *
  *
  * Copied and adapted from ESidebar.[ch] from evolution
- * 
+ *
  * Authors: Ettore Perazzoli <ettore ximian com>
  *          Naba Kumar  <naba gnome org>
  */
@@ -79,7 +79,7 @@ typedef struct {
 struct _GdlSwitcherPrivate {
     GdlSwitcherStyle switcher_style;
     GdlSwitcherStyle toolbar_style;
-    
+
     gboolean show;
     GSList *buttons;
 
@@ -146,11 +146,11 @@ button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon,
     button->id = id;
     button->page = page;
 
-    g_signal_connect (page, "notify::long-name", G_CALLBACK (gdl_switcher_long_name_changed), 
+    g_signal_connect (page, "notify::long-name", G_CALLBACK (gdl_switcher_long_name_changed),
                       button);
-    g_signal_connect (page, "notify::stock-id", G_CALLBACK (gdl_switcher_stock_id_changed), 
+    g_signal_connect (page, "notify::stock-id", G_CALLBACK (gdl_switcher_stock_id_changed),
                       button);
-    
+
     g_object_ref (button_widget);
     g_object_ref (label);
     g_object_ref (icon);
@@ -168,8 +168,8 @@ button_free (Button *button)
                                           button);
     g_signal_handlers_disconnect_by_func (button->page,
                                           gdl_switcher_stock_id_changed,
-                                          button);    
-    
+                                          button);
+
     g_object_unref (button->button_widget);
     g_object_unref (button->label);
     g_object_unref (button->icon);
@@ -248,7 +248,7 @@ button_toggled_callback (GtkToggleButton *toggle_button,
             id = button->id;
         }
     }
-    
+
     switcher->priv->in_toggle = FALSE;
 
     if (is_active)
@@ -276,9 +276,9 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
     int i;
     int rows_count;
     int last_buttons_height;
-    
+
     last_buttons_height = switcher->priv->buttons_height_request;
-    
+
     GTK_WIDGET_CLASS (gdl_switcher_parent_class)->get_preferred_height (GTK_WIDGET (switcher), &min_height, &nat_height);
 
     y = allocation->y + allocation->height - V_PADDING - 1;
@@ -288,7 +288,7 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
 
     switcher_style = INTERNAL_MODE (switcher);
     icons_only = (switcher_style == GDL_SWITCHER_STYLE_ICON);
-    
+
     /* Figure out the max width and height */
     optimal_layout_width = H_PADDING;
     for (p = switcher->priv->buttons; p != NULL; p = p->next) {
@@ -299,14 +299,14 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
                                        &requisition, NULL);
         optimal_layout_width += requisition.width + H_PADDING;
         max_btn_height = MAX (max_btn_height, requisition.height);
-        max_btn_width = MAX (max_btn_width, requisition.width);    
+        max_btn_width = MAX (max_btn_width, requisition.width);
     }
 
     /* Figure out how many rows and columns we'll use. */
     btns_per_row = allocation->width / (max_btn_width + H_PADDING);
     /* Use at least one column */
     if (btns_per_row == 0) btns_per_row = 1;
-    
+
     /* If all the buttons could fit in the single row, have it so */
     if (allocation->width >= optimal_layout_width)
     {
@@ -324,7 +324,7 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
     rows_count = num_btns / btns_per_row;
     if (num_btns % btns_per_row != 0)
 	rows_count++;
-    
+
     /* Assign buttons to rows */
     rows = g_new0 (GSList *, rows_count);
 
@@ -364,7 +364,7 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
             switcher->priv->buttons_height_request = -1;
         }
     }
-    
+
     /* If it turns out that we now require smaller height for the buttons
      * than it was last time, make a resize request to ensure our
      * size requisition is properly communicated to the parent (otherwise
@@ -375,11 +375,11 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
         gtk_widget_queue_resize (GTK_WIDGET (switcher));
         return -1;
     }
-    
+
     /* Layout the buttons. */
     for (i = row_last; i >= 0; i --) {
         int len, extra_width;
-        
+
         y -= max_btn_height;
 
         /* Check for possible size over flow (taking into account client
@@ -460,10 +460,10 @@ layout_buttons (GdlSwitcher *switcher, GtkAllocation* allocation)
 static void
 do_layout (GdlSwitcher *switcher, GtkAllocation* allocation)
 {
-    
+
     GtkAllocation child_allocation;
     int y;
-    
+
     if (switcher->priv->show) {
         y = layout_buttons (switcher, allocation);
         if (y < 0) /* Layout did not happen and a resize was requested */
@@ -471,13 +471,13 @@ do_layout (GdlSwitcher *switcher, GtkAllocation* allocation)
     }
     else
         y = allocation->y + allocation->height;
-    
+
     /* Place the parent widget.  */
     child_allocation.x = allocation->x;
     child_allocation.y = allocation->y;
     child_allocation.width = allocation->width;
     child_allocation.height = y - allocation->y;
-    
+
     GTK_WIDGET_CLASS (gdl_switcher_parent_class)->size_allocate (GTK_WIDGET (switcher), &child_allocation);
 }
 
@@ -490,8 +490,8 @@ gdl_switcher_forall (GtkContainer *container, gboolean include_internals,
     GdlSwitcher *switcher =
         GDL_SWITCHER (container);
     GSList *p;
-    
-    GTK_CONTAINER_CLASS (gdl_switcher_parent_class)->forall (GTK_CONTAINER (switcher), 
+
+    GTK_CONTAINER_CLASS (gdl_switcher_parent_class)->forall (GTK_CONTAINER (switcher),
                                                              include_internals,
                                                              callback, callback_data);
     if (include_internals) {
@@ -509,7 +509,7 @@ gdl_switcher_remove (GtkContainer *container, GtkWidget *widget)
     GdlSwitcher *switcher =
         GDL_SWITCHER (container);
     GSList *p;
-    
+
     switcher_id = gdl_switcher_get_page_id (widget);
     for (p = switcher->priv->buttons; p != NULL; p = p->next) {
         Button *b = (Button *) p->data;
@@ -534,12 +534,12 @@ gdl_switcher_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natura
     GdlSwitcher *switcher = GDL_SWITCHER (widget);
     GSList *p;
     gint button_height = 0;
-    
+
     GTK_WIDGET_CLASS (gdl_switcher_parent_class)->get_preferred_width (GTK_WIDGET (switcher), minimum, natural);
 
     if (!switcher->priv->show)
         return;
-    
+
     for (p = switcher->priv->buttons; p != NULL; p = p->next) {
         gint button_width;
         Button *button = p->data;
@@ -558,12 +558,12 @@ gdl_switcher_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natur
     GSList *p;
     gint button_min = 0;
     gint button_nat = 0;
- 
+
     GTK_WIDGET_CLASS (gdl_switcher_parent_class)->get_preferred_height (GTK_WIDGET (switcher), minimum, natural);
 
     if (!switcher->priv->show)
         return;
-    
+
     for (p = switcher->priv->buttons; p != NULL; p = p->next) {
         Button *button = p->data;
         gint min, nat;
@@ -609,7 +609,7 @@ gdl_switcher_map (GtkWidget *widget)
 {
     GSList *p;
     GdlSwitcher *switcher = GDL_SWITCHER (widget);
-    
+
     if (switcher->priv->show) {
         for (p = switcher->priv->buttons; p != NULL; p = p->next) {
             GtkWidget *button = ((Button *) p->data)->button_widget;
@@ -661,10 +661,10 @@ static void
 gdl_switcher_dispose (GObject *object)
 {
     GdlSwitcherPrivate *priv = GDL_SWITCHER (object)->priv;
-    
+
 #if HAVE_GNOME
     GConfClient *gconf_client = gconf_client_get_default ();
-    
+
     if (priv->style_changed_id) {
         gconf_client_notify_remove (gconf_client, priv->style_changed_id);
         priv->style_changed_id = 0;
@@ -686,9 +686,9 @@ gdl_switcher_finalize (GObject *object)
 
 /* Signal handlers */
 
-static void 
+static void
 gdl_switcher_notify_cb (GObject *g_object, GParamSpec *pspec,
-                        GdlSwitcher *switcher) 
+                        GdlSwitcher *switcher)
 {
 }
 
@@ -697,7 +697,7 @@ gdl_switcher_switch_page_cb (GtkNotebook *nb, GtkWidget *page_widget,
                              gint page_num, GdlSwitcher *switcher)
 {
     gint             switcher_id;
-    
+
     /* Change switcher button */
     switcher_id = gdl_switcher_get_page_id (page_widget);
     gdl_switcher_select_button (GDL_SWITCHER (switcher), switcher_id);
@@ -712,7 +712,7 @@ gdl_switcher_page_added_cb (GtkNotebook *nb, GtkWidget *page,
     (void)nb;
     (void)page_num;
     switcher_id = gdl_switcher_get_page_id (page);
-    
+
     gdl_switcher_add_button (GDL_SWITCHER (switcher), NULL, NULL, NULL, NULL,
                              switcher_id, page);
     gdl_switcher_select_button (GDL_SWITCHER (switcher), switcher_id);
@@ -770,12 +770,12 @@ gdl_switcher_class_init (GdlSwitcherClass *klass)
     widget_class->size_allocate = gdl_switcher_size_allocate;
     widget_class->draw = gdl_switcher_draw;
     widget_class->map = gdl_switcher_map;
-    
+
     object_class->dispose  = gdl_switcher_dispose;
     object_class->finalize = gdl_switcher_finalize;
     object_class->set_property = gdl_switcher_set_property;
     object_class->get_property = gdl_switcher_get_property;
-    
+
     g_object_class_install_property (
         object_class, PROP_SWITCHER_STYLE,
         g_param_spec_enum ("switcher-style", _("Switcher Style"),
@@ -799,7 +799,7 @@ gdl_switcher_init (GdlSwitcher *switcher)
     GdlSwitcherPrivate *priv;
 
     gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
-  
+
     switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (switcher,
                                                   GDL_TYPE_SWITCHER,
                                                   GdlSwitcherPrivate);
@@ -812,7 +812,7 @@ gdl_switcher_init (GdlSwitcher *switcher)
     gtk_notebook_set_show_tabs (GTK_NOTEBOOK (switcher), FALSE);
     gtk_notebook_set_show_border (GTK_NOTEBOOK (switcher), FALSE);
     gdl_switcher_set_style (switcher, GDL_SWITCHER_STYLE_BOTH);
-    
+
     /* notebook signals */
     g_signal_connect (switcher, "switch-page",
                       G_CALLBACK (gdl_switcher_switch_page_cb), switcher);
@@ -828,7 +828,7 @@ gdl_switcher_new (void)
     return g_object_new (gdl_switcher_get_type (), NULL);
 }
 
-/** 
+/**
  * gdl_switcher_add_button:
  * @switcher: The #GdlSwitcher to which a button will be added
  * @label: The label for the button
@@ -841,7 +841,7 @@ gdl_switcher_new (void)
  * Adds a button to a #GdlSwitcher.  The button icon is taken preferentially
  * from the @stock_id parameter.  If this is %NULL, then the @pixbuf_icon
  * parameter is used.  Failing that, the %GTK_STOCK_NEW stock icon is used.
- * The text label for the button is specified using the @label parameter.  If 
+ * The text label for the button is specified using the @label parameter.  If
  * it is %NUll then a default incrementally numbered label is used instead.
  */
 static void
@@ -856,7 +856,7 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label,
     GtkWidget *icon_widget;
     GtkWidget *label_widget;
     GtkWidget *arrow;
-    
+
     button_widget = gtk_toggle_button_new ();
     gtk_button_set_relief (GTK_BUTTON(button_widget), GTK_RELIEF_HALF);
     if (switcher->priv->show)
@@ -864,7 +864,7 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label,
     g_signal_connect (button_widget, "toggled",
                       G_CALLBACK (button_toggled_callback),
                       switcher);
-    hbox = gtk_hbox_new (FALSE, 3);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
     gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
     gtk_container_add (GTK_CONTAINER (button_widget), hbox);
     gtk_widget_show (hbox);
@@ -878,7 +878,7 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label,
     }
 
     gtk_widget_show (icon_widget);
-    
+
     if (!label) {
         gchar *text = g_strdup_printf ("Item %d", switcher_id);
         label_widget = gtk_label_new (text);
@@ -888,11 +888,11 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label,
     }
     gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
     gtk_widget_show (label_widget);
-    
-    
+
+
     gtk_widget_set_tooltip_text (button_widget,
                                  tooltips);
-    
+
     switch (INTERNAL_MODE (switcher)) {
     case GDL_SWITCHER_STYLE_TEXT:
         gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0);
@@ -909,13 +909,13 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label,
     arrow = gtk_arrow_new (GTK_ARROW_UP, GTK_SHADOW_NONE);
     gtk_widget_show (arrow);
     gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
-    
+
     switcher->priv->buttons =
         g_slist_append (switcher->priv->buttons,
                         button_new (button_widget, label_widget,
                                     icon_widget,
                                     arrow, hbox, switcher_id, page));
-    
+
     gtk_widget_set_parent (button_widget, GTK_WIDGET (switcher));
     gtk_widget_queue_resize (GTK_WIDGET (switcher));
 }
@@ -934,7 +934,7 @@ gdl_switcher_remove_button (GdlSwitcher *switcher, gint switcher_id)
             gtk_container_remove (GTK_CONTAINER (switcher),
                                   button->button_widget);
             break;
-        }            
+        }
     }
     gtk_widget_queue_resize (GTK_WIDGET (switcher));
 }
@@ -944,11 +944,11 @@ static void
 gdl_switcher_select_button (GdlSwitcher *switcher, gint switcher_id)
 {
     update_buttons (switcher, switcher_id);
-    
+
     /* Select the notebook page associated with this button */
     gdl_switcher_select_page (switcher, switcher_id);
 }
-   
+
 
 /**
  * gdl_switcher_insert_page:
@@ -962,10 +962,10 @@ gdl_switcher_select_button (GdlSwitcher *switcher, gint switcher_id)
  * @position: The position at which to create the page
  *
  * Adds a page to a #GdlSwitcher.  A button is created in the switcher, with its
- * icon taken preferentially from the @stock_id parameter.  If this parameter is 
- * %NULL, then the @pixbuf_icon parameter is used.  Failing that, the 
- * %GTK_STOCK_NEW stock icon is used.  The text label for the button is specified 
- * using the @label parameter.  If it is %NUll then a default incrementally 
+ * icon taken preferentially from the @stock_id parameter.  If this parameter is
+ * %NULL, then the @pixbuf_icon parameter is used.  Failing that, the
+ * %GTK_STOCK_NEW stock icon is used.  The text label for the button is specified
+ * using the @label parameter.  If it is %NUll then a default incrementally
  * numbered label is used instead.
  */
 gint
@@ -979,20 +979,20 @@ gdl_switcher_insert_page (GdlSwitcher *switcher, GtkWidget *page,
     g_signal_handlers_block_by_func (switcher,
                                      gdl_switcher_page_added_cb,
                                      switcher);
-    
+
     if (!tab_widget) {
         tab_widget = gtk_label_new (label);
         gtk_widget_show (tab_widget);
     }
     switcher_id = gdl_switcher_get_page_id (page);
     gdl_switcher_add_button (switcher, label, tooltips, stock_id, pixbuf_icon, switcher_id, page);
-    
+
     ret_position = gtk_notebook_insert_page (GTK_NOTEBOOK (switcher), page,
                                              tab_widget, position);
     g_signal_handlers_unblock_by_func (switcher,
                                        gdl_switcher_page_added_cb,
                                        switcher);
-    
+
     return ret_position;
 }
 
@@ -1001,7 +1001,7 @@ set_switcher_style_toolbar (GdlSwitcher *switcher,
                             GdlSwitcherStyle switcher_style)
 {
     GSList *p;
-    
+
     if (switcher_style == GDL_SWITCHER_STYLE_NONE
         || switcher_style == GDL_SWITCHER_STYLE_TABS)
         return;
@@ -1085,7 +1085,7 @@ gdl_switcher_set_show_buttons (GdlSwitcher *switcher, gboolean show)
 
     if (switcher->priv->show == show)
         return;
-    
+
     for (p = switcher->priv->buttons; p != NULL; p = p->next) {
         Button *button = p->data;
 
diff --git a/gdl/libgdlmarshal.list b/gdl/libgdlmarshal.list
index 750989a..685ac9b 100644
--- a/gdl/libgdlmarshal.list
+++ b/gdl/libgdlmarshal.list
@@ -1,7 +1,7 @@
 VOID:VOID
 VOID:ENUM
-VOID:INT,INT
 VOID:UINT,UINT
 VOID:BOOLEAN
+VOID:OBJECT,INT,INT
 VOID:OBJECT,ENUM,BOXED
 VOID:BOXED
diff --git a/gdl/test-dock.c b/gdl/test-dock.c
index 95dbfa7..d58a2c0 100644
--- a/gdl/test-dock.c
+++ b/gdl/test-dock.c
@@ -40,7 +40,7 @@ create_style_button (GtkWidget *dock, GtkWidget *box, GtkWidget *group,
 	GdlSwitcherStyle current_style;
 	GtkWidget *button1;
 	GdlDockMaster *master = GDL_DOCK_OBJECT_GET_MASTER (dock);
-	
+
 	g_object_get (master, "switcher-style", &current_style, NULL);
 	button1 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (group),
 						   style_text);
@@ -62,8 +62,8 @@ create_styles_item (GtkWidget *dock)
 {
 	GtkWidget *vbox1;
 	GtkWidget *group;
-	
-	vbox1 = gtk_vbox_new (FALSE, 0);
+
+	vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_widget_show (vbox1);
 
 	group = create_style_button (dock, vbox1, NULL,
@@ -104,7 +104,7 @@ create_text_item ()
 	GtkWidget *scrolledwindow1;
 	GtkWidget *text;
 
-	vbox1 = gtk_vbox_new (FALSE, 0);
+	vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_widget_show (vbox1);
 
 	scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
@@ -145,13 +145,13 @@ save_layout_cb (GtkWidget *w, gpointer data)
 					      GTK_RESPONSE_OK,
 					      NULL);
 
-	hbox = gtk_hbox_new (FALSE, 8);
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 	gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
 	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), hbox, FALSE, FALSE, 0);
 
 	label = gtk_label_new ("Name:");
 	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-	
+
 	entry = gtk_entry_new ();
 	gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
 
@@ -191,16 +191,16 @@ main (int argc, char **argv)
 	gtk_init (&argc, &argv);
 
 	/*gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);*/
-	
+
         /* window creation */
 	win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-	g_signal_connect (win, "delete_event", 
+	g_signal_connect (win, "delete_event",
 			  G_CALLBACK (gtk_main_quit), NULL);
 	gtk_window_set_title (GTK_WINDOW (win), "Docking widget test");
 	gtk_window_set_default_size (GTK_WINDOW (win), 400, 400);
 
 	/* table */
-        table = gtk_vbox_new (FALSE, 5);
+        table = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
         gtk_container_add (GTK_CONTAINER (win), table);
 	gtk_container_set_border_width (GTK_CONTAINER (table), 10);
 
@@ -214,16 +214,16 @@ main (int argc, char **argv)
 	dockbar = gdl_dock_bar_new (GDL_DOCK (dock));
   gdl_dock_bar_set_style(GDL_DOCK_BAR(dockbar), GDL_DOCK_BAR_TEXT);
 
-	box = gtk_hbox_new (FALSE, 5);
+	box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
 	gtk_box_pack_start (GTK_BOX (table), box, TRUE, TRUE, 0);
 
         gtk_box_pack_start (GTK_BOX (box), dockbar, FALSE, FALSE, 0);
         gtk_box_pack_end (GTK_BOX (box), dock, TRUE, TRUE, 0);
-  
+
 	/* create the dock items */
         item1 = gdl_dock_item_new ("item1", "Item #1", GDL_DOCK_ITEM_BEH_LOCKED);
         gtk_container_add (GTK_CONTAINER (item1), create_text_item ());
-	gdl_dock_add_item (GDL_DOCK (dock), GDL_DOCK_ITEM (item1), 
+	gdl_dock_add_item (GDL_DOCK (dock), GDL_DOCK_ITEM (item1),
 			   GDL_DOCK_TOP);
 	gtk_widget_show (item1);
 
@@ -232,7 +232,7 @@ main (int argc, char **argv)
 					      GDL_DOCK_ITEM_BEH_NORMAL);
 	g_object_set (item2, "resize", FALSE, NULL);
 	gtk_container_add (GTK_CONTAINER (item2), create_styles_item (dock));
-	gdl_dock_add_item (GDL_DOCK (dock), GDL_DOCK_ITEM (item2), 
+	gdl_dock_add_item (GDL_DOCK (dock), GDL_DOCK_ITEM (item2),
 			   GDL_DOCK_RIGHT);
 	gtk_widget_show (item2);
 
@@ -243,7 +243,7 @@ main (int argc, char **argv)
 	name_button = create_item ("Change name");
 	gtk_container_add (GTK_CONTAINER (item3), name_button);
 	g_signal_connect (name_button, "clicked", G_CALLBACK(on_change_name), item3);
-	gdl_dock_add_item (GDL_DOCK (dock), GDL_DOCK_ITEM (item3), 
+	gdl_dock_add_item (GDL_DOCK (dock), GDL_DOCK_ITEM (item3),
 			   GDL_DOCK_BOTTOM);
 	gtk_widget_show (item3);
 
@@ -262,7 +262,7 @@ main (int argc, char **argv)
 						      GDL_DOCK_ITEM_BEH_NORMAL);
 	    gtk_container_add (GTK_CONTAINER (items [i]), create_text_item ());
 	    gtk_widget_show (items [i]);
-	    
+
 	    gdl_dock_object_dock (GDL_DOCK_OBJECT (items [0]),
 				  GDL_DOCK_OBJECT (items [i]),
 				  GDL_DOCK_CENTER, NULL);
@@ -272,38 +272,39 @@ main (int argc, char **argv)
 	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item3), GDL_DOCK_ITEM (item1),
 			       GDL_DOCK_TOP, -1);
 
-	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item2), GDL_DOCK_ITEM (item3), 
+	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item2), GDL_DOCK_ITEM (item3),
 			       GDL_DOCK_RIGHT, -1);
 
-	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item2), GDL_DOCK_ITEM (item3), 
+	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item2), GDL_DOCK_ITEM (item3),
 			       GDL_DOCK_LEFT, -1);
 
-	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item2), NULL, 
+	gdl_dock_item_dock_to (GDL_DOCK_ITEM (item2), NULL,
 			       GDL_DOCK_FLOATING, -1);
-        
-	box = gtk_hbox_new (TRUE, 5);
+
+	box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
+	gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
 	gtk_box_pack_end (GTK_BOX (table), box, FALSE, FALSE, 0);
 
 	button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
 	g_signal_connect (button, "clicked",
 			  G_CALLBACK (save_layout_cb), layout);
 	gtk_box_pack_end (GTK_BOX (box), button, FALSE, TRUE, 0);
-	
+
 	button = gtk_button_new_with_label ("Dump XML");
 	g_signal_connect (button, "clicked",
 			  G_CALLBACK (button_dump_cb), layout);
 	gtk_box_pack_end (GTK_BOX (box), button, FALSE, TRUE, 0);
-	
+
 	gtk_widget_show_all (win);
 
 	gdl_dock_placeholder_new ("ph1", GDL_DOCK_OBJECT (dock), GDL_DOCK_TOP, FALSE);
 	gdl_dock_placeholder_new ("ph2", GDL_DOCK_OBJECT (dock), GDL_DOCK_BOTTOM, FALSE);
 	gdl_dock_placeholder_new ("ph3", GDL_DOCK_OBJECT (dock), GDL_DOCK_LEFT, FALSE);
 	gdl_dock_placeholder_new ("ph4", GDL_DOCK_OBJECT (dock), GDL_DOCK_RIGHT, FALSE);
-	
+
 	gtk_main ();
 
   	g_object_unref (layout);
-	
+
 	return 0;
 }



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