[gnome-commander] Replaced obsoleted gtk_object_unref() with g_object_unref()



commit 9a0580eda204821ede867ab9b4a03dbd8aedb85c
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Wed Jun 23 23:31:59 2010 +0200

    Replaced obsoleted gtk_object_unref() with g_object_unref()

 src/gnome-cmd-combo.cc               |    2 +-
 src/gnome-cmd-file-selector.cc       |   14 +++++++-------
 src/gnome-cmd-main-win.cc            |    2 +-
 src/gnome-cmd-prepare-copy-dialog.cc |    8 ++++----
 src/gnome-cmd-prepare-move-dialog.cc |    6 +++---
 src/gnome-cmd-remote-dialog.cc       |    2 +-
 src/gnome-cmd-search-dialog.cc       |   14 +++++++-------
 src/utils.cc                         |    6 +++---
 8 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/src/gnome-cmd-combo.cc b/src/gnome-cmd-combo.cc
index 77c7b38..1c85a68 100644
--- a/src/gnome-cmd-combo.cc
+++ b/src/gnome-cmd-combo.cc
@@ -469,7 +469,7 @@ GnomeCmdCombo::GnomeCmdCombo(gint num_cols, gint _text_col, gchar **col_titles):
     list = col_titles ? gnome_cmd_clist_new_with_titles (num_cols, col_titles) : gnome_cmd_clist_new (num_cols);
 
     gtk_widget_ref (list);
-    g_object_set_data_full (*this, "list", list, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*this, "list", list, g_object_unref);
 
     // We'll use enter notify events to figure out when to transfer the grab to the list
     gtk_container_add (GTK_CONTAINER (popup), list);
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 8245d76..211a4ec 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -380,7 +380,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
 
         GtkWidget *hbox = gtk_hbox_new (FALSE, 1);
         gtk_widget_ref (hbox);
-        g_object_set_data_full (*fs, "con-hbox", hbox, (GDestroyNotify) gtk_widget_unref);
+        g_object_set_data_full (*fs, "con-hbox", hbox, g_object_unref);
         gtk_widget_show (hbox);
 
         if (pm)
@@ -389,7 +389,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
             if (pixmap)
             {
                 gtk_widget_ref (pixmap);
-                g_object_set_data_full (*fs, "con-pixmap", pixmap, (GDestroyNotify) gtk_widget_unref);
+                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);
             }
@@ -399,7 +399,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
         {
             GtkWidget *label = gtk_label_new (gnome_cmd_con_get_alias (con));
             gtk_widget_ref (label);
-            g_object_set_data_full (*fs, "con-label", label, (GDestroyNotify) gtk_widget_unref);
+            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);
         }
@@ -721,7 +721,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_set_data_full (*fs, "con_combo", fs->con_combo, (GDestroyNotify) gtk_widget_unref);
+    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);
     gtk_entry_set_editable (GTK_ENTRY (fs->con_combo->entry), FALSE);
@@ -732,13 +732,13 @@ 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_set_data_full (*fs, "vol_label", fs->vol_label, (GDestroyNotify) gtk_widget_unref);
+    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_set_data_full (*fs, "dir_indicator", fs->dir_indicator, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*fs, "dir_indicator", fs->dir_indicator, g_object_unref);
 
     // hide dir column
     fs->file_list()->show_column(GnomeCmdFileList::COLUMN_DIR, FALSE);
@@ -746,7 +746,7 @@ static void init (GnomeCmdFileSelector *fs)
     // create the info label
     fs->info_label = gtk_label_new ("not initialized");
     gtk_widget_ref (fs->info_label);
-    g_object_set_data_full (*fs, "infolabel", fs->info_label, (GDestroyNotify) gtk_widget_unref);
+    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);
 
     // pack the widgets
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index b042dd8..5b28729 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -1276,7 +1276,7 @@ void GnomeCmdMainWin::update_list_orientation()
     priv->paned = gnome_cmd_data.list_orientation ? gtk_vpaned_new () : gtk_hpaned_new ();
 
     gtk_widget_ref (priv->paned);
-    g_object_set_data_full (*this, "paned", priv->paned, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*this, "paned", priv->paned, g_object_unref);
     gtk_widget_show (priv->paned);
 
     gtk_paned_pack1 (GTK_PANED (priv->paned), priv->file_selector[LEFT], TRUE, TRUE);
diff --git a/src/gnome-cmd-prepare-copy-dialog.cc b/src/gnome-cmd-prepare-copy-dialog.cc
index dc7ec57..ed6f2ff 100644
--- a/src/gnome-cmd-prepare-copy-dialog.cc
+++ b/src/gnome-cmd-prepare-copy-dialog.cc
@@ -91,21 +91,21 @@ void gnome_cmd_prepare_copy_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
     data->silent = gtk_radio_button_new_with_label (group, _("Silently"));
     group = gtk_radio_button_group (GTK_RADIO_BUTTON (data->silent));
     gtk_widget_ref (data->silent);
-    g_object_set_data_full (G_OBJECT (data->dialog), "silent", data->silent, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "silent", data->silent, g_object_unref);
     gtk_widget_show (data->silent);
     gtk_box_pack_start (GTK_BOX (data->dialog->left_vbox), data->silent, FALSE, FALSE, 0);
 
     data->query = gtk_radio_button_new_with_label (group, _("Query First"));
     group = gtk_radio_button_group (GTK_RADIO_BUTTON (data->query));
     gtk_widget_ref (data->query);
-    g_object_set_data_full (G_OBJECT (data->dialog), "query", data->query, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "query", data->query, g_object_unref);
     gtk_widget_show (data->query);
     gtk_box_pack_start (GTK_BOX (data->dialog->left_vbox), data->query, FALSE, FALSE, 0);
 
     data->skip = gtk_radio_button_new_with_label (group, _("Skip All"));
     group = gtk_radio_button_group (GTK_RADIO_BUTTON (data->skip));
     gtk_widget_ref (data->skip);
-    g_object_set_data_full (G_OBJECT (data->dialog), "skip", data->skip, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "skip", data->skip, g_object_unref);
     gtk_widget_show (data->skip);
     gtk_box_pack_start (GTK_BOX (data->dialog->left_vbox), data->skip, FALSE, FALSE, 0);
 
@@ -114,7 +114,7 @@ void gnome_cmd_prepare_copy_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
 
     data->follow_links = gtk_check_button_new_with_label (_("Follow Links"));
     gtk_widget_ref (data->follow_links);
-    g_object_set_data_full (G_OBJECT (data->dialog), "follow_links", data->follow_links, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "follow_links", data->follow_links, g_object_unref);
     gtk_widget_show (data->follow_links);
     gtk_box_pack_start (GTK_BOX (data->dialog->right_vbox), data->follow_links, FALSE, FALSE, 0);
 
diff --git a/src/gnome-cmd-prepare-move-dialog.cc b/src/gnome-cmd-prepare-move-dialog.cc
index ee00fd7..b88c8dd 100644
--- a/src/gnome-cmd-prepare-move-dialog.cc
+++ b/src/gnome-cmd-prepare-move-dialog.cc
@@ -84,21 +84,21 @@ void gnome_cmd_prepare_move_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
     data->silent = gtk_radio_button_new_with_label (group, _("Silently"));
     group = gtk_radio_button_group (GTK_RADIO_BUTTON (data->silent));
     gtk_widget_ref (data->silent);
-    g_object_set_data_full (G_OBJECT (data->dialog), "silent", data->silent, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "silent", data->silent, g_object_unref);
     gtk_widget_show (data->silent);
     gtk_box_pack_start (GTK_BOX (data->dialog->left_vbox), data->silent, FALSE, FALSE, 0);
 
     data->query = gtk_radio_button_new_with_label (group, _("Query First"));
     group = gtk_radio_button_group (GTK_RADIO_BUTTON (data->query));
     gtk_widget_ref (data->query);
-    g_object_set_data_full (G_OBJECT (data->dialog), "query", data->query, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "query", data->query, g_object_unref);
     gtk_widget_show (data->query);
     gtk_box_pack_start (GTK_BOX (data->dialog->left_vbox), data->query, FALSE, FALSE, 0);
 
     data->skip = gtk_radio_button_new_with_label (group, _("Skip All"));
     group = gtk_radio_button_group (GTK_RADIO_BUTTON (data->skip));
     gtk_widget_ref (data->skip);
-    g_object_set_data_full (G_OBJECT (data->dialog), "skip", data->skip, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "skip", data->skip, g_object_unref);
     gtk_widget_show (data->skip);
     gtk_box_pack_start (GTK_BOX (data->dialog->left_vbox), data->skip, FALSE, FALSE, 0);
 
diff --git a/src/gnome-cmd-remote-dialog.cc b/src/gnome-cmd-remote-dialog.cc
index bd030c6..0aa2d2c 100644
--- a/src/gnome-cmd-remote-dialog.cc
+++ b/src/gnome-cmd-remote-dialog.cc
@@ -461,7 +461,7 @@ static void init (GnomeCmdRemoteDialog *ftp_dialog)
 
     ftp_dialog->priv->connection_list = create_view_and_model (get_ftp_cons ());
     gtk_widget_ref (ftp_dialog->priv->connection_list);
-    g_object_set_data_full (G_OBJECT (dialog), "connection_list", ftp_dialog->priv->connection_list, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (dialog), "connection_list", ftp_dialog->priv->connection_list, g_object_unref);
     gtk_widget_show (ftp_dialog->priv->connection_list);
     gtk_container_add (GTK_CONTAINER (sw), ftp_dialog->priv->connection_list);
     gtk_widget_set_size_request (ftp_dialog->priv->connection_list, -1, 240);
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index f4afd42..4c5b9b6 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -733,7 +733,7 @@ inline GtkWidget *create_label_with_mnemonic (GtkWidget *parent, const gchar *te
       gtk_label_set_mnemonic_widget (GTK_LABEL (label), for_widget);
 
     gtk_widget_ref (label);
-    g_object_set_data_full (G_OBJECT (parent), "label", label, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "label", label, g_object_unref);
     gtk_widget_show (label);
     gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 
@@ -748,7 +748,7 @@ inline GtkWidget *create_check_with_mnemonic (GtkWidget *parent, const gchar *te
     GtkWidget *btn = gtk_check_button_new_with_mnemonic (text);
 
     gtk_widget_ref (btn);
-    g_object_set_data_full (G_OBJECT (parent), name, btn, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, btn, g_object_unref);
     gtk_widget_show (btn);
 
     return btn;
@@ -762,7 +762,7 @@ inline GtkWidget *create_radio_with_mnemonic (GtkWidget *parent, GSList *group,
     GtkWidget *radio = gtk_radio_button_new_with_mnemonic (group, text);
 
     gtk_widget_ref (radio);
-    g_object_set_data_full (G_OBJECT (parent), name, radio, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, radio, g_object_unref);
     gtk_widget_show (radio);
 
     return radio;
@@ -775,7 +775,7 @@ inline GtkWidget *create_combo_box_entry (GtkWidget *parent)
 {
     GtkWidget *combo = gtk_combo_box_entry_new_text ();
     gtk_widget_ref (combo);
-    g_object_set_data_full (G_OBJECT (parent), "combo", combo, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "combo", combo, g_object_unref);
     gtk_widget_show (combo);
     return combo;
 }
@@ -898,14 +898,14 @@ static void init (GnomeCmdSearchDialog *dialog)
 
     sw = gtk_scrolled_window_new (NULL, NULL);
     gtk_widget_ref (sw);
-    g_object_set_data_full (G_OBJECT (window), "sw", sw, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (window), "sw", sw, g_object_unref);
     gtk_widget_show (sw);
     gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
     dialog->priv->result_list = new GnomeCmdFileList;
     gtk_widget_ref (GTK_WIDGET (dialog->priv->result_list));
-    g_object_set_data_full (G_OBJECT (window), "result_list", GTK_WIDGET (dialog->priv->result_list), (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (window), "result_list", GTK_WIDGET (dialog->priv->result_list), g_object_unref);
     gtk_widget_set_size_request (GTK_WIDGET (dialog->priv->result_list), -1, 200);
     gtk_widget_show (GTK_WIDGET (dialog->priv->result_list));
     gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (dialog->priv->result_list));
@@ -915,7 +915,7 @@ static void init (GnomeCmdSearchDialog *dialog)
     dialog->priv->statusbar = gtk_statusbar_new ();
     gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (dialog->priv->statusbar), FALSE);
     gtk_widget_ref (dialog->priv->statusbar);
-    g_object_set_data_full (G_OBJECT (window), "statusbar", dialog->priv->statusbar, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (window), "statusbar", dialog->priv->statusbar, g_object_unref);
     gtk_widget_show (dialog->priv->statusbar);
     gtk_box_pack_start (GTK_BOX (vbox), dialog->priv->statusbar, FALSE, TRUE, 0);
 
diff --git a/src/utils.cc b/src/utils.cc
index 8a42edd..19ad250 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -902,7 +902,7 @@ GtkWidget *create_styled_pixmap_button (const gchar *text, GnomeCmdPixmap *pm)
     GtkWidget *label = NULL;
     GtkWidget *pixmap = NULL;
 
-    g_object_set_data_full (G_OBJECT (btn), "hbox", hbox, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (btn), "hbox", hbox, g_object_unref);
     gtk_widget_ref (hbox);
     gtk_widget_show (hbox);
 
@@ -912,7 +912,7 @@ GtkWidget *create_styled_pixmap_button (const gchar *text, GnomeCmdPixmap *pm)
         if (pixmap)
         {
             gtk_widget_ref (pixmap);
-            g_object_set_data_full (G_OBJECT (btn), "pixmap", pixmap, (GDestroyNotify) gtk_widget_unref);
+            g_object_set_data_full (G_OBJECT (btn), "pixmap", pixmap, g_object_unref);
             gtk_widget_show (pixmap);
         }
     }
@@ -921,7 +921,7 @@ GtkWidget *create_styled_pixmap_button (const gchar *text, GnomeCmdPixmap *pm)
     {
         label = gtk_label_new (text);
         gtk_widget_ref (label);
-        g_object_set_data_full (G_OBJECT (btn), "label", label, (GDestroyNotify) gtk_widget_unref);
+        g_object_set_data_full (G_OBJECT (btn), "label", label, g_object_unref);
         gtk_widget_show (label);
     }
 



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