[libegg] Replace the use of some deprecated API.



commit c134eec04b9d8bfcac052c7a64522b52e30838e0
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Oct 29 09:31:16 2010 +0200

    Replace the use of some deprecated API.
    
    Replace most use of gtk_object_sink(), gtk_widget_ref(),
    GTK_WIDGET_SET_FLAGS, GTK_WIDGET_UNSET_FLAGS and gdk_display.

 libegg/dock/egg-dock-item-grip.c           |   14 +-
 libegg/dock/egg-dock-item.c                |  264 ++++++++++++++--------------
 libegg/dock/egg-dock-master.c              |    3 +-
 libegg/dock/egg-dock-notebook.c            |   72 ++++----
 libegg/dock/egg-dock-object.c              |    2 +-
 libegg/dock/egg-dock-placeholder.c         |   98 +++++-----
 libegg/dock/egg-dock-tablabel.c            |  120 +++++++-------
 libegg/dock/egg-dock.c                     |  222 ++++++++++++------------
 libegg/iconchooser/prop-editor.c           |    3 +-
 libegg/treeviewutils/eggcellrendererkeys.c |   76 ++++----
 10 files changed, 434 insertions(+), 440 deletions(-)
---
diff --git a/libegg/dock/egg-dock-item-grip.c b/libegg/dock/egg-dock-item-grip.c
index 5db1535..9ca348a 100644
--- a/libegg/dock/egg-dock-item-grip.c
+++ b/libegg/dock/egg-dock-item-grip.c
@@ -59,7 +59,7 @@ egg_dock_item_grip_expose (GtkWidget      *widget,
 #endif
                       shadow,
                       clip, widget, "dockitem",
-                      rect->x, rect->y, rect->width, rect->height, 
+                      rect->x, rect->y, rect->width, rect->height,
                       grip->item->orientation);
 
 #if GTK_CHECK_VERSION(2,18,0)
@@ -70,18 +70,18 @@ egg_dock_item_grip_expose (GtkWidget      *widget,
         gint focus_width;
         gint focus_pad;
         GdkRectangle focus;
-		
+
         gtk_widget_style_get (GTK_WIDGET (widget),
                               "focus-line-width", &focus_width,
                               "focus-padding", &focus_pad,
-                              NULL); 
-		
+                              NULL);
+
         focus = *rect;
         focus.x += widget->style->xthickness + focus_pad;
         focus.y += widget->style->ythickness + focus_pad;
         focus.width -= 2 * (widget->style->xthickness + focus_pad);
         focus.height -= 2 * (widget->style->xthickness + focus_pad);
-		
+
         gtk_paint_focus (widget->style, widget->window,
 #if GTK_CHECK_VERSION(2,20,0)
                          gtk_widget_get_state (widget),
@@ -116,8 +116,8 @@ egg_dock_item_grip_dispose (GObject *object)
 static void
 egg_dock_item_grip_instance_init (EggDockItemGrip *grip)
 {
-    GTK_WIDGET_SET_FLAGS (grip, GTK_CAN_FOCUS);
-    GTK_WIDGET_SET_FLAGS (grip, GTK_NO_WINDOW);
+    gtk_widget_set_can_focus (GTK_WIDGET (grip), TRUE);
+    gtk_widget_set_has_window (GTK_WIDGET (grip), FALSE);
 }
 
 static gint
diff --git a/libegg/dock/egg-dock-item.c b/libegg/dock/egg-dock-item.c
index 1c38675..ad6d910 100644
--- a/libegg/dock/egg-dock-item.c
+++ b/libegg/dock/egg-dock-item.c
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  *
  * egg-dock-item.c
  *
@@ -9,7 +9,7 @@
  *
  * Copyright (C) 1998 Ettore Perazzoli
  * Copyright (C) 1998 Elliot Lee
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  * All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
@@ -108,7 +108,7 @@ static void     egg_dock_item_dock         (EggDockObject    *object,
                                             EggDockPlacement  position,
                                             GValue           *other_data);
 
-static void  egg_dock_item_popup_menu    (EggDockItem *item, 
+static void  egg_dock_item_popup_menu    (EggDockItem *item,
                                           guint        button,
                                           guint32      time);
 static void  egg_dock_item_drag_start    (EggDockItem *item);
@@ -118,7 +118,7 @@ static void  egg_dock_item_drag_end      (EggDockItem *item,
 static void  egg_dock_item_tab_button    (GtkWidget      *widget,
                                           GdkEventButton *event,
                                           gpointer        data);
-                                          
+
 static void  egg_dock_item_hide_cb       (GtkWidget   *widget,
                                           EggDockItem *item);
 
@@ -173,7 +173,7 @@ struct _EggDockItemPrivate {
     gboolean   grip_shown;
     GtkWidget *grip;
     guint      grip_size;
-    
+
     GtkWidget *tab_label;
 
     gint       preferred_width;
@@ -201,7 +201,7 @@ egg_dock_item_class_init (EggDockItemClass *klass)
     GtkWidgetClass     *widget_class;
     GtkContainerClass  *container_class;
     EggDockObjectClass *object_class;
-    
+
     g_object_class = G_OBJECT_CLASS (klass);
     gtk_object_class = GTK_OBJECT_CLASS (klass);
     widget_class = GTK_WIDGET_CLASS (klass);
@@ -225,12 +225,12 @@ egg_dock_item_class_init (EggDockItemClass *klass)
     widget_class->button_release_event = egg_dock_item_button_changed;
     widget_class->motion_notify_event = egg_dock_item_motion;
     widget_class->key_press_event = egg_dock_item_key_press;
-    
+
     container_class->add = egg_dock_item_add;
     container_class->remove = egg_dock_item_remove;
     container_class->forall = egg_dock_item_forall;
     container_class->child_type = egg_dock_item_child_type;
-    
+
     object_class->is_compound = FALSE;
 
     object_class->dock_request = egg_dock_item_dock_request;
@@ -253,7 +253,7 @@ egg_dock_item_class_init (EggDockItemClass *klass)
     g_value_register_transform_func (EGG_TYPE_DOCK_PARAM, GTK_TYPE_ORIENTATION,
                                      egg_dock_param_import_gtk_orientation);
     /* --- end of registration */
-    
+
     g_object_class_install_property (
         g_object_class, PROP_RESIZE,
         g_param_spec_boolean ("resize", _("Resizable"),
@@ -261,7 +261,7 @@ egg_dock_item_class_init (EggDockItemClass *klass)
                                 "docked in a paned"),
                               TRUE,
                               G_PARAM_READWRITE));
-                                     
+
     g_object_class_install_property (
         g_object_class, PROP_BEHAVIOR,
         g_param_spec_flags ("behavior", _("Item behavior"),
@@ -270,7 +270,7 @@ egg_dock_item_class_init (EggDockItemClass *klass)
                             EGG_TYPE_DOCK_ITEM_BEHAVIOR,
                             EGG_DOCK_ITEM_BEH_NORMAL,
                             G_PARAM_READWRITE));
-                                     
+
     g_object_class_install_property (
         g_object_class, PROP_GRIP_SIZE,
         g_param_spec_uint ("grip_size", _("Grip size"),
@@ -302,8 +302,8 @@ egg_dock_item_class_init (EggDockItemClass *klass)
                           G_PARAM_READWRITE));
 
     /* signals */
-    
-    egg_dock_item_signals [DOCK_DRAG_BEGIN] = 
+
+    egg_dock_item_signals [DOCK_DRAG_BEGIN] =
         g_signal_new ("dock_drag_begin",
                       G_TYPE_FROM_CLASS (klass),
                       G_SIGNAL_RUN_FIRST,
@@ -311,10 +311,10 @@ egg_dock_item_class_init (EggDockItemClass *klass)
                       NULL, /* accumulator */
                       NULL, /* accu_data */
                       _egg_marshal_VOID__VOID,
-                      G_TYPE_NONE, 
+                      G_TYPE_NONE,
                       0);
 
-    egg_dock_item_signals [DOCK_DRAG_MOTION] = 
+    egg_dock_item_signals [DOCK_DRAG_MOTION] =
         g_signal_new ("dock_drag_motion",
                       G_TYPE_FROM_CLASS (klass),
                       G_SIGNAL_RUN_FIRST,
@@ -322,12 +322,12 @@ egg_dock_item_class_init (EggDockItemClass *klass)
                       NULL, /* accumulator */
                       NULL, /* accu_data */
                       _egg_marshal_VOID__INT_INT,
-                      G_TYPE_NONE, 
+                      G_TYPE_NONE,
                       2,
                       G_TYPE_INT,
                       G_TYPE_INT);
 
-    egg_dock_item_signals [DOCK_DRAG_END] = 
+    egg_dock_item_signals [DOCK_DRAG_END] =
         g_signal_new ("dock_drag_end",
                       G_TYPE_FROM_CLASS (klass),
                       G_SIGNAL_RUN_FIRST,
@@ -335,7 +335,7 @@ egg_dock_item_class_init (EggDockItemClass *klass)
                       NULL, /* accumulator */
                       NULL, /* accu_data */
                       _egg_marshal_VOID__BOOLEAN,
-                      G_TYPE_NONE, 
+                      G_TYPE_NONE,
                       1,
                       G_TYPE_BOOLEAN);
 
@@ -349,10 +349,10 @@ egg_dock_item_class_init (EggDockItemClass *klass)
 static void
 egg_dock_item_instance_init (EggDockItem *item)
 {
-    GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (item), GTK_NO_WINDOW);
+    gtk_widget_set_has_window (GTK_WIDGET (item), TRUE);
 
     item->child = NULL;
-    
+
     item->orientation = GTK_ORIENTATION_HORIZONTAL;
     item->behavior = EGG_DOCK_ITEM_BEH_NORMAL;
 
@@ -376,9 +376,9 @@ egg_dock_item_constructor (GType                  type,
                            GObjectConstructParam *construct_param)
 {
     GObject *g_object;
-    
-    g_object = EGG_CALL_PARENT_WITH_DEFAULT (G_OBJECT_CLASS, 
-                                               constructor, 
+
+    g_object = EGG_CALL_PARENT_WITH_DEFAULT (G_OBJECT_CLASS,
+                                               constructor,
                                                (type,
                                                 n_construct_properties,
                                                 construct_param),
@@ -428,7 +428,7 @@ egg_dock_item_set_property  (GObject      *g_object,
                 g_object_notify (g_object, "locked");
                 egg_dock_item_showhide_grip (item);
             }
-            
+
             break;
         }
         case PROP_GRIP_SIZE:
@@ -474,7 +474,7 @@ egg_dock_item_get_property  (GObject      *g_object,
                              GParamSpec   *pspec)
 {
     EggDockItem *item = EGG_DOCK_ITEM (g_object);
-    
+
     switch (prop_id) {
         case PROP_ORIENTATION:
             g_value_set_enum (value, item->orientation);
@@ -510,7 +510,7 @@ egg_dock_item_destroy (GtkObject *object)
 
     if (item->_priv) {
         EggDockItemPrivate *priv = item->_priv;
-        
+
         if (priv->tab_label) {
             egg_dock_item_set_tablabel (item, NULL);
         };
@@ -526,7 +526,7 @@ egg_dock_item_destroy (GtkObject *object)
             g_object_unref (priv->ph);
             priv->ph = NULL;
         }
-        
+
         item->_priv = NULL;
         g_free (priv);
     }
@@ -534,12 +534,12 @@ egg_dock_item_destroy (GtkObject *object)
     EGG_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
 }
 
-static void 
+static void
 egg_dock_item_add (GtkContainer *container,
                    GtkWidget    *widget)
 {
     EggDockItem *item;
-    
+
     g_return_if_fail (EGG_IS_DOCK_ITEM (container));
 
     item = EGG_DOCK_ITEM (container);
@@ -564,15 +564,15 @@ egg_dock_item_add (GtkContainer *container,
     item->child = widget;
 }
 
-static void  
+static void
 egg_dock_item_remove (GtkContainer *container,
                       GtkWidget    *widget)
 {
     EggDockItem *item;
     gboolean     was_visible;
-    
+
     g_return_if_fail (EGG_IS_DOCK_ITEM (container));
-    
+
     item = EGG_DOCK_ITEM (container);
     if (item->_priv && widget == item->_priv->grip) {
 #if GTK_CHECK_VERSION(2,20,0)
@@ -586,13 +586,13 @@ egg_dock_item_remove (GtkContainer *container,
             gtk_widget_queue_resize (GTK_WIDGET (item));
         return;
     }
-    
+
     if (EGG_DOCK_ITEM_IN_DRAG (item)) {
         egg_dock_item_drag_end (item, TRUE);
     }
-    
+
     g_return_if_fail (item->child == widget);
-    
+
 #if GTK_CHECK_VERSION(2,20,0)
     was_visible = gtk_widget_get_visible (widget);
 #else
@@ -601,7 +601,7 @@ egg_dock_item_remove (GtkContainer *container,
 
     gtk_widget_unparent (widget);
     item->child = NULL;
-    
+
     if (was_visible)
         gtk_widget_queue_resize (GTK_WIDGET (container));
 }
@@ -613,12 +613,12 @@ egg_dock_item_forall (GtkContainer *container,
                       gpointer      callback_data)
 {
     EggDockItem *item = (EggDockItem *) container;
-    
+
     g_return_if_fail (callback != NULL);
-    
+
     if (include_internals && item->_priv->grip)
         (* callback) (item->_priv->grip, callback_data);
-    
+
     if (item->child)
         (* callback) (item->child, callback_data);
 }
@@ -627,7 +627,7 @@ static GType
 egg_dock_item_child_type (GtkContainer *container)
 {
     g_return_val_if_fail (EGG_IS_DOCK_ITEM (container), G_TYPE_NONE);
-    
+
     if (!EGG_DOCK_ITEM (container)->child)
         return GTK_TYPE_WIDGET;
     else
@@ -656,7 +656,7 @@ egg_dock_item_size_request (GtkWidget      *widget,
     }
 
     if (item->orientation == GTK_ORIENTATION_HORIZONTAL) {
-        requisition->width = 
+        requisition->width =
             EGG_DOCK_ITEM_GRIP_SHOWN (item) ? item->_priv->grip_size : 0;
         if (item->child) {
             requisition->width += child_requisition.width;
@@ -664,7 +664,7 @@ egg_dock_item_size_request (GtkWidget      *widget,
         } else
             requisition->height = 0;
     } else {
-        requisition->height = 
+        requisition->height =
             EGG_DOCK_ITEM_GRIP_SHOWN (item) ? item->_priv->grip_size : 0;
         if (item->child) {
             requisition->width = child_requisition.width;
@@ -684,10 +684,10 @@ egg_dock_item_size_allocate (GtkWidget     *widget,
                              GtkAllocation *allocation)
 {
     EggDockItem *item;
-  
+
     g_return_if_fail (EGG_IS_DOCK_ITEM (widget));
     g_return_if_fail (allocation != NULL);
-  
+
     item = EGG_DOCK_ITEM (widget);
 
     widget->allocation = *allocation;
@@ -717,18 +717,18 @@ egg_dock_item_size_allocate (GtkWidget     *widget,
         child_allocation.y = border_width;
         child_allocation.width = allocation->width - 2 * border_width;
         child_allocation.height = allocation->height - 2 * border_width;
-        
+
         if (EGG_DOCK_ITEM_GRIP_SHOWN (item)) {
             GtkAllocation grip_alloc = *allocation;
-            
+
             grip_alloc.x = grip_alloc.y = 0;
-            
+
             if (item->orientation == GTK_ORIENTATION_HORIZONTAL) {
                 child_allocation.width -= item->_priv->grip_size;
                 grip_alloc.width = item->_priv->grip_size;
                 if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
                     grip_alloc.x = child_allocation.x + child_allocation.width;
-                else 
+                else
                     child_allocation.x += item->_priv->grip_size;
             } else {
                 child_allocation.y += item->_priv->grip_size;
@@ -750,7 +750,7 @@ egg_dock_item_map (GtkWidget *widget)
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK_ITEM (widget));
 
-    GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
+    gtk_widget_set_mapped (widget, TRUE);
 
     item = EGG_DOCK_ITEM (widget);
 
@@ -785,8 +785,8 @@ egg_dock_item_unmap (GtkWidget *widget)
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK_ITEM (widget));
 
-    GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
-    
+    gtk_widget_set_mapped (widget, FALSE);
+
     item = EGG_DOCK_ITEM (widget);
 
     gdk_window_hide (widget->window);
@@ -807,7 +807,7 @@ egg_dock_item_realize (GtkWidget *widget)
 
     item = EGG_DOCK_ITEM (widget);
 
-    GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+    gtk_widget_set_realized (widget, TRUE);
 
     /* widget window */
     attributes.x = widget->allocation.x;
@@ -824,23 +824,23 @@ egg_dock_item_realize (GtkWidget *widget)
                              GDK_BUTTON_PRESS_MASK |
                              GDK_BUTTON_RELEASE_MASK);
     attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-    widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), 
+    widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
                                      &attributes, attributes_mask);
     gdk_window_set_user_data (widget->window, widget);
-  
+
     widget->style = gtk_style_attach (widget->style, widget->window);
 #if GTK_CHECK_VERSION(2,20,0)
-    gtk_style_set_background (widget->style, widget->window, 
+    gtk_style_set_background (widget->style, widget->window,
                               gtk_widget_get_state (GTK_WIDGET (item)));
 #else
-    gtk_style_set_background (widget->style, widget->window, 
+    gtk_style_set_background (widget->style, widget->window,
                               GTK_WIDGET_STATE (item));
 #endif
     gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
 
     if (item->child)
         gtk_widget_set_parent_window (item->child, widget->window);
-    
+
     if (item->_priv->grip)
         gtk_widget_set_parent_window (item->_priv->grip, widget->window);
 }
@@ -906,7 +906,7 @@ egg_dock_item_expose (GtkWidget      *widget,
         egg_dock_item_paint (widget, event);
         EGG_CALL_PARENT (GTK_WIDGET_CLASS, expose_event, (widget, event));
     }
-  
+
     return FALSE;
 }
 
@@ -920,24 +920,24 @@ egg_dock_item_button_changed (GtkWidget      *widget,
     EggDockItem *item;
     gboolean     event_handled;
     gboolean     in_handle;
-  
+
     g_return_val_if_fail (widget != NULL, FALSE);
     g_return_val_if_fail (EGG_IS_DOCK_ITEM (widget), FALSE);
     g_return_val_if_fail (event != NULL, FALSE);
-    
+
     item = EGG_DOCK_ITEM (widget);
-    
+
     if (!(event->window == widget->window ||
           EVENT_IN_TABLABEL_EVENT_WINDOW (event, item->_priv->tab_label)))
         return FALSE;
-    
+
     /* Verify that the item is not locked. */
     if (!EGG_DOCK_ITEM_NOT_LOCKED (item))
         return FALSE;
 
     event_handled = FALSE;
 
-    /* Check if user clicked on the drag handle. */      
+    /* Check if user clicked on the drag handle. */
     switch (item->orientation) {
     case GTK_ORIENTATION_HORIZONTAL:
         if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
@@ -955,16 +955,16 @@ egg_dock_item_button_changed (GtkWidget      *widget,
 
     /* Left mousebutton click on dockitem. */
     if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
-        /* Set in_drag flag, grab pointer and call begin drag operation. */      
+        /* Set in_drag flag, grab pointer and call begin drag operation. */
         if (in_handle) {
             item->_priv->start_x = event->x;
             item->_priv->start_y = event->y;
 
             EGG_DOCK_ITEM_SET_FLAGS (item, EGG_DOCK_IN_PREDRAG);
-        
+
             event_handled = TRUE;
         };
-        
+
     } else if (event->type == GDK_BUTTON_RELEASE && event->button == 1) {
         if (EGG_DOCK_ITEM_IN_DRAG (item)) {
             /* User dropped widget somewhere. */
@@ -975,10 +975,10 @@ egg_dock_item_button_changed (GtkWidget      *widget,
             EGG_DOCK_ITEM_UNSET_FLAGS (item, EGG_DOCK_IN_PREDRAG);
             event_handled = TRUE;
         }
-             
+
     } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS && in_handle) {
         egg_dock_item_popup_menu (item, event->button, event->time);
-        event_handled = TRUE;    	
+        event_handled = TRUE;
     }
 
     return event_handled;
@@ -1014,14 +1014,14 @@ egg_dock_item_motion (GtkWidget      *widget,
             egg_dock_item_drag_start (item);
         }
     }
-    
+
     if (!EGG_DOCK_ITEM_IN_DRAG (item))
         return FALSE;
 
     new_x = event->x_root;
     new_y = event->y_root;
-    
-    g_signal_emit (item, egg_dock_item_signals [DOCK_DRAG_MOTION], 
+
+    g_signal_emit (item, egg_dock_item_signals [DOCK_DRAG_MOTION],
                    0, new_x, new_y);
 
     return TRUE;
@@ -1032,7 +1032,7 @@ egg_dock_item_key_press (GtkWidget   *widget,
                          GdkEventKey *event)
 {
     gboolean event_handled = FALSE;
-    
+
     if (EGG_DOCK_ITEM_IN_DRAG (widget)) {
         if (event->keyval == GDK_Escape) {
             egg_dock_item_drag_end (EGG_DOCK_ITEM (widget), TRUE);
@@ -1059,10 +1059,10 @@ egg_dock_item_dock_request (EggDockObject  *object,
     gint           rel_x, rel_y;
 
     /* we get (x,y) in our allocation coordinates system */
-    
+
     /* Get item's allocation. */
     alloc = &(GTK_WIDGET (object)->allocation);
-    
+
     /* Get coordinates relative to our window. */
     rel_x = x - alloc->x;
     rel_y = y - alloc->y;
@@ -1073,11 +1073,11 @@ egg_dock_item_dock_request (EggDockObject  *object,
         float rx, ry;
         GtkRequisition my, other;
         gint divider = -1;
-        
+
         /* this are for calculating the extra docking parameter */
         egg_dock_item_preferred_size (EGG_DOCK_ITEM (request->applicant), &other);
         egg_dock_item_preferred_size (EGG_DOCK_ITEM (object), &my);
-        
+
         /* Calculate location in terms of the available space (0-100%). */
         rx = (float) rel_x / alloc->width;
         ry = (float) rel_y / alloc->height;
@@ -1144,8 +1144,8 @@ egg_dock_item_dock_request (EggDockObject  *object,
            origin as our window */
         request->rect.x += alloc->x;
         request->rect.y += alloc->y;
-        
-        /* Set possible target location and return TRUE. */            
+
+        /* Set possible target location and return TRUE. */
         request->target = object;
 
         /* fill-in other dock information */
@@ -1155,10 +1155,10 @@ egg_dock_item_dock_request (EggDockObject  *object,
             g_value_init (&request->extra, G_TYPE_UINT);
             g_value_set_uint (&request->extra, (guint) divider);
         }
-        
-        return TRUE;         
+
+        return TRUE;
     }
-    else /* No docking possible at this location. */            
+    else /* No docking possible at this location. */
         return FALSE;
 }
 
@@ -1170,7 +1170,7 @@ egg_dock_item_dock (EggDockObject    *object,
 {
     EggDockObject *new_parent, *parent;
     gboolean       add_ourselves_first;
-    
+
     parent = egg_dock_object_get_parent_object (object);
 
     switch (position) {
@@ -1194,12 +1194,12 @@ egg_dock_item_dock (EggDockObject    *object,
                                        NULL);
             add_ourselves_first = TRUE;
             break;
-        default: 
+        default:
         {
             GEnumClass *enum_class = G_ENUM_CLASS (g_type_class_ref (EGG_TYPE_DOCK_PLACEMENT));
             GEnumValue *enum_value = g_enum_get_value (enum_class, position);
             gchar *name = enum_value ? enum_value->value_name : NULL;
-            
+
             g_warning (_("Unsupported docking strategy %s in dock object of type %s"),
                        name,  G_OBJECT_TYPE_NAME (object));
             g_type_class_unref (enum_class);
@@ -1219,10 +1219,10 @@ egg_dock_item_dock (EggDockObject    *object,
     /* freeze the new parent, so reduce won't get called before it's
        actually added to our parent */
     egg_dock_object_freeze (new_parent);
-    
+
     /* bind the new parent to our master, so the following adds work */
     egg_dock_object_bind (new_parent, G_OBJECT (EGG_DOCK_OBJECT_GET_MASTER (object)));
-    
+
     /* add the objects */
     if (add_ourselves_first) {
         gtk_container_add (GTK_CONTAINER (new_parent), GTK_WIDGET (object));
@@ -1243,16 +1243,16 @@ egg_dock_item_dock (EggDockObject    *object,
     if (GTK_WIDGET_VISIBLE (object))
 #endif
         gtk_widget_show (GTK_WIDGET (new_parent));
-    
+
     /* use extra docking parameter */
     if (position != EGG_DOCK_CENTER && other_data &&
         G_VALUE_HOLDS (other_data, G_TYPE_UINT)) {
-        
+
         g_object_set (G_OBJECT (new_parent),
                       "position", g_value_get_uint (other_data),
                       NULL);
     }
-    
+
     EGG_DOCK_OBJECT_UNSET_FLAGS (object, EGG_DOCK_IN_REFLOW);
     g_object_unref (object);
 
@@ -1266,13 +1266,13 @@ egg_dock_item_detach_menu (GtkWidget *widget,
                            GtkMenu   *menu)
 {
     EggDockItem *item;
-   
+
     item = EGG_DOCK_ITEM (widget);
     item->_priv->menu = NULL;
 }
 
 static void
-egg_dock_item_popup_menu (EggDockItem  *item, 
+egg_dock_item_popup_menu (EggDockItem  *item,
                           guint         button,
                           guint32       time)
 {
@@ -1284,11 +1284,11 @@ egg_dock_item_popup_menu (EggDockItem  *item,
         gtk_menu_attach_to_widget (GTK_MENU (item->_priv->menu),
                                    GTK_WIDGET (item),
                                    egg_dock_item_detach_menu);
-        
+
         /* Hide menuitem. */
         mitem = gtk_menu_item_new_with_label (_("Hide"));
         gtk_menu_shell_append (GTK_MENU_SHELL (item->_priv->menu), mitem);
-        g_signal_connect (mitem, "activate", 
+        g_signal_connect (mitem, "activate",
                           G_CALLBACK (egg_dock_item_hide_cb), item);
 
         /* Lock menuitem */
@@ -1301,7 +1301,7 @@ egg_dock_item_popup_menu (EggDockItem  *item,
 
     /* Show popup menu. */
     gtk_widget_show_all (item->_priv->menu);
-    gtk_menu_popup (GTK_MENU (item->_priv->menu), NULL, NULL, NULL, NULL, 
+    gtk_menu_popup (GTK_MENU (item->_priv->menu), NULL, NULL, NULL, NULL,
                     button, time);
 }
 
@@ -1316,17 +1316,17 @@ egg_dock_item_drag_start (EggDockItem *item)
     if (!GTK_WIDGET_REALIZED (item))
 #endif
         gtk_widget_realize (GTK_WIDGET (item));
-    
+
     EGG_DOCK_ITEM_SET_FLAGS (item, EGG_DOCK_IN_DRAG);
-            
+
     /* grab the pointer so we receive all mouse events */
     fleur = gdk_cursor_new (GDK_FLEUR);
 
     /* grab the keyboard & pointer */
     gtk_grab_add (GTK_WIDGET (item));
-    
+
     gdk_cursor_unref (fleur);
-            
+
     g_signal_emit (item, egg_dock_item_signals [DOCK_DRAG_BEGIN], 0);
 }
 
@@ -1336,13 +1336,13 @@ egg_dock_item_drag_end (EggDockItem *item,
 {
     /* Release pointer & keyboard. */
     gtk_grab_remove (gtk_grab_get_current ());
-    
+
     g_signal_emit (item, egg_dock_item_signals [DOCK_DRAG_END], 0, cancel);
-    
+
     EGG_DOCK_ITEM_UNSET_FLAGS (item, EGG_DOCK_IN_DRAG);
 }
 
-static void 
+static void
 egg_dock_item_tab_button (GtkWidget      *widget,
                           GdkEventButton *event,
                           gpointer        data)
@@ -1356,7 +1356,7 @@ egg_dock_item_tab_button (GtkWidget      *widget,
 
     switch (event->button) {
     case 1:
-        /* set dragoff_{x,y} as we the user clicked on the middle of the 
+        /* set dragoff_{x,y} as we the user clicked on the middle of the
            drag handle */
         switch (item->orientation) {
         case GTK_ORIENTATION_HORIZONTAL:
@@ -1381,11 +1381,11 @@ egg_dock_item_tab_button (GtkWidget      *widget,
 }
 
 static void
-egg_dock_item_hide_cb (GtkWidget   *widget, 
+egg_dock_item_hide_cb (GtkWidget   *widget,
                        EggDockItem *item)
 {
     EggDockMaster *master;
-    
+
     g_return_if_fail (item != NULL);
 
     master = EGG_DOCK_OBJECT_GET_MASTER (item);
@@ -1407,10 +1407,10 @@ egg_dock_item_showhide_grip (EggDockItem *item)
     if (item->_priv->grip) {
         if (EGG_DOCK_ITEM_GRIP_SHOWN (item)) {
             gtk_widget_show (item->_priv->grip);
-            GTK_WIDGET_SET_FLAGS (item->_priv->grip, GTK_CAN_FOCUS);
+            gtk_widget_set_can_focus (item->_priv->grip, TRUE);
         } else {
             gtk_widget_hide (item->_priv->grip);
-            GTK_WIDGET_UNSET_FLAGS (item->_priv->grip, GTK_CAN_FOCUS);
+            gtk_widget_set_can_focus (item->_priv->grip, FALSE);
         }
     }
     gtk_widget_queue_resize (GTK_WIDGET (item));
@@ -1421,7 +1421,7 @@ egg_dock_item_real_set_orientation (EggDockItem    *item,
                                     GtkOrientation  orientation)
 {
     item->orientation = orientation;
-    
+
 #if GTK_CHECK_VERSION(2,18,0)
     if (gtk_widget_is_drawable (item))
 #else
@@ -1441,8 +1441,8 @@ egg_dock_item_new (const gchar         *name,
 {
     EggDockItem *item;
 
-    item = EGG_DOCK_ITEM (g_object_new (EGG_TYPE_DOCK_ITEM, 
-                                        "name", name, 
+    item = EGG_DOCK_ITEM (g_object_new (EGG_TYPE_DOCK_ITEM,
+                                        "name", name,
                                         "long_name", long_name,
                                         "behavior", behavior,
                                         NULL));
@@ -1462,17 +1462,17 @@ egg_dock_item_dock_to (EggDockItem      *item,
     g_return_if_fail (item != NULL);
     g_return_if_fail (item != target);
     g_return_if_fail (target != NULL || position == EGG_DOCK_FLOATING);
-    
+
     if (position == EGG_DOCK_FLOATING || !target) {
         EggDockObject *controller;
-        
+
         if (!egg_dock_object_is_bound (EGG_DOCK_OBJECT (item))) {
             g_warning (_("Attempt to bind an unbound item %p"), item);
             return;
         }
 
         controller = egg_dock_master_get_controller (EGG_DOCK_OBJECT_GET_MASTER (item));
-        
+
         /* FIXME: save previous docking position for later
            re-docking... does this make sense now? */
 
@@ -1535,13 +1535,12 @@ egg_dock_item_set_tablabel (EggDockItem *item,
                                                   NULL, item);
             g_object_set (item->_priv->tab_label, "item", NULL, NULL);
         }
-        gtk_widget_unref (item->_priv->tab_label);
+        g_object_unref (item->_priv->tab_label);
         item->_priv->tab_label = NULL;
     }
-    
+
     if (tablabel) {
-        gtk_widget_ref (tablabel);
-        gtk_object_sink (GTK_OBJECT (tablabel));
+        g_object_ref_sink (tablabel);
         item->_priv->tab_label = tablabel;
         if (EGG_IS_DOCK_TABLABEL (tablabel)) {
             g_object_set (tablabel, "item", item, NULL);
@@ -1552,7 +1551,7 @@ egg_dock_item_set_tablabel (EggDockItem *item,
     }
 }
 
-void 
+void
 egg_dock_item_hide_grip (EggDockItem *item)
 {
     g_return_if_fail (item != NULL);
@@ -1579,7 +1578,7 @@ egg_dock_item_bind (EggDockItem *item,
 {
     g_return_if_fail (item != NULL);
     g_return_if_fail (dock == NULL || EGG_IS_DOCK (dock));
-    
+
     egg_dock_object_bind (EGG_DOCK_OBJECT (item),
                           G_OBJECT (EGG_DOCK_OBJECT_GET_MASTER (dock)));
 }
@@ -1601,30 +1600,29 @@ egg_dock_item_hide_item (EggDockItem *item)
     if (!EGG_DOCK_OBJECT_ATTACHED (item))
         /* already hidden/detached */
         return;
-    
+
     /* if the object is manual, create a new placeholder to be able to
        restore the position later */
     if (!EGG_DOCK_OBJECT_AUTOMATIC (item)) {
         if (item->_priv->ph)
             g_object_unref (item->_priv->ph);
-        
+
         item->_priv->ph = EGG_DOCK_PLACEHOLDER (
             g_object_new (EGG_TYPE_DOCK_PLACEHOLDER,
                           "sticky", FALSE,
                           "host", item,
                           NULL));
-        g_object_ref (item->_priv->ph);
-        gtk_object_sink (GTK_OBJECT (item->_priv->ph));
+        g_object_ref_sink (item->_priv->ph);
     }
-    
+
     egg_dock_object_freeze (EGG_DOCK_OBJECT (item));
-    
+
     /* hide our children first, so they can also set placeholders */
-    if (egg_dock_object_is_compound (EGG_DOCK_OBJECT (item))) 
+    if (egg_dock_object_is_compound (EGG_DOCK_OBJECT (item)))
         gtk_container_foreach (GTK_CONTAINER (item),
                                (GtkCallback) egg_dock_item_hide_item,
                                NULL);
-    
+
     /* detach the item recursively */
     egg_dock_object_detach (EGG_DOCK_OBJECT (item), TRUE);
 
@@ -1663,7 +1661,7 @@ egg_dock_item_unlock (EggDockItem *item)
     g_object_set (item, "locked", FALSE, NULL);
 }
 
-void 
+void
 egg_dock_item_set_default_position (EggDockItem   *item,
                                     EggDockObject *reference)
 {
@@ -1676,8 +1674,7 @@ egg_dock_item_set_default_position (EggDockItem   *item,
 
     if (reference && EGG_DOCK_OBJECT_ATTACHED (reference)) {
         if (EGG_IS_DOCK_PLACEHOLDER (reference)) {
-            g_object_ref (reference);
-            gtk_object_sink (GTK_OBJECT (reference));
+            g_object_ref_sink (reference);;
             item->_priv->ph = EGG_DOCK_PLACEHOLDER (reference);
         }
         else {
@@ -1686,13 +1683,12 @@ egg_dock_item_set_default_position (EggDockItem   *item,
                               "sticky", TRUE,
                               "host", reference,
                               NULL));
-            g_object_ref (item->_priv->ph);
-            gtk_object_sink (GTK_OBJECT (item->_priv->ph));
+            g_object_ref_sink (item->_priv->ph);
         }
     }
 }
 
-void 
+void
 egg_dock_item_preferred_size (EggDockItem    *item,
                               GtkRequisition *req)
 {
@@ -1708,7 +1704,7 @@ egg_dock_item_preferred_size (EggDockItem    *item,
 
 /* ----- gtk orientation type exporter/importer ----- */
 
-static void 
+static void
 egg_dock_param_export_gtk_orientation (const GValue *src,
                                        GValue       *dst)
 {
@@ -1717,7 +1713,7 @@ egg_dock_param_export_gtk_orientation (const GValue *src,
                          "horizontal" : "vertical");
 }
 
-static void 
+static void
 egg_dock_param_import_gtk_orientation (const GValue *src,
                                        GValue       *dst)
 {
diff --git a/libegg/dock/egg-dock-master.c b/libegg/dock/egg-dock-master.c
index 128e88b..ea0578e 100644
--- a/libegg/dock/egg-dock-master.c
+++ b/libegg/dock/egg-dock-master.c
@@ -743,8 +743,7 @@ egg_dock_master_add (EggDockMaster *master,
                        master, object, object->name, found_object);
         }
         else {
-            g_object_ref (object);
-            gtk_object_sink (GTK_OBJECT (object));
+            g_object_ref_sink (object);
             g_hash_table_insert (master->dock_objects, g_strdup (object->name), object);
         }
     }
diff --git a/libegg/dock/egg-dock-notebook.c b/libegg/dock/egg-dock-notebook.c
index 703a775..3ff3b68 100644
--- a/libegg/dock/egg-dock-notebook.c
+++ b/libegg/dock/egg-dock-notebook.c
@@ -16,7 +16,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.  
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -63,13 +63,13 @@ static void  egg_dock_notebook_dock          (EggDockObject    *object,
                                               GValue           *other_data);
 
 static void  egg_dock_notebook_switch_page_cb  (GtkNotebook     *nb,
-                                                GtkNotebookPage *page,
+                                                GtkWidget       *page,
                                                 gint             page_num,
                                                 gpointer         data);
 
 static void  egg_dock_notebook_set_orientation (EggDockItem     *item,
                                                 GtkOrientation   orientation);
-					       
+
 static gboolean egg_dock_notebook_child_placement (EggDockObject    *object,
                                                    EggDockObject    *child,
                                                    EggDockPlacement *placement);
@@ -114,22 +114,22 @@ egg_dock_notebook_class_init (EggDockNotebookClass *klass)
 
     g_object_class->set_property = egg_dock_notebook_set_property;
     g_object_class->get_property = egg_dock_notebook_get_property;
-    
+
     gtk_object_class->destroy = egg_dock_notebook_destroy;
 
     container_class->add = egg_dock_notebook_add;
     container_class->forall = egg_dock_notebook_forall;
     container_class->child_type = egg_dock_notebook_child_type;
-    
+
     object_class->is_compound = TRUE;
     object_class->dock = egg_dock_notebook_dock;
     object_class->child_placement = egg_dock_notebook_child_placement;
     object_class->present = egg_dock_notebook_present;
     object_class->reorder = egg_dock_notebook_reorder;
-    
+
     item_class->has_grip = TRUE;
-    item_class->set_orientation = egg_dock_notebook_set_orientation;    
-    
+    item_class->set_orientation = egg_dock_notebook_set_orientation;
+
     g_object_class_install_property (
         g_object_class, PROP_PAGE,
         g_param_spec_int ("page", _("Page"),
@@ -140,10 +140,10 @@ egg_dock_notebook_class_init (EggDockNotebookClass *klass)
                           EGG_DOCK_PARAM_EXPORT | EGG_DOCK_PARAM_AFTER));
 }
 
-static void 
+static void
 egg_dock_notebook_notify_cb (GObject    *g_object,
                              GParamSpec *pspec,
-                             gpointer    user_data) 
+                             gpointer    user_data)
 {
     g_return_if_fail (user_data != NULL && EGG_IS_DOCK_NOTEBOOK (user_data));
 
@@ -151,7 +151,7 @@ egg_dock_notebook_notify_cb (GObject    *g_object,
     g_object_notify (G_OBJECT (user_data), pspec->name);
 }
 
-static gboolean 
+static gboolean
 egg_dock_notebook_button_cb (GtkWidget      *widget,
                              GdkEventButton *event,
                              gpointer        user_data)
@@ -163,7 +163,7 @@ egg_dock_notebook_button_cb (GtkWidget      *widget,
 
     return FALSE;
 }
-    
+
 static void
 egg_dock_notebook_instance_init (EggDockNotebook *notebook)
 {
@@ -179,7 +179,7 @@ egg_dock_notebook_instance_init (EggDockNotebook *notebook)
     else
       {
 	if (gtk_widget_get_direction (GTK_WIDGET (item->child)) == GTK_TEXT_DIR_RTL)
-	  
+
 	  gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_RIGHT);
 	else
 	  gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_LEFT);
@@ -196,7 +196,7 @@ egg_dock_notebook_instance_init (EggDockNotebook *notebook)
     gtk_widget_show (item->child);
 }
 
-static void 
+static void
 egg_dock_notebook_set_property (GObject      *object,
                                 guint         prop_id,
                                 const GValue *value,
@@ -210,7 +210,7 @@ egg_dock_notebook_set_property (GObject      *object,
                 gtk_notebook_set_current_page (GTK_NOTEBOOK (item->child),
                                                g_value_get_int (value));
             }
-            
+
             break;
         default:
             G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -218,7 +218,7 @@ egg_dock_notebook_set_property (GObject      *object,
     }
 }
 
-static void 
+static void
 egg_dock_notebook_get_property (GObject    *object,
                                 guint       prop_id,
                                 GValue     *value,
@@ -232,7 +232,7 @@ egg_dock_notebook_get_property (GObject    *object,
                 g_value_set_int (value, gtk_notebook_get_current_page
                                  (GTK_NOTEBOOK (item->child)));
             }
-            
+
             break;
         default:
             G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -259,7 +259,7 @@ egg_dock_notebook_destroy (GtkObject *object)
 
 static void
 egg_dock_notebook_switch_page_cb (GtkNotebook     *nb,
-                                  GtkNotebookPage *page,
+                                  GtkWidget       *page,
                                   gint             page_num,
                                   gpointer         data)
 {
@@ -317,7 +317,7 @@ egg_dock_notebook_forall (GtkContainer *container,
 
     if (include_internals) {
         /* use EggDockItem's forall */
-        EGG_CALL_PARENT (GTK_CONTAINER_CLASS, forall, 
+        EGG_CALL_PARENT (GTK_CONTAINER_CLASS, forall,
                            (container, include_internals, callback, callback_data));
     }
     else {
@@ -332,7 +332,7 @@ egg_dock_notebook_child_type (GtkContainer *container)
 {
     return EGG_TYPE_DOCK_ITEM;
 }
-    
+
 static void
 egg_dock_notebook_dock_child (EggDockObject *requestor,
                               gpointer       user_data)
@@ -367,11 +367,11 @@ egg_dock_notebook_dock (EggDockObject    *object,
             } data;
 
             egg_dock_object_freeze (requestor);
-            
+
             data.object = object;
             data.position = position;
             data.other_data = other_data;
-             
+
             gtk_container_foreach (GTK_CONTAINER (requestor),
                                    (GtkCallback) egg_dock_notebook_dock_child, &data);
 
@@ -382,7 +382,7 @@ egg_dock_notebook_dock (EggDockObject    *object,
             EggDockItem *requestor_item = EGG_DOCK_ITEM (requestor);
             GtkWidget   *label;
             gint         position = -1;
-            
+
             label = egg_dock_item_get_tablabel (requestor_item);
             if (!label) {
                 label = egg_dock_tablabel_new (requestor_item);
@@ -396,8 +396,8 @@ egg_dock_notebook_dock (EggDockObject    *object,
 
             if (other_data && G_VALUE_HOLDS (other_data, G_TYPE_INT))
                 position = g_value_get_int (other_data);
-            
-            gtk_notebook_insert_page (GTK_NOTEBOOK (item->child), 
+
+            gtk_notebook_insert_page (GTK_NOTEBOOK (item->child),
                                       GTK_WIDGET (requestor), label,
                                       position);
             EGG_DOCK_OBJECT_SET_FLAGS (requestor, EGG_DOCK_ATTACHED);
@@ -415,10 +415,10 @@ egg_dock_notebook_set_orientation (EggDockItem    *item,
     if (item->child && GTK_IS_NOTEBOOK (item->child)) {
         if (orientation == GTK_ORIENTATION_HORIZONTAL)
             gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_TOP);
-        else 
+        else
 	  {
 	    if (gtk_widget_get_direction (GTK_WIDGET (item->child)) == GTK_TEXT_DIR_RTL)
-	      
+
 	      gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_RIGHT);
 	    else
 	      gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_LEFT);
@@ -428,14 +428,14 @@ egg_dock_notebook_set_orientation (EggDockItem    *item,
     EGG_CALL_PARENT (EGG_DOCK_ITEM_CLASS, set_orientation, (item, orientation));
 }
 
-static gboolean 
+static gboolean
 egg_dock_notebook_child_placement (EggDockObject    *object,
                                    EggDockObject    *child,
                                    EggDockPlacement *placement)
 {
     EggDockItem      *item = EGG_DOCK_ITEM (object);
     EggDockPlacement  pos = EGG_DOCK_NONE;
-    
+
     if (item->child) {
         GList *children, *l;
 
@@ -464,7 +464,7 @@ egg_dock_notebook_present (EggDockObject *object,
 {
     EggDockItem *item = EGG_DOCK_ITEM (object);
     int i;
-    
+
     i = gtk_notebook_page_num (GTK_NOTEBOOK (item->child),
                                GTK_WIDGET (child));
     if (i >= 0)
@@ -473,7 +473,7 @@ egg_dock_notebook_present (EggDockObject *object,
     EGG_CALL_PARENT (EGG_DOCK_OBJECT_CLASS, present, (object, child));
 }
 
-static gboolean 
+static gboolean
 egg_dock_notebook_reorder (EggDockObject    *object,
                            EggDockObject    *requestor,
                            EggDockPlacement  new_position,
@@ -482,17 +482,17 @@ egg_dock_notebook_reorder (EggDockObject    *object,
     EggDockItem *item = EGG_DOCK_ITEM (object);
     gint         current_position, new_pos = -1;
     gboolean     handled = FALSE;
-    
+
     if (item->child && new_position == EGG_DOCK_CENTER) {
         current_position = gtk_notebook_page_num (GTK_NOTEBOOK (item->child),
                                                   GTK_WIDGET (requestor));
         if (current_position >= 0) {
             handled = TRUE;
-    
+
             if (other_data && G_VALUE_HOLDS (other_data, G_TYPE_INT))
                 new_pos = g_value_get_int (other_data);
-            
-            gtk_notebook_reorder_child (GTK_NOTEBOOK (item->child), 
+
+            gtk_notebook_reorder_child (GTK_NOTEBOOK (item->child),
                                         GTK_WIDGET (requestor),
                                         new_pos);
         }
@@ -509,6 +509,6 @@ egg_dock_notebook_new (void)
 
     notebook = EGG_DOCK_NOTEBOOK (g_object_new (EGG_TYPE_DOCK_NOTEBOOK, NULL));
     EGG_DOCK_OBJECT_UNSET_FLAGS (notebook, EGG_DOCK_AUTOMATIC);
-    
+
     return GTK_WIDGET (notebook);
 }
diff --git a/libegg/dock/egg-dock-object.c b/libegg/dock/egg-dock-object.c
index 65b8dba..ad35a91 100644
--- a/libegg/dock/egg-dock-object.c
+++ b/libegg/dock/egg-dock-object.c
@@ -387,7 +387,7 @@ egg_dock_object_real_reduce (EggDockObject *object)
             g_object_unref (child);
         }
         /* sink the widget, so any automatic floating widget is destroyed */
-        gtk_object_sink (GTK_OBJECT (object));
+        gtk_object_sink (GTK_OBJECT (object)); /* TODO: This function is deprecated. */
         /* don't reenter */
         object->reduce_pending = FALSE;
         egg_dock_object_thaw (object);
diff --git a/libegg/dock/egg-dock-placeholder.c b/libegg/dock/egg-dock-placeholder.c
index 9625738..36d0d1b 100644
--- a/libegg/dock/egg-dock-placeholder.c
+++ b/libegg/dock/egg-dock-placeholder.c
@@ -17,7 +17,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.  
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -87,7 +87,7 @@ struct _EggDockPlaceholderPrivate {
     /* current object this placeholder is pinned to */
     EggDockObject    *host;
     gboolean          sticky;
-    
+
     /* when the placeholder is moved up the hierarchy, this stack
        keeps track of the necessary dock positions needed to get the
        placeholder to the original position */
@@ -104,14 +104,14 @@ struct _EggDockPlaceholderPrivate {
 EGG_CLASS_BOILERPLATE (EggDockPlaceholder, egg_dock_placeholder,
 			 EggDockObject, EGG_TYPE_DOCK_OBJECT);
 
-static void 
+static void
 egg_dock_placeholder_class_init (EggDockPlaceholderClass *klass)
 {
     GObjectClass       *g_object_class;
     GtkObjectClass     *gtk_object_class;
     GtkContainerClass  *container_class;
     EggDockObjectClass *object_class;
-    
+
     g_object_class = G_OBJECT_CLASS (klass);
     gtk_object_class = GTK_OBJECT_CLASS (klass);
     container_class = GTK_CONTAINER_CLASS (klass);
@@ -119,7 +119,7 @@ egg_dock_placeholder_class_init (EggDockPlaceholderClass *klass)
 
     g_object_class->get_property = egg_dock_placeholder_get_property;
     g_object_class->set_property = egg_dock_placeholder_set_property;
-    
+
     g_object_class_install_property (
 	g_object_class, PROP_STICKY,
 	g_param_spec_boolean ("sticky", _("Sticky"),
@@ -127,14 +127,14 @@ egg_dock_placeholder_class_init (EggDockPlaceholderClass *klass)
 				"move up the hierarchy when the host is redocked"),
 			      FALSE,
 			      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-    
+
     g_object_class_install_property (
 	g_object_class, PROP_HOST,
 	g_param_spec_object ("host", _("Host"),
 			     _("The dock object this placeholder is attached to"),
 			     EGG_TYPE_DOCK_OBJECT,
 			     G_PARAM_READWRITE));
-    
+
     /* this will return the top of the placement stack */
     g_object_class_install_property (
 	g_object_class, PROP_NEXT_PLACEMENT,
@@ -145,10 +145,10 @@ egg_dock_placeholder_class_init (EggDockPlaceholderClass *klass)
 			   EGG_DOCK_CENTER,
 			   G_PARAM_READWRITE |
                            EGG_DOCK_PARAM_EXPORT | EGG_DOCK_PARAM_AFTER));
-    
+
     gtk_object_class->destroy = egg_dock_placeholder_destroy;
     container_class->add = egg_dock_placeholder_add;
-    
+
     object_class->is_compound = FALSE;
     object_class->detach = egg_dock_placeholder_detach;
     object_class->reduce = egg_dock_placeholder_reduce;
@@ -156,16 +156,16 @@ egg_dock_placeholder_class_init (EggDockPlaceholderClass *klass)
     object_class->present = egg_dock_placeholder_present;
 }
 
-static void 
+static void
 egg_dock_placeholder_instance_init (EggDockPlaceholder *ph)
 {
-    GTK_WIDGET_SET_FLAGS (ph, GTK_NO_WINDOW);
-    GTK_WIDGET_UNSET_FLAGS (ph, GTK_CAN_FOCUS);
-    
+    gtk_widget_set_has_window (ph, FALSE);
+    gtk_widget_set_can_focus (ph, FALSE);
+
     ph->_priv = g_new0 (EggDockPlaceholderPrivate, 1);
 }
 
-static void 
+static void
 egg_dock_placeholder_set_property (GObject      *g_object,
 				   guint         prop_id,
 				   const GValue *value,
@@ -194,7 +194,7 @@ egg_dock_placeholder_set_property (GObject      *g_object,
     }
 }
 
-static void 
+static void
 egg_dock_placeholder_get_property (GObject    *g_object,
 				   guint       prop_id,
 				   GValue     *value,
@@ -242,20 +242,20 @@ egg_dock_placeholder_destroy (GtkObject *object)
     EGG_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
 }
 
-static void 
+static void
 egg_dock_placeholder_add (GtkContainer *container,
                           GtkWidget    *widget)
 {
     EggDockPlaceholder *ph;
     EggDockPlacement    pos = EGG_DOCK_CENTER;   /* default position */
-    
+
     g_return_if_fail (EGG_IS_DOCK_PLACEHOLDER (container));
     g_return_if_fail (EGG_IS_DOCK_ITEM (widget));
 
     ph = EGG_DOCK_PLACEHOLDER (container);
     if (ph->_priv->placement_stack)
         pos = (EggDockPlacement) ph->_priv->placement_stack->data;
-        
+
     egg_dock_object_dock (EGG_DOCK_OBJECT (ph), EGG_DOCK_OBJECT (widget),
                           pos, NULL);
 }
@@ -268,7 +268,7 @@ egg_dock_placeholder_detach (EggDockObject *object,
 
     /* disconnect handlers */
     disconnect_host (ph);
-    
+
     /* free the placement stack */
     g_slist_free (ph->_priv->placement_stack);
     ph->_priv->placement_stack = NULL;
@@ -276,21 +276,21 @@ egg_dock_placeholder_detach (EggDockObject *object,
     EGG_DOCK_OBJECT_UNSET_FLAGS (object, EGG_DOCK_ATTACHED);
 }
 
-static void 
+static void
 egg_dock_placeholder_reduce (EggDockObject *object)
 {
     /* placeholders are not reduced */
     return;
 }
 
-static void 
+static void
 egg_dock_placeholder_dock (EggDockObject    *object,
 			   EggDockObject    *requestor,
 			   EggDockPlacement  position,
 			   GValue           *other_data)
 {
     EggDockPlaceholder *ph = EGG_DOCK_PLACEHOLDER (object);
-    
+
     if (ph->_priv->host) {
         /* we simply act as a proxy for our host */
         egg_dock_object_dock (ph->_priv->host, requestor,
@@ -298,12 +298,12 @@ egg_dock_placeholder_dock (EggDockObject    *object,
     }
     else {
         EggDockObject *toplevel;
-        
+
         if (!egg_dock_object_is_bound (EGG_DOCK_OBJECT (ph))) {
             g_warning (_("Attempt to dock a dock object to an unbound placeholder"));
             return;
         }
-        
+
         /* dock the item as a floating of the controller */
         toplevel = egg_dock_master_get_controller (EGG_DOCK_OBJECT_GET_MASTER (ph));
         egg_dock_object_dock (toplevel, requestor,
@@ -330,13 +330,13 @@ print_placement_stack (EggDockPlaceholder *ph)
         g_string_append_printf (message, "%s, ", name);
     }
     g_message ("%s", message->str);
-    
+
     g_string_free (message, TRUE);
     g_type_class_unref (enum_class);
 }
 #endif
 
-static void 
+static void
 egg_dock_placeholder_present (EggDockObject *object,
                               EggDockObject *child)
 {
@@ -346,7 +346,7 @@ egg_dock_placeholder_present (EggDockObject *object,
 
 /* ----- Public interface ----- */
 
-GtkWidget * 
+GtkWidget *
 egg_dock_placeholder_new (gchar            *name,
                           EggDockObject    *object,
                           EggDockPlacement  position,
@@ -373,16 +373,16 @@ egg_dock_placeholder_new (gchar            *name,
         /* try a recursion */
         do_excursion (ph);
     }
-    
+
     return GTK_WIDGET (ph);
 }
 
-static void 
+static void
 egg_dock_placeholder_weak_notify (gpointer data,
                                   GObject *old_object)
 {
     EggDockPlaceholder *ph;
-    
+
     g_return_if_fail (data != NULL && EGG_IS_DOCK_PLACEHOLDER (data));
 
     ph = EGG_DOCK_PLACEHOLDER (data);
@@ -406,7 +406,7 @@ detach_cb (EggDockObject *object,
     EggDockObject      *new_host, *obj;
 
     g_return_if_fail (user_data != NULL && EGG_IS_DOCK_PLACEHOLDER (user_data));
-    
+
     /* we go up in the hierarchy and we store the hinted placement in
      * the placement stack so we can rebuild the docking layout later
      * when we get the host's dock signal.  */
@@ -418,17 +418,17 @@ detach_cb (EggDockObject *object,
                      "our host %p"), object, ph->_priv->host);
         return;
     }
-    
+
     /* skip sticky objects */
     if (ph->_priv->sticky)
         return;
-    
+
     /* go up in the hierarchy */
     new_host = egg_dock_object_get_parent_object (obj);
 
     while (new_host) {
         EggDockPlacement pos = EGG_DOCK_NONE;
-        
+
         /* get placement hint from the new host */
         if (egg_dock_object_child_placement (new_host, obj, &pos)) {
             ph->_priv->placement_stack = g_slist_prepend (
@@ -442,7 +442,7 @@ detach_cb (EggDockObject *object,
         if (!EGG_DOCK_OBJECT_IN_DETACH (new_host))
             /* we found a "stable" dock object */
             break;
-        
+
         obj = new_host;
         new_host = egg_dock_object_get_parent_object (obj);
     }
@@ -486,7 +486,7 @@ do_excursion (EggDockPlaceholder *ph)
             (EggDockPlacement) ph->_priv->placement_stack->data;
         GList           *children, *l;
         EggDockObject   *host = ph->_priv->host;
-        
+
         children = gtk_container_get_children (GTK_CONTAINER (host));
         for (l = children; l; l = l->next) {
             pos = stack_pos;
@@ -498,7 +498,7 @@ do_excursion (EggDockPlaceholder *ph)
                 ph->_priv->placement_stack =
                     g_slist_remove_link (ph->_priv->placement_stack,
                                          ph->_priv->placement_stack);
-                
+
                 /* connect to the new host */
                 disconnect_host (ph);
                 connect_host (ph, EGG_DOCK_OBJECT (l->data));
@@ -506,7 +506,7 @@ do_excursion (EggDockPlaceholder *ph)
                 /* recurse... */
                 if (!EGG_DOCK_OBJECT_IN_REFLOW (l->data))
                     do_excursion (ph);
-                
+
                 break;
             }
         }
@@ -514,7 +514,7 @@ do_excursion (EggDockPlaceholder *ph)
     }
 }
 
-static void 
+static void
 dock_cb (EggDockObject    *object,
          EggDockObject    *requestor,
          EggDockPlacement  position,
@@ -523,11 +523,11 @@ dock_cb (EggDockObject    *object,
 {
     EggDockPlacement    pos = EGG_DOCK_NONE;
     EggDockPlaceholder *ph;
-    
+
     g_return_if_fail (user_data != NULL && EGG_IS_DOCK_PLACEHOLDER (user_data));
     ph = EGG_DOCK_PLACEHOLDER (user_data);
     g_return_if_fail (ph->_priv->host == object);
-    
+
     /* see if the given position is compatible for the stack's top
        element */
     if (!ph->_priv->sticky && ph->_priv->placement_stack) {
@@ -549,7 +549,7 @@ disconnect_host (EggDockPlaceholder *ph)
 {
     if (!ph->_priv->host)
         return;
-    
+
     if (ph->_priv->host_detach_handler)
         g_signal_handler_disconnect (ph->_priv->host, ph->_priv->host_detach_handler);
     if (ph->_priv->host_dock_handler)
@@ -569,7 +569,7 @@ connect_host (EggDockPlaceholder *ph,
 {
     if (ph->_priv->host)
         disconnect_host (ph);
-    
+
     ph->_priv->host = new_host;
     g_object_weak_ref (G_OBJECT (ph->_priv->host),
                        egg_dock_placeholder_weak_notify, ph);
@@ -579,7 +579,7 @@ connect_host (EggDockPlaceholder *ph,
                           "detach",
                           (GCallback) detach_cb,
                           (gpointer) ph);
-    
+
     ph->_priv->host_dock_handler =
         g_signal_connect (ph->_priv->host,
                           "dock",
@@ -594,22 +594,22 @@ egg_dock_placeholder_attach (EggDockPlaceholder *ph,
     g_return_if_fail (ph != NULL && EGG_IS_DOCK_PLACEHOLDER (ph));
     g_return_if_fail (ph->_priv != NULL);
     g_return_if_fail (object != NULL);
-    
+
     /* object binding */
     if (!egg_dock_object_is_bound (EGG_DOCK_OBJECT (ph)))
         egg_dock_object_bind (EGG_DOCK_OBJECT (ph), object->master);
 
     g_return_if_fail (EGG_DOCK_OBJECT (ph)->master == object->master);
-        
+
     egg_dock_object_freeze (EGG_DOCK_OBJECT (ph));
-    
+
     /* detach from previous host first */
     if (ph->_priv->host)
         egg_dock_object_detach (EGG_DOCK_OBJECT (ph), FALSE);
 
     connect_host (ph, object);
-    
+
     EGG_DOCK_OBJECT_SET_FLAGS (ph, EGG_DOCK_ATTACHED);
-    
+
     egg_dock_object_thaw (EGG_DOCK_OBJECT (ph));
 }
diff --git a/libegg/dock/egg-dock-tablabel.c b/libegg/dock/egg-dock-tablabel.c
index cf50001..b7c52ea 100644
--- a/libegg/dock/egg-dock-tablabel.c
+++ b/libegg/dock/egg-dock-tablabel.c
@@ -17,7 +17,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.  
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -55,7 +55,7 @@ static void  egg_dock_tablabel_size_request  (GtkWidget          *widget,
                                               GtkRequisition     *requisition);
 static void  egg_dock_tablabel_size_allocate (GtkWidget          *widget,
                                               GtkAllocation      *allocation);
-                                              
+
 static void  egg_dock_tablabel_paint         (GtkWidget      *widget,
                                               GdkEventExpose *event);
 static gint  egg_dock_tablabel_expose        (GtkWidget      *widget,
@@ -111,7 +111,7 @@ egg_dock_tablabel_class_init (EggDockTablabelClass *klass)
     object_class = GTK_OBJECT_CLASS (klass);
     widget_class = GTK_WIDGET_CLASS (klass);
     container_class = GTK_CONTAINER_CLASS (klass);
-    
+
     g_object_class->set_property = egg_dock_tablabel_set_property;
     g_object_class->get_property = egg_dock_tablabel_get_property;
 
@@ -137,7 +137,7 @@ egg_dock_tablabel_class_init (EggDockTablabelClass *klass)
         g_signal_new ("button_pressed_handle",
                       G_TYPE_FROM_CLASS (klass),
                       G_SIGNAL_RUN_LAST,
-                      G_STRUCT_OFFSET (EggDockTablabelClass, 
+                      G_STRUCT_OFFSET (EggDockTablabelClass,
                                        button_pressed_handle),
                       NULL, NULL,
                       _egg_marshal_VOID__BOXED,
@@ -181,7 +181,7 @@ egg_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, egg_dock_tablabel_item_notify, tablabel);
@@ -191,8 +191,8 @@ egg_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",
@@ -213,7 +213,7 @@ egg_dock_tablabel_set_property (GObject      *object,
 
                 if (locked)
                     tablabel->drag_handle_size = 0;
-                
+
                 bin = GTK_BIN (tablabel);
                 if (bin->child && g_object_class_find_property (
                     G_OBJECT_GET_CLASS (bin->child), "label"))
@@ -221,7 +221,7 @@ egg_dock_tablabel_set_property (GObject      *object,
                 g_free (long_name);
             };
             break;
-            
+
         default:
             G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
             break;
@@ -257,7 +257,7 @@ egg_dock_tablabel_item_notify (GObject    *master,
     gboolean         locked;
     gchar           *label;
     GtkBin          *bin;
-    
+
     g_object_get (master,
                   "locked", &locked,
                   "grip_size", &tablabel->drag_handle_size,
@@ -298,7 +298,7 @@ egg_dock_tablabel_size_request (GtkWidget      *widget,
         gtk_widget_size_request (bin->child, &child_req);
     else
         child_req.width = child_req.height = 0;
-        
+
     requisition->width += child_req.width;
     requisition->height += child_req.height;
 
@@ -319,12 +319,12 @@ egg_dock_tablabel_size_allocate (GtkWidget     *widget,
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK_TABLABEL (widget));
     g_return_if_fail (allocation != NULL);
-  
+
     bin = GTK_BIN (widget);
     tablabel = EGG_DOCK_TABLABEL (widget);
 
     border_width = GTK_CONTAINER (widget)->border_width;
-  
+
     widget->allocation = *allocation;
 
 #if GTK_CHECK_VERSION(2,20,0)
@@ -332,10 +332,10 @@ egg_dock_tablabel_size_allocate (GtkWidget     *widget,
 #else
     if (GTK_WIDGET_REALIZED (widget))
 #endif
-        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_CHECK_VERSION(2,20,0)
@@ -351,9 +351,9 @@ egg_dock_tablabel_size_allocate (GtkWidget     *widget,
 	if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
 	  child_allocation.x += tablabel->drag_handle_size;
 
-        child_allocation.width = 
+        child_allocation.width =
             MAX (1, (int) allocation->width - tablabel->drag_handle_size - 2 * border_width);
-        child_allocation.height = 
+        child_allocation.height =
             MAX (1, (int) allocation->height - 2 * border_width);
 
         gtk_widget_size_allocate (bin->child, &child_allocation);
@@ -381,8 +381,8 @@ egg_dock_tablabel_paint (GtkWidget      *widget,
       rect.x = widget->allocation.x + widget->allocation.width - border_width - rect.width;
 
     if (gdk_rectangle_intersect (&event->area, &rect, &dest)) {
-        gtk_paint_handle (widget->style, widget->window, 
-                          tablabel->active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, 
+        gtk_paint_handle (widget->style, widget->window,
+                          tablabel->active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE,
                           GTK_SHADOW_NONE,
                           &dest, widget, "dock_tablabel",
                           rect.x, rect.y, rect.width, rect.height,
@@ -406,28 +406,28 @@ egg_dock_tablabel_expose (GtkWidget      *widget,
         EGG_CALL_PARENT (GTK_WIDGET_CLASS, expose_event, (widget, event));
         egg_dock_tablabel_paint (widget, event);
     };
-  
+
     return FALSE;
 }
 
-static gboolean 
+static gboolean
 egg_dock_tablabel_button_event (GtkWidget      *widget,
                                 GdkEventButton *event)
 {
     EggDockTablabel *tablabel;
     gboolean         event_handled;
-  
+
     g_return_val_if_fail (widget != NULL, FALSE);
     g_return_val_if_fail (EGG_IS_DOCK_TABLABEL (widget), FALSE);
     g_return_val_if_fail (event != NULL, FALSE);
-    
+
     tablabel = EGG_DOCK_TABLABEL (widget);
-    
+
     event_handled = FALSE;
 
     if (event->window != tablabel->event_window)
         return FALSE;
-    
+
     switch (event->type) {
         case GDK_BUTTON_PRESS:
             if (tablabel->active) {
@@ -445,7 +445,7 @@ egg_dock_tablabel_button_event (GtkWidget      *widget,
 		if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
 		  rel_x = widget->allocation.width - rel_x;
 
-                /* 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);
 
@@ -454,12 +454,12 @@ egg_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;
@@ -471,7 +471,7 @@ egg_dock_tablabel_button_event (GtkWidget      *widget,
         default:
             break;
     }
-    
+
     if (!event_handled) {
         /* propagate the event to the parent's gdkwindow */
         GdkEventButton e;
@@ -480,31 +480,31 @@ egg_dock_tablabel_button_event (GtkWidget      *widget,
         e.window = gtk_widget_get_parent_window (widget);
         e.x += widget->allocation.x;
         e.y += widget->allocation.y;
-        
+
         gdk_event_put ((GdkEvent *) &e);
     };
 
     return event_handled;
 }
 
-static gboolean 
+static gboolean
 egg_dock_tablabel_motion_event (GtkWidget      *widget,
                                 GdkEventMotion *event)
 {
     EggDockTablabel *tablabel;
     gboolean         event_handled;
-  
+
     g_return_val_if_fail (widget != NULL, FALSE);
     g_return_val_if_fail (EGG_IS_DOCK_TABLABEL (widget), FALSE);
     g_return_val_if_fail (event != NULL, FALSE);
-    
+
     tablabel = EGG_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,
@@ -512,14 +512,14 @@ egg_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;
@@ -528,22 +528,22 @@ egg_dock_tablabel_motion_event (GtkWidget      *widget,
         e.window = gtk_widget_get_parent_window (widget);
         e.x += widget->allocation.x;
         e.y += widget->allocation.y;
-        
+
         gdk_event_put ((GdkEvent *) &e);
     };
 
     return event_handled;
 }
 
-static void   
+static void
 egg_dock_tablabel_realize (GtkWidget *widget)
 {
     EggDockTablabel *tablabel;
     GdkWindowAttr attributes;
     int attributes_mask;
-    
+
     tablabel = EGG_DOCK_TABLABEL (widget);
-    
+
     attributes.window_type = GDK_WINDOW_CHILD;
     attributes.x = widget->allocation.x;
     attributes.y = widget->allocation.y;
@@ -551,52 +551,52 @@ egg_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;
-    
+
     widget->window = gtk_widget_get_parent_window (widget);
     g_object_ref (widget->window);
-    
-    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);
-    
+
     widget->style = gtk_style_attach (widget->style, widget->window);
-    
-    GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+
+    gtk_widget_set_realized (widget, TRUE);
 }
 
-static void   
+static void
 egg_dock_tablabel_unrealize (GtkWidget *widget)
 {
     EggDockTablabel *tablabel = EGG_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;
     }
-    
+
     EGG_CALL_PARENT (GTK_WIDGET_CLASS, unrealize, (widget));
 }
 
-static void  
+static void
 egg_dock_tablabel_map (GtkWidget *widget)
 {
     EggDockTablabel *tablabel = EGG_DOCK_TABLABEL (widget);
-    
+
     EGG_CALL_PARENT (GTK_WIDGET_CLASS, map, (widget));
-    
+
     gdk_window_show (tablabel->event_window);
 }
 
-static void   
+static void
 egg_dock_tablabel_unmap (GtkWidget *widget)
 {
     EggDockTablabel *tablabel = EGG_DOCK_TABLABEL (widget);
@@ -616,7 +616,7 @@ egg_dock_tablabel_new (EggDockItem *item)
     tablabel = EGG_DOCK_TABLABEL (g_object_new (EGG_TYPE_DOCK_TABLABEL,
                                                 "item", item,
                                                 NULL));
-    
+
     return GTK_WIDGET (tablabel);
 }
 
diff --git a/libegg/dock/egg-dock.c b/libegg/dock/egg-dock.c
index a68fc28..83046a5 100644
--- a/libegg/dock/egg-dock.c
+++ b/libegg/dock/egg-dock.c
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.  
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -113,12 +113,12 @@ struct _EggDockPrivate
     gboolean            floating;
     GtkWidget          *window;
     gboolean            auto_title;
-    
+
     gint                float_x;
     gint                float_y;
     gint                width;
     gint                height;
-    
+
     /* auxiliary fields */
     GdkGC              *xor_gc;
 };
@@ -155,17 +155,17 @@ egg_dock_class_init (EggDockClass *klass)
     GtkWidgetClass     *widget_class;
     GtkContainerClass  *container_class;
     EggDockObjectClass *object_class;
-    
+
     g_object_class = G_OBJECT_CLASS (klass);
     gtk_object_class = GTK_OBJECT_CLASS (klass);
     widget_class = GTK_WIDGET_CLASS (klass);
     container_class = GTK_CONTAINER_CLASS (klass);
     object_class = EGG_DOCK_OBJECT_CLASS (klass);
-    
+
     g_object_class->constructor = egg_dock_constructor;
     g_object_class->set_property = egg_dock_set_property;
     g_object_class->get_property = egg_dock_get_property;
-    
+
     /* properties */
 
     g_object_class_install_property (
@@ -175,14 +175,14 @@ egg_dock_class_init (EggDockClass *klass)
                               FALSE,
                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
                               EGG_DOCK_PARAM_EXPORT));
-    
+
     g_object_class_install_property (
         g_object_class, PROP_DEFAULT_TITLE,
         g_param_spec_string ("default_title", _("Default title"),
                              _("Default title for the newly created floating docks"),
                              NULL,
                              G_PARAM_READWRITE));
-    
+
     g_object_class_install_property (
         g_object_class, PROP_WIDTH,
         g_param_spec_int ("width", _("Width"),
@@ -190,7 +190,7 @@ egg_dock_class_init (EggDockClass *klass)
                           -1, G_MAXINT, -1,
                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
                           EGG_DOCK_PARAM_EXPORT));
-    
+
     g_object_class_install_property (
         g_object_class, PROP_HEIGHT,
         g_param_spec_int ("height", _("Height"),
@@ -198,7 +198,7 @@ egg_dock_class_init (EggDockClass *klass)
                           -1, G_MAXINT, -1,
                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
                           EGG_DOCK_PARAM_EXPORT));
-    
+
     g_object_class_install_property (
         g_object_class, PROP_FLOAT_X,
         g_param_spec_int ("floatx", _("Float X"),
@@ -206,7 +206,7 @@ egg_dock_class_init (EggDockClass *klass)
                           G_MININT, G_MAXINT, 0,
                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
                           EGG_DOCK_PARAM_EXPORT));
-    
+
     g_object_class_install_property (
         g_object_class, PROP_FLOAT_Y,
         g_param_spec_int ("floaty", _("Float Y"),
@@ -214,7 +214,7 @@ egg_dock_class_init (EggDockClass *klass)
                           G_MININT, G_MAXINT, 0,
                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
                           EGG_DOCK_PARAM_EXPORT));
-    
+
     gtk_object_class->destroy = egg_dock_destroy;
 
     widget_class->size_request = egg_dock_size_request;
@@ -223,26 +223,26 @@ egg_dock_class_init (EggDockClass *klass)
     widget_class->unmap = egg_dock_unmap;
     widget_class->show = egg_dock_show;
     widget_class->hide = egg_dock_hide;
-    
+
     container_class->add = egg_dock_add;
     container_class->remove = egg_dock_remove;
     container_class->forall = egg_dock_forall;
     container_class->child_type = egg_dock_child_type;
-    
+
     object_class->is_compound = TRUE;
-    
+
     object_class->detach = egg_dock_detach;
     object_class->reduce = egg_dock_reduce;
     object_class->dock_request = egg_dock_dock_request;
     object_class->dock = egg_dock_dock;
-    object_class->reorder = egg_dock_reorder;    
+    object_class->reorder = egg_dock_reorder;
     object_class->child_placement = egg_dock_child_placement;
     object_class->present = egg_dock_present;
-    
+
     /* signals */
 
-    dock_signals [LAYOUT_CHANGED] = 
-        g_signal_new ("layout_changed", 
+    dock_signals [LAYOUT_CHANGED] =
+        g_signal_new ("layout_changed",
                       G_TYPE_FROM_CLASS (klass),
                       G_SIGNAL_RUN_LAST,
                       G_STRUCT_OFFSET (EggDockClass, layout_changed),
@@ -258,7 +258,7 @@ egg_dock_class_init (EggDockClass *klass)
 static void
 egg_dock_instance_init (EggDock *dock)
 {
-    GTK_WIDGET_SET_FLAGS (GTK_WIDGET (dock), GTK_NO_WINDOW);
+    gtk_widget_set_has_window (GTK_WIDGET (dock), FALSE);
 
     dock->root = NULL;
     dock->_priv = g_new0 (EggDockPrivate, 1);
@@ -266,13 +266,13 @@ egg_dock_instance_init (EggDock *dock)
     dock->_priv->height = -1;
 }
 
-static gboolean 
+static gboolean
 egg_dock_floating_configure_event_cb (GtkWidget         *widget,
                                       GdkEventConfigure *event,
                                       gpointer           user_data)
 {
     EggDock *dock;
-    
+
     g_return_val_if_fail (user_data != NULL && EGG_IS_DOCK (user_data), TRUE);
 
     dock = EGG_DOCK (user_data);
@@ -290,9 +290,9 @@ egg_dock_constructor (GType                  type,
                       GObjectConstructParam *construct_param)
 {
     GObject *g_object;
-    
-    g_object = EGG_CALL_PARENT_WITH_DEFAULT (G_OBJECT_CLASS, 
-                                               constructor, 
+
+    g_object = EGG_CALL_PARENT_WITH_DEFAULT (G_OBJECT_CLASS,
+                                               constructor,
                                                (type,
                                                 n_construct_properties,
                                                 construct_param),
@@ -300,7 +300,7 @@ egg_dock_constructor (GType                  type,
     if (g_object) {
         EggDock *dock = EGG_DOCK (g_object);
         EggDockMaster *master;
-        
+
         /* create a master for the dock if none was provided in the construction */
         master = EGG_DOCK_OBJECT_GET_MASTER (EGG_DOCK_OBJECT (dock));
         if (!master) {
@@ -312,11 +312,11 @@ egg_dock_constructor (GType                  type,
 
         if (dock->_priv->floating) {
             EggDockObject *controller;
-            
+
             /* create floating window for this dock */
             dock->_priv->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
             g_object_set_data (G_OBJECT (dock->_priv->window), "dock", dock);
-            
+
             /* set position and default size */
             gtk_window_set_position (GTK_WINDOW (dock->_priv->window),
                                      GTK_WIN_POS_MOUSE);
@@ -325,23 +325,23 @@ egg_dock_constructor (GType                  type,
                                          dock->_priv->height);
             gtk_window_set_type_hint (GTK_WINDOW (dock->_priv->window),
                                       GDK_WINDOW_TYPE_HINT_NORMAL);
-            
+
             /* metacity ignores this */
             gtk_window_move (GTK_WINDOW (dock->_priv->window),
                              dock->_priv->float_x,
                              dock->_priv->float_y);
-            
+
             /* connect to the configure event so we can track down window geometry */
             g_signal_connect (dock->_priv->window, "configure_event",
                               (GCallback) egg_dock_floating_configure_event_cb,
                               dock);
-            
+
             /* set the title and connect to the long_name notify queue
                so we can reset the title when this prop changes */
             egg_dock_set_title (dock);
             g_signal_connect (dock, "notify::long_name",
                               (GCallback) egg_dock_notify_cb, NULL);
-            
+
             /* set transient for the first dock if that is a non-floating dock */
             controller = egg_dock_master_get_controller (master);
             if (controller && EGG_IS_DOCK (controller)) {
@@ -358,14 +358,14 @@ egg_dock_constructor (GType                  type,
             }
 
             gtk_container_add (GTK_CONTAINER (dock->_priv->window), GTK_WIDGET (dock));
-    
+
             g_signal_connect (dock->_priv->window, "delete_event",
-                              G_CALLBACK (egg_dock_floating_window_delete_event_cb), 
+                              G_CALLBACK (egg_dock_floating_window_delete_event_cb),
                               NULL);
         }
         EGG_DOCK_OBJECT_SET_FLAGS (dock, EGG_DOCK_ATTACHED);
     }
-    
+
     return g_object;
 }
 
@@ -376,7 +376,7 @@ egg_dock_set_property  (GObject      *object,
                         GParamSpec   *pspec)
 {
     EggDock *dock = EGG_DOCK (object);
-    
+
     switch (prop_id) {
         case PROP_FLOATING:
             dock->_priv->floating = g_value_get_boolean (value);
@@ -465,10 +465,10 @@ egg_dock_set_title (EggDock *dock)
     EggDockObject *object = EGG_DOCK_OBJECT (dock);
     gchar         *title = NULL;
     gboolean       free_title = FALSE;
-    
+
     if (!dock->_priv->window)
         return;
-    
+
     if (!dock->_priv->auto_title && object->long_name) {
         title = object->long_name;
     }
@@ -481,7 +481,7 @@ egg_dock_set_title (EggDock *dock)
         g_object_get (dock->root, "long_name", &title, NULL);
         free_title = TRUE;
     }
-    
+
     if (!title) {
         /* set a default title in the long_name */
         dock->_priv->auto_title = TRUE;
@@ -501,9 +501,9 @@ egg_dock_notify_cb (GObject    *object,
                     gpointer    user_data)
 {
     EggDock *dock;
-    
+
     g_return_if_fail (object != NULL || EGG_IS_DOCK (object));
-    
+
     dock = EGG_DOCK (object);
     dock->_priv->auto_title = FALSE;
     egg_dock_set_title (dock);
@@ -523,7 +523,7 @@ egg_dock_destroy (GtkObject *object)
             priv->floating = FALSE;
             priv->window = NULL;
         }
-        
+
         /* destroy the xor gc */
         if (priv->xor_gc) {
             g_object_unref (priv->xor_gc);
@@ -532,7 +532,7 @@ egg_dock_destroy (GtkObject *object)
 
         g_free (priv);
     }
-    
+
     EGG_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
 }
 
@@ -579,7 +579,7 @@ egg_dock_size_allocate (GtkWidget     *widget,
 
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK (widget));
-    
+
     dock = EGG_DOCK (widget);
     container = GTK_CONTAINER (widget);
     border_width = container->border_width;
@@ -629,7 +629,7 @@ egg_dock_unmap (GtkWidget *widget)
 {
     GtkWidget *child;
     EggDock   *dock;
-    
+
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK (widget));
 
@@ -646,7 +646,7 @@ egg_dock_unmap (GtkWidget *widget)
 #endif
             gtk_widget_unmap (child);
     }
-    
+
     if (dock->_priv->window)
         gtk_widget_unmap (dock->_priv->window);
 }
@@ -665,12 +665,12 @@ static void
 egg_dock_show (GtkWidget *widget)
 {
     EggDock *dock;
-    
+
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK (widget));
-    
+
     EGG_CALL_PARENT (GTK_WIDGET_CLASS, show, (widget));
-    
+
     dock = EGG_DOCK (widget);
     if (dock->_priv->floating && dock->_priv->window)
         gtk_widget_show (dock->_priv->window);
@@ -686,12 +686,12 @@ static void
 egg_dock_hide (GtkWidget *widget)
 {
     EggDock *dock;
-    
+
     g_return_if_fail (widget != NULL);
     g_return_if_fail (EGG_IS_DOCK (widget));
-    
+
     EGG_CALL_PARENT (GTK_WIDGET_CLASS, hide, (widget));
-    
+
     dock = EGG_DOCK (widget);
     if (dock->_priv->floating && dock->_priv->window)
         gtk_widget_hide (dock->_priv->window);
@@ -711,8 +711,8 @@ egg_dock_add (GtkContainer *container,
     g_return_if_fail (EGG_IS_DOCK (container));
     g_return_if_fail (EGG_IS_DOCK_ITEM (widget));
 
-    egg_dock_add_item (EGG_DOCK (container), 
-                       EGG_DOCK_ITEM (widget), 
+    egg_dock_add_item (EGG_DOCK (container),
+                       EGG_DOCK_ITEM (widget),
                        EGG_DOCK_TOP);  /* default position */
 }
 
@@ -776,7 +776,7 @@ egg_dock_detach (EggDockObject *object,
                  gboolean       recursive)
 {
     EggDock *dock = EGG_DOCK (object);
-    
+
     /* detach children */
     if (recursive && dock->root) {
         egg_dock_object_detach (dock->root, recursive);
@@ -788,10 +788,10 @@ static void
 egg_dock_reduce (EggDockObject *object)
 {
     EggDock *dock = EGG_DOCK (object);
-    
+
     if (dock->root)
         return;
-    
+
     if (EGG_DOCK_OBJECT_AUTOMATIC (dock)) {
         gtk_widget_destroy (GTK_WIDGET (dock));
 
@@ -801,7 +801,7 @@ egg_dock_reduce (EggDockObject *object)
             gtk_widget_hide (GTK_WIDGET (dock));
         else {
             GtkWidget *widget = GTK_WIDGET (object);
-            if (widget->parent) 
+            if (widget->parent)
                 gtk_container_remove (GTK_CONTAINER (widget->parent), widget);
         }
     }
@@ -823,9 +823,9 @@ egg_dock_dock_request (EggDockObject  *object,
     g_return_val_if_fail (EGG_IS_DOCK (object), FALSE);
 
     /* we get (x,y) in our allocation coordinates system */
-    
+
     dock = EGG_DOCK (object);
-    
+
     /* Get dock size. */
     alloc = &(GTK_WIDGET (dock)->allocation);
     bw = GTK_CONTAINER (dock)->border_width;
@@ -836,7 +836,7 @@ egg_dock_dock_request (EggDockObject  *object,
 
     if (request)
         my_request = *request;
-        
+
     /* Check if coordinates are in EggDock widget. */
     if (rel_x > 0 && rel_x < alloc->width &&
         rel_y > 0 && rel_y < alloc->height) {
@@ -850,7 +850,7 @@ egg_dock_dock_request (EggDockObject  *object,
         my_request.rect.width = alloc->width - 2*bw;
         my_request.rect.height = alloc->height - 2*bw;
 
-	/* If EggDock has no root item yet, set the dock itself as 
+	/* If EggDock has no root item yet, set the dock itself as
 	   possible target. */
         if (!dock->root) {
             my_request.position = EGG_DOCK_TOP;
@@ -877,7 +877,7 @@ egg_dock_dock_request (EggDockObject  *object,
                 /* Otherwise try our children. */
                 /* give them allocation coordinates (we are a
                    GTK_NO_WINDOW) widget */
-                may_dock = egg_dock_object_dock_request (EGG_DOCK_OBJECT (dock->root), 
+                may_dock = egg_dock_object_dock_request (EGG_DOCK_OBJECT (dock->root),
                                                          x, y, &my_request);
             }
         }
@@ -885,7 +885,7 @@ egg_dock_dock_request (EggDockObject  *object,
 
     if (may_dock && request)
         *request = my_request;
-    
+
     return may_dock;
 }
 
@@ -896,13 +896,13 @@ egg_dock_dock (EggDockObject    *object,
                GValue           *user_data)
 {
     EggDock *dock;
-    
+
     g_return_if_fail (EGG_IS_DOCK (object));
     /* only dock items allowed at this time */
     g_return_if_fail (EGG_IS_DOCK_ITEM (requestor));
 
     dock = EGG_DOCK (object);
-    
+
     if (position == EGG_DOCK_FLOATING) {
         EggDockItem *item = EGG_DOCK_ITEM (requestor);
         gint x, y, width, height;
@@ -920,7 +920,7 @@ egg_dock_dock (EggDockObject    *object,
             x = y = 0;
             width = height = -1;
         }
-        
+
         egg_dock_add_floating_item (dock, item,
                                     x, y, width, height);
     }
@@ -929,18 +929,18 @@ egg_dock_dock (EggDockObject    *object,
            pass the request on because we only have on child */
         egg_dock_object_dock (dock->root, requestor, position, NULL);
         egg_dock_set_title (dock);
-        
+
     }
     else { /* Item about to be added is root item. */
         GtkWidget *widget = GTK_WIDGET (requestor);
-        
+
         dock->root = requestor;
         EGG_DOCK_OBJECT_SET_FLAGS (requestor, EGG_DOCK_ATTACHED);
         gtk_widget_set_parent (widget, GTK_WIDGET (dock));
-        
+
         egg_dock_item_show_grip (EGG_DOCK_ITEM (requestor));
 
-        /* Realize the item (create its corresponding GdkWindow) when 
+        /* Realize the item (create its corresponding GdkWindow) when
            EggDock has been realized. */
 #if GTK_CHECK_VERSION(2,20,0)
         if (gtk_widget_get_realized (GTK_WIDGET (dock)))
@@ -948,35 +948,35 @@ egg_dock_dock (EggDockObject    *object,
         if (GTK_WIDGET_REALIZED (dock))
 #endif
             gtk_widget_realize (widget);
-        
-        /* Map the widget if it's visible and the parent is visible and has 
-           been mapped. This is done to make sure that the GdkWindow is 
+
+        /* Map the widget if it's visible and the parent is visible and has
+           been mapped. This is done to make sure that the GdkWindow is
            visible. */
 #if GTK_CHECK_VERSION(2,20,0)
-        if (gtk_widget_get_visible (GTK_WIDGET (dock)) && 
+        if (gtk_widget_get_visible (GTK_WIDGET (dock)) &&
             gtk_widget_get_visible (widget)) {
             if (gtk_widget_get_mapped (GTK_WIDGET (dock)))
 #else
-        if (GTK_WIDGET_VISIBLE (dock) && 
+        if (GTK_WIDGET_VISIBLE (dock) &&
             GTK_WIDGET_VISIBLE (widget)) {
             if (GTK_WIDGET_MAPPED (dock))
 #endif
                 gtk_widget_map (widget);
-            
+
             /* Make the widget resize. */
             gtk_widget_queue_resize (widget);
         }
         egg_dock_set_title (dock);
     }
 }
-    
+
 static gboolean
 egg_dock_floating_window_delete_event_cb (GtkWidget *widget)
 {
     EggDock *dock;
-    
+
     g_return_val_if_fail (GTK_IS_WINDOW (widget), FALSE);
-    
+
     dock = EGG_DOCK (g_object_get_data (G_OBJECT (widget), "dock"));
     if (dock->root) {
         /* this will call reduce on ourselves, hiding the window if appropiate */
@@ -1004,11 +1004,11 @@ egg_dock_reorder (EggDockObject    *object,
 {
     EggDock *dock = EGG_DOCK (object);
     gboolean handled = FALSE;
-    
+
     if (dock->_priv->floating &&
         new_position == EGG_DOCK_FLOATING &&
         dock->root == requestor) {
-        
+
         if (other_data && G_VALUE_HOLDS (other_data, GDK_TYPE_RECTANGLE)) {
             GdkRectangle *rect;
 
@@ -1019,30 +1019,30 @@ egg_dock_reorder (EggDockObject    *object,
             handled = TRUE;
         }
     }
-    
+
     return handled;
 }
 
-static gboolean 
+static gboolean
 egg_dock_child_placement (EggDockObject    *object,
                           EggDockObject    *child,
                           EggDockPlacement *placement)
 {
     EggDock *dock = EGG_DOCK (object);
     gboolean retval = TRUE;
-    
+
     if (dock->root == child) {
         if (placement) {
             if (*placement == EGG_DOCK_NONE || *placement == EGG_DOCK_FLOATING)
                 *placement = EGG_DOCK_TOP;
         }
-    } else 
+    } else
         retval = FALSE;
 
     return retval;
 }
 
-static void 
+static void
 egg_dock_present (EggDockObject *object,
                   EggDockObject *child)
 {
@@ -1062,7 +1062,7 @@ egg_dock_new (void)
 
     dock = g_object_new (EGG_TYPE_DOCK, NULL);
     EGG_DOCK_OBJECT_UNSET_FLAGS (dock, EGG_DOCK_AUTOMATIC);
-    
+
     return GTK_WIDGET (dock);
 }
 
@@ -1071,15 +1071,15 @@ egg_dock_new_from (EggDock  *original,
                    gboolean  floating)
 {
     GObject *new_dock;
-    
+
     g_return_val_if_fail (original != NULL, NULL);
-    
-    new_dock = g_object_new (EGG_TYPE_DOCK, 
-                             "master", EGG_DOCK_OBJECT_GET_MASTER (original), 
+
+    new_dock = g_object_new (EGG_TYPE_DOCK,
+                             "master", EGG_DOCK_OBJECT_GET_MASTER (original),
                              "floating", floating,
                              NULL);
     EGG_DOCK_OBJECT_UNSET_FLAGS (new_dock, EGG_DOCK_AUTOMATIC);
-    
+
     return GTK_WIDGET (new_dock);
 }
 
@@ -1112,19 +1112,19 @@ egg_dock_add_floating_item (EggDock        *dock,
                             gint            height)
 {
     EggDock *new_dock;
-    
+
     g_return_if_fail (dock != NULL);
     g_return_if_fail (item != NULL);
-    
-    new_dock = EGG_DOCK (g_object_new (EGG_TYPE_DOCK, 
-                                       "master", EGG_DOCK_OBJECT_GET_MASTER (dock), 
+
+    new_dock = EGG_DOCK (g_object_new (EGG_TYPE_DOCK,
+                                       "master", EGG_DOCK_OBJECT_GET_MASTER (dock),
                                        "floating", TRUE,
                                        "width", width,
                                        "height", height,
                                        "floatx", x,
                                        "floaty", y,
                                        NULL));
-    
+
 #if GTK_CHECK_VERSION(2,20,0)
     if (gtk_widget_get_visible (GTK_WIDGET (dock))) {
         gtk_widget_show (GTK_WIDGET (new_dock));
@@ -1135,7 +1135,7 @@ egg_dock_add_floating_item (EggDock        *dock,
         if (GTK_WIDGET_MAPPED (dock))
 #endif
             gtk_widget_map (GTK_WIDGET (new_dock));
-        
+
         /* Make the widget resize. */
         gtk_widget_queue_resize (GTK_WIDGET (new_dock));
     }
@@ -1148,9 +1148,9 @@ egg_dock_get_item_by_name (EggDock     *dock,
                            const gchar *name)
 {
     EggDockObject *found;
-    
+
     g_return_val_if_fail (dock != NULL && name != NULL, NULL);
-    
+
     /* proxy the call to our master */
     found = egg_dock_master_get_object (EGG_DOCK_OBJECT_GET_MASTER (dock), name);
 
@@ -1162,9 +1162,9 @@ egg_dock_get_placeholder_by_name (EggDock     *dock,
                                   const gchar *name)
 {
     EggDockObject *found;
-    
+
     g_return_val_if_fail (dock != NULL && name != NULL, NULL);
-    
+
     /* proxy the call to our master */
     found = egg_dock_master_get_object (EGG_DOCK_OBJECT_GET_MASTER (dock), name);
 
@@ -1176,7 +1176,7 @@ GList *
 egg_dock_get_named_items (EggDock *dock)
 {
     GList *list = NULL;
-    
+
     g_return_val_if_fail (dock != NULL, NULL);
 
     egg_dock_master_foreach (EGG_DOCK_OBJECT_GET_MASTER (dock),
@@ -1189,7 +1189,7 @@ EggDock *
 egg_dock_object_get_toplevel (EggDockObject *object)
 {
     EggDockObject *parent = object;
-    
+
     g_return_val_if_fail (object != NULL, NULL);
 
     while (parent && !EGG_IS_DOCK (parent))
@@ -1217,9 +1217,9 @@ egg_dock_xor_rect (EggDock      *dock,
 
             values.function = GDK_INVERT;
             values.subwindow_mode = GDK_INCLUDE_INFERIORS;
-            dock->_priv->xor_gc = gdk_gc_new_with_values 
+            dock->_priv->xor_gc = gdk_gc_new_with_values
                 (widget->window, &values, GDK_GC_FUNCTION | GDK_GC_SUBWINDOW);
-        } else 
+        } else
             return;
     };
 
@@ -1227,19 +1227,19 @@ egg_dock_xor_rect (EggDock      *dock,
                                 GDK_LINE_ON_OFF_DASH,
                                 GDK_CAP_NOT_LAST,
                                 GDK_JOIN_BEVEL);
-    
+
     dash_list [0] = 1;
     dash_list [1] = 1;
-    
+
     gdk_gc_set_dashes (dock->_priv->xor_gc, 1, dash_list, 2);
 
-    gdk_draw_rectangle (widget->window, dock->_priv->xor_gc, 0, 
+    gdk_draw_rectangle (widget->window, dock->_priv->xor_gc, 0,
                         rect->x, rect->y,
                         rect->width, rect->height);
 
     gdk_gc_set_dashes (dock->_priv->xor_gc, 0, dash_list, 2);
 
-    gdk_draw_rectangle (widget->window, dock->_priv->xor_gc, 0, 
+    gdk_draw_rectangle (widget->window, dock->_priv->xor_gc, 0,
                         rect->x + 1, rect->y + 1,
                         rect->width - 2, rect->height - 2);
 }
diff --git a/libegg/iconchooser/prop-editor.c b/libegg/iconchooser/prop-editor.c
index 0f4efd5..279bf5f 100644
--- a/libegg/iconchooser/prop-editor.c
+++ b/libegg/iconchooser/prop-editor.c
@@ -808,8 +808,7 @@ create_prop_editor (GObject   *object,
 			   gtk_widget_get_screen (GTK_WIDGET (object)));
 
   tips = gtk_tooltips_new ();
-  g_object_ref (tips);
-  gtk_object_sink (GTK_OBJECT (tips));
+  g_object_ref_sink (tips);
 
   /* Kill the tips when the widget goes away.  */
   g_signal_connect (win, "destroy", G_CALLBACK (kill_tips), tips);
diff --git a/libegg/treeviewutils/eggcellrendererkeys.c b/libegg/treeviewutils/eggcellrendererkeys.c
index b65fa37..724b35b 100644
--- a/libegg/treeviewutils/eggcellrendererkeys.c
+++ b/libegg/treeviewutils/eggcellrendererkeys.c
@@ -128,7 +128,7 @@ marshal_VOID__STRING_UINT_FLAGS_UINT (GClosure     *closure,
       data1 = g_value_peek_pointer (param_values + 0);
       data2 = closure->data;
     }
-  
+
   callback = (GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT) (marshal_data ? marshal_data : cc->callback);
 
   callback (data1,
@@ -148,7 +148,7 @@ egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class)
   object_class = G_OBJECT_CLASS (cell_keys_class);
   cell_renderer_class = GTK_CELL_RENDERER_CLASS (cell_keys_class);
   parent_class = g_type_class_peek_parent (object_class);
-  
+
   GTK_CELL_RENDERER_CLASS (cell_keys_class)->start_editing = egg_cell_renderer_keys_start_editing;
 
   object_class->set_property = egg_cell_renderer_keys_set_property;
@@ -156,11 +156,11 @@ egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class)
   cell_renderer_class->get_size = egg_cell_renderer_keys_get_size;
 
   object_class->finalize = egg_cell_renderer_keys_finalize;
-  
+
   /* FIXME if this gets moved to a real library, rename the properties
    * to match whatever the GTK convention is
    */
-  
+
   g_object_class_install_property (object_class,
                                    PROP_ACCEL_KEY,
                                    g_param_spec_uint ("accel_key",
@@ -189,7 +189,7 @@ egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class)
 						      G_MAXINT,
 						      0,
 						      G_PARAM_READABLE | G_PARAM_WRITABLE));
-  
+
   /* FIXME: Register the enum when moving to GTK+ */
   g_object_class_install_property (object_class,
                                    PROP_ACCEL_MODE,
@@ -200,7 +200,7 @@ egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class)
 						     2,
 						     0,
 						     G_PARAM_READABLE | G_PARAM_WRITABLE));
-  
+
   g_signal_new ("accel_edited",
                 EGG_TYPE_CELL_RENDERER_KEYS,
                 G_SIGNAL_RUN_LAST,
@@ -233,7 +233,7 @@ egg_cell_renderer_keys_new (void)
 static void
 egg_cell_renderer_keys_finalize (GObject *object)
 {
-  
+
   (* G_OBJECT_CLASS (parent_class)->finalize) (object);
 }
 
@@ -259,7 +259,7 @@ egg_cell_renderer_keys_get_property  (GObject                  *object,
   g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (object));
 
   keys = EGG_CELL_RENDERER_KEYS (object);
-  
+
   switch (param_id)
     {
     case PROP_ACCEL_KEY:
@@ -290,7 +290,7 @@ egg_cell_renderer_keys_set_property  (GObject                  *object,
   g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (object));
 
   keys = EGG_CELL_RENDERER_KEYS (object);
-  
+
   switch (param_id)
     {
     case PROP_ACCEL_KEY:
@@ -316,13 +316,13 @@ egg_cell_renderer_keys_set_property  (GObject                  *object,
     case PROP_ACCEL_MODE:
       egg_cell_renderer_keys_set_accel_mode (keys, g_value_get_int (value));
       break;
-      
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
     }
 }
 
-static gboolean 
+static gboolean
 is_modifier (guint keycode)
 {
 #ifdef GDK_WINDOWING_X11
@@ -331,7 +331,7 @@ is_modifier (guint keycode)
   XModifierKeymap *mod_keymap;
   gboolean retval = FALSE;
 
-  mod_keymap = XGetModifierMapping (gdk_display);
+  mod_keymap = XGetModifierMapping (gdk_display_get_default ());
 
   map_size = 8 * mod_keymap->max_keypermod;
   i = 0;
@@ -350,7 +350,7 @@ is_modifier (guint keycode)
   return retval;
 #else
   /* Bogus, doesn't take into account the fact that CapsLock is a
-   * modifier on some keyboard layouts. (I think?) 
+   * modifier on some keyboard layouts. (I think?)
    */
   return ((keycode == VK_SHIFT) ||
 	  (keycode == VK_LSHIFT) ||
@@ -392,7 +392,7 @@ egg_cell_renderer_keys_get_size (GtkCellRenderer *cell,
 /* FIXME: Currently we don't differentiate between a 'bogus' key (like tab in
  * GTK mode) and a removed key.
  */
-   
+
 static gboolean
 grab_key_callback (GtkWidget    *widget,
                    GdkEventKey  *event,
@@ -404,10 +404,10 @@ grab_key_callback (GtkWidget    *widget,
   char *path;
   gboolean edited;
   gboolean cleared;
-  GdkModifierType consumed_modifiers;  
+  GdkModifierType consumed_modifiers;
   guint upper;
   GdkModifierType ignored_modifiers;
-  
+
   keys = EGG_CELL_RENDERER_KEYS (data);
 
   if (is_modifier (event->hardware_keycode))
@@ -425,11 +425,11 @@ grab_key_callback (GtkWidget    *widget,
 
   upper = event->keyval;
   accel_keyval = gdk_keyval_to_lower (upper);
-  if (accel_keyval == GDK_ISO_Left_Tab) 
+  if (accel_keyval == GDK_ISO_Left_Tab)
     accel_keyval = GDK_Tab;
 
 
-  
+
   /* Put shift back if it changed the case of the key, not otherwise.
    */
   if (upper != accel_keyval &&
@@ -442,7 +442,7 @@ grab_key_callback (GtkWidget    *widget,
                                         EGG_VIRTUAL_NUM_LOCK_MASK |
                                         EGG_VIRTUAL_SCROLL_LOCK_MASK,
                                         &ignored_modifiers);
-  
+
   /* http://bugzilla.gnome.org/show_bug.cgi?id=139605
    * mouse keys should effect keybindings */
   ignored_modifiers |=	GDK_BUTTON1_MASK |
@@ -459,7 +459,7 @@ grab_key_callback (GtkWidget    *widget,
     accel_mods = event->state & GDK_MODIFIER_MASK & ~(ignored_modifiers);
   else
     g_assert_not_reached ();
-    
+
   if (accel_mods == 0 && accel_keyval == GDK_Escape)
     goto out; /* cancel */
 
@@ -478,19 +478,19 @@ grab_key_callback (GtkWidget    *widget,
 	  accel_mods = 0;
 	}
     }
-  
+
   edited = TRUE;
  out:
   gdk_keyboard_ungrab (event->time);
   gdk_pointer_ungrab (event->time);
-  
+
   path = g_strdup (g_object_get_data (G_OBJECT (keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH));
 
   gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (keys->edit_widget));
   gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (keys->edit_widget));
   keys->edit_widget = NULL;
   keys->grab_widget = NULL;
-  
+
   if (edited)
     {
       g_signal_emit_by_name (G_OBJECT (keys), "accel_edited", path,
@@ -555,7 +555,7 @@ pointless_eventbox_subclass_get_type (void)
         NULL, NULL };
 
       eventbox_type = g_type_register_static (GTK_TYPE_EVENT_BOX, "EggCellEditableEventBox", &eventbox_info, 0);
-      
+
       g_type_add_interface_static (eventbox_type,
 				   GTK_TYPE_CELL_EDITABLE,
 				   &cell_editable_info);
@@ -577,16 +577,16 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer      *cell,
   EggCellRendererKeys *keys;
   GtkWidget *label;
   GtkWidget *eventbox;
-  
+
   celltext = GTK_CELL_RENDERER_TEXT (cell);
   keys = EGG_CELL_RENDERER_KEYS (cell);
-  
+
   /* If the cell isn't editable we return NULL. */
   if (celltext->editable == FALSE)
     return NULL;
 
   g_return_val_if_fail (widget->window != NULL, NULL);
-  
+
   if (gdk_keyboard_grab (widget->window, FALSE,
                          gdk_event_get_time (event)) != GDK_GRAB_SUCCESS)
     return NULL;
@@ -599,7 +599,7 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer      *cell,
       gdk_keyboard_ungrab (gdk_event_get_time (event));
       return NULL;
     }
-  
+
   keys->grab_widget = widget;
 
   g_signal_connect (G_OBJECT (widget), "key_press_event",
@@ -611,31 +611,31 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer      *cell,
   keys->edit_widget = eventbox;
   g_object_add_weak_pointer (G_OBJECT (keys->edit_widget),
                              (void**) &keys->edit_widget);
-  
+
   label = gtk_label_new (NULL);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  
+
   gtk_widget_modify_bg (eventbox, GTK_STATE_NORMAL,
                         &widget->style->bg[GTK_STATE_SELECTED]);
 
   gtk_widget_modify_fg (label, GTK_STATE_NORMAL,
                         &widget->style->fg[GTK_STATE_SELECTED]);
-  
+
   gtk_label_set_text (GTK_LABEL (label),
 		  TOOLTIP_TEXT);
 
   gtk_container_add (GTK_CONTAINER (eventbox), label);
-  
+
   g_object_set_data_full (G_OBJECT (keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH,
                           g_strdup (path), g_free);
-  
+
   gtk_widget_show_all (keys->edit_widget);
 
   g_signal_connect (G_OBJECT (keys->edit_widget), "unrealize",
                     G_CALLBACK (ungrab_stuff), keys);
-  
+
   keys->edit_key = keys->accel_key;
-  
+
   return GTK_CELL_EDITABLE (keys->edit_widget);
 }
 
@@ -654,7 +654,7 @@ egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys,
   g_object_freeze_notify (G_OBJECT (keys));
 
   changed = FALSE;
-  
+
   if (keyval != keys->accel_key)
     {
       keys->accel_key = keyval;
@@ -668,7 +668,7 @@ egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys,
 
       g_object_notify (G_OBJECT (keys), "accel_mask");
       changed = TRUE;
-    }  
+    }
 
   if (keycode != keys->keycode)
     {
@@ -687,7 +687,7 @@ egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys,
       g_object_set (keys, "text", text, NULL);
       g_free (text);
     }
-  
+
 }
 
 void



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