[gnome-commander] Replaced obsoleted gtk_object_ref() with g_object_ref()



commit 8565f075b9d312488b755c3d15c4b1196f0efc0e
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Aug 10 20:39:49 2010 +0200

    Replaced obsoleted gtk_object_ref() with g_object_ref()

 src/gnome-cmd-dir-indicator.cc |   12 ++++++------
 src/utils.cc                   |    8 ++++----
 src/widget-factory.h           |    4 ++--
 3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/gnome-cmd-dir-indicator.cc b/src/gnome-cmd-dir-indicator.cc
index cd28c80..2ebf629 100644
--- a/src/gnome-cmd-dir-indicator.cc
+++ b/src/gnome-cmd-dir-indicator.cc
@@ -339,7 +339,7 @@ static void add_menu_item (GnomeCmdDirIndicator *indicator, GtkMenuShell *shell,
 {
     GtkWidget *item = text ? gtk_menu_item_new_with_label (text) : gtk_menu_item_new ();
 
-    gtk_widget_ref (item);
+    g_object_ref (item);
     g_object_set_data (G_OBJECT (item), "indicator", indicator);
     g_object_set_data_full (G_OBJECT (shell), "menu_item", item, g_object_unref);
     if (func)
@@ -356,7 +356,7 @@ void gnome_cmd_dir_indicator_show_history (GnomeCmdDirIndicator *indicator)
     if (indicator->priv->dir_history_popup) return;
 
     indicator->priv->dir_history_popup = gtk_menu_new ();
-    gtk_widget_ref (indicator->priv->dir_history_popup);
+    g_object_ref (indicator->priv->dir_history_popup);
     g_object_set_data_full (G_OBJECT (indicator), "dir_history_popup", indicator->priv->dir_history_popup, g_object_unref);
     g_signal_connect (indicator->priv->dir_history_popup, "hide", G_CALLBACK (on_dir_history_popup_hide), indicator);
 
@@ -411,7 +411,7 @@ void gnome_cmd_dir_indicator_show_bookmarks (GnomeCmdDirIndicator *indicator)
     if (indicator->priv->bookmark_popup) return;
 
     indicator->priv->bookmark_popup = gtk_menu_new ();
-    gtk_widget_ref (indicator->priv->bookmark_popup);
+    g_object_ref (indicator->priv->bookmark_popup);
     g_object_set_data_full (G_OBJECT (indicator), "bookmark_popup", indicator->priv->bookmark_popup, g_object_unref);
     g_signal_connect (indicator->priv->bookmark_popup, "hide", G_CALLBACK (on_bookmark_popup_hide), indicator);
 
@@ -458,7 +458,7 @@ static void init (GnomeCmdDirIndicator *indicator)
 
     // create the directory label and its event box
     indicator->priv->event_box = gtk_event_box_new ();
-    gtk_widget_ref (indicator->priv->event_box);
+    g_object_ref (indicator->priv->event_box);
     g_signal_connect_swapped (indicator->priv->event_box, "motion-notify-event", G_CALLBACK (on_dir_indicator_motion), indicator);
     g_signal_connect_swapped (indicator->priv->event_box, "leave-notify-event", G_CALLBACK (on_dir_indicator_leave), indicator);
     gtk_widget_set_events (indicator->priv->event_box, GDK_POINTER_MOTION_MASK);
@@ -471,13 +471,13 @@ static void init (GnomeCmdDirIndicator *indicator)
     // create the history popup button
     indicator->priv->history_button = gtk_button_new ();
     GTK_WIDGET_UNSET_FLAGS (indicator->priv->history_button, GTK_CAN_FOCUS);
-    gtk_widget_ref (indicator->priv->history_button);
+    g_object_ref (indicator->priv->history_button);
     gtk_button_set_relief (GTK_BUTTON (indicator->priv->history_button), gnome_cmd_data.button_relief);
     g_object_set_data_full (G_OBJECT (indicator), "button", indicator->priv->history_button, g_object_unref);
     gtk_widget_show (indicator->priv->history_button);
 
     arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
-    gtk_widget_ref (arrow);
+    g_object_ref (arrow);
     g_object_set_data_full (G_OBJECT (indicator), "arrow", arrow, g_object_unref);
     gtk_widget_show (arrow);
     gtk_container_add (GTK_CONTAINER (indicator->priv->history_button), arrow);
diff --git a/src/utils.cc b/src/utils.cc
index 19ad250..b333ff1 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -886,7 +886,7 @@ GtkWidget *create_styled_button (const gchar *text)
     GtkWidget *w = text ? gtk_button_new_with_label (text) : gtk_button_new ();
 
     gtk_button_set_relief (GTK_BUTTON (w), gnome_cmd_data.button_relief);
-    gtk_widget_ref (w);
+    g_object_ref (w);
     gtk_widget_show (w);
 
     return w;
@@ -903,7 +903,7 @@ GtkWidget *create_styled_pixmap_button (const gchar *text, GnomeCmdPixmap *pm)
     GtkWidget *pixmap = NULL;
 
     g_object_set_data_full (G_OBJECT (btn), "hbox", hbox, g_object_unref);
-    gtk_widget_ref (hbox);
+    g_object_ref (hbox);
     gtk_widget_show (hbox);
 
     if (pm)
@@ -911,7 +911,7 @@ GtkWidget *create_styled_pixmap_button (const gchar *text, GnomeCmdPixmap *pm)
         pixmap = gtk_pixmap_new (pm->pixmap, pm->mask);
         if (pixmap)
         {
-            gtk_widget_ref (pixmap);
+            g_object_ref (pixmap);
             g_object_set_data_full (G_OBJECT (btn), "pixmap", pixmap, g_object_unref);
             gtk_widget_show (pixmap);
         }
@@ -920,7 +920,7 @@ GtkWidget *create_styled_pixmap_button (const gchar *text, GnomeCmdPixmap *pm)
     if (text)
     {
         label = gtk_label_new (text);
-        gtk_widget_ref (label);
+        g_object_ref (label);
         g_object_set_data_full (G_OBJECT (btn), "label", label, g_object_unref);
         gtk_widget_show (label);
     }
diff --git a/src/widget-factory.h b/src/widget-factory.h
index e732bf5..19df333 100644
--- a/src/widget-factory.h
+++ b/src/widget-factory.h
@@ -27,8 +27,8 @@
 inline GnomeCmdCombo *create_clist_combo (GtkWidget *parent, gint num_cols, gint text_col, gchar **titles)
 {
     GnomeCmdCombo *combo = new GnomeCmdCombo(num_cols, text_col, titles);
-    gtk_widget_ref (*combo);
-    g_object_set_data_full (G_OBJECT (parent), "combo", combo, (GDestroyNotify) gtk_widget_unref);
+    g_object_ref (combo);
+    g_object_set_data_full (G_OBJECT (parent), "combo", combo, (GDestroyNotify) g_object_unref);
     gtk_widget_show (*combo);
 
     return combo;



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