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



commit 01e3ef3cf0d3f7fc86471c2ab3a1eb5b0f13e288
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Aug 3 17:57:51 2010 +0200

    Replaced obsoleted gtk_object_ref() with g_object_ref() 4/5

 src/gnome-cmd-file-list.cc     |   16 ++++++++--------
 src/gnome-cmd-file-selector.cc |   18 +++++++++---------
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 49d08e3..f68b8e5 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -376,7 +376,7 @@ inline void show_selpat_dialog (GnomeCmdFileList *fl, gboolean mode)
 
     GtkWidget *dialog = gnome_cmd_patternsel_dialog_new (fl, mode);
 
-    gtk_widget_ref (dialog);
+    g_object_ref (dialog);
     g_signal_connect (dialog, "hide", G_CALLBACK (on_selpat_hide), fl);
     gtk_widget_show (dialog);
 
@@ -619,18 +619,18 @@ void GnomeCmdFileList::create_column_titles()
         GdkBitmap *bm = IMAGE_get_mask (PIXMAP_FLIST_ARROW_BLANK);
 
         hbox = gtk_hbox_new (FALSE, 1);
-        gtk_widget_ref (hbox);
+        g_object_ref (hbox);
         g_object_set_data_full (*this, "column-hbox", hbox, g_object_unref);
         gtk_widget_show (hbox);
 
         priv->column_labels[i] = gtk_label_new (_(file_list_column[i].title));
-        gtk_widget_ref (priv->column_labels[i]);
+        g_object_ref (priv->column_labels[i]);
         g_object_set_data_full (*this, "column-label", priv->column_labels[i], g_object_unref);
         gtk_widget_show (priv->column_labels[i]);
         gtk_box_pack_start (GTK_BOX (hbox), priv->column_labels[i], TRUE, TRUE, 0);
 
         pixmap = gtk_pixmap_new (pm, bm);
-        gtk_widget_ref (pixmap);
+        g_object_ref (pixmap);
         g_object_set_data_full (*this, "column-pixmap", pixmap, g_object_unref);
         gtk_widget_show (pixmap);
         gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0);
@@ -763,7 +763,7 @@ static void show_file_popup (GnomeCmdFileList *fl, GdkEventButton *event)
     GtkWidget *menu = gnome_cmd_file_popmenu_new (fl);
     if (!menu) return;
 
-    gtk_widget_ref (menu);
+    g_object_ref (menu);
     g_object_set_data_full (*fl, "file_popup_menu", menu, g_object_unref);
 
     gnome_popup_menu_do_popup (menu, (GtkMenuPositionFunc) popup_position_function, fl, event, fl, NULL);
@@ -1487,7 +1487,7 @@ static void create_con_open_progress_dialog (GnomeCmdFileList *fl)
     g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
 
     fl->priv->con_open_dialog = gnome_cmd_dialog_new (NULL);
-    gtk_widget_ref (fl->priv->con_open_dialog);
+    g_object_ref (fl->priv->con_open_dialog);
 
     gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (fl->priv->con_open_dialog),
                                  GTK_STOCK_CANCEL,
@@ -2133,7 +2133,7 @@ void gnome_cmd_file_list_show_rename_dialog (GnomeCmdFileList *fl)
 
         GtkWidget *dialog = gnome_cmd_rename_dialog_new (f, x, y, w, h);
 
-        gtk_widget_ref (dialog);
+        g_object_ref (dialog);
         gtk_widget_show (dialog);
     }
 }
@@ -2249,7 +2249,7 @@ void gnome_cmd_file_list_show_quicksearch (GnomeCmdFileList *fl, gchar c)
     fl->priv->quicksearch_popup = gnome_cmd_quicksearch_popup_new (fl);
     text[0] = c;
     text[1] = '\0';
-    gtk_widget_ref (fl->priv->quicksearch_popup);
+    g_object_ref (fl->priv->quicksearch_popup);
     gtk_widget_show (fl->priv->quicksearch_popup);
     if (c != 0)
     {
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index a492c2e..12214e6 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -105,7 +105,7 @@ inline void show_list_popup (GnomeCmdFileSelector *fs)
 {
     // create the popup menu
     GtkWidget *menu = gnome_cmd_list_popmenu_new (fs);
-    gtk_widget_ref (menu);
+    g_object_ref (menu);
 
     gtk_menu_popup (GTK_MENU(menu), NULL, NULL, NULL, fs, 3, GDK_CURRENT_TIME);
 }
@@ -379,7 +379,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
         gtk_tooltips_set_tip (tooltips, btn, gnome_cmd_con_get_go_text (con), NULL);
 
         GtkWidget *hbox = gtk_hbox_new (FALSE, 1);
-        gtk_widget_ref (hbox);
+        g_object_ref (hbox);
         g_object_set_data_full (*fs, "con-hbox", hbox, g_object_unref);
         gtk_widget_show (hbox);
 
@@ -388,7 +388,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
             GtkWidget *pixmap = gtk_pixmap_new (pm->pixmap, pm->mask);
             if (pixmap)
             {
-                gtk_widget_ref (pixmap);
+                g_object_ref (pixmap);
                 g_object_set_data_full (*fs, "con-pixmap", pixmap, g_object_unref);
                 gtk_widget_show (pixmap);
                 gtk_box_pack_start (GTK_BOX (hbox), pixmap, TRUE, TRUE, 0);
@@ -398,7 +398,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
         if (!gnome_cmd_data.device_only_icon || !pm)
         {
             GtkWidget *label = gtk_label_new (gnome_cmd_con_get_alias (con));
-            gtk_widget_ref (label);
+            g_object_ref (label);
             g_object_set_data_full (*fs, "con-label", label, g_object_unref);
             gtk_widget_show (label);
             gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
@@ -719,7 +719,7 @@ static void init (GnomeCmdFileSelector *fs)
 
     // create the connection combo
     fs->con_combo = new GnomeCmdCombo(2, 1);
-    gtk_widget_ref (*fs->con_combo);
+    g_object_ref (fs->con_combo);
     g_object_set_data_full (*fs, "con_combo", fs->con_combo, g_object_unref);
     gtk_widget_set_size_request (*fs->con_combo, 150, -1);
     gtk_clist_set_row_height (GTK_CLIST (fs->con_combo->list), 20);
@@ -730,18 +730,18 @@ static void init (GnomeCmdFileSelector *fs)
 
     // create the free space on volume label
     fs->vol_label = gtk_label_new ("");
-    gtk_widget_ref (fs->vol_label);
+    g_object_ref (fs->vol_label);
     g_object_set_data_full (*fs, "vol_label", fs->vol_label, g_object_unref);
     gtk_misc_set_alignment (GTK_MISC (fs->vol_label), 1, 0.5);
 
     // create the directory indicator
     fs->dir_indicator = gnome_cmd_dir_indicator_new (fs);
-    gtk_widget_ref (fs->dir_indicator);
+    g_object_ref (fs->dir_indicator);
     g_object_set_data_full (*fs, "dir_indicator", fs->dir_indicator, g_object_unref);
 
     // create the info label
     fs->info_label = gtk_label_new ("not initialized");
-    gtk_widget_ref (fs->info_label);
+    g_object_ref (fs->info_label);
     g_object_set_data_full (*fs, "infolabel", fs->info_label, g_object_unref);
     gtk_misc_set_alignment (GTK_MISC (fs->info_label), 0.0f, 0.5f);
 
@@ -1030,7 +1030,7 @@ void gnome_cmd_file_selector_show_new_textfile_dialog (GnomeCmdFileSelector *fs)
     if (f)
         gnome_cmd_string_dialog_set_value (GNOME_CMD_STRING_DIALOG (dialog), 0, f->info->name);
 
-    gtk_widget_ref (dialog);
+    g_object_ref (dialog);
     gtk_widget_show (dialog);
 }
 



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