[gnome-commander] Replacing obsoleted gtk_object_set_data_full() with g_object_set_data_full()



commit 6638649613e28ca9da5bc76422216ae608618fdd
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jun 21 20:07:29 2010 +0200

    Replacing obsoleted gtk_object_set_data_full() with g_object_set_data_full()

 libgcmd/libgcmd-widget-factory.cc  |   64 +++++++++++++++---------------------
 plugins/cvs/interface.cc           |   17 ++++------
 src/gnome-cmd-chmod-dialog.cc      |    4 +--
 src/gnome-cmd-chown-dialog.cc      |    4 +--
 src/gnome-cmd-cmdline.cc           |    9 ++---
 src/gnome-cmd-combo.cc             |   14 ++++----
 src/gnome-cmd-dir-indicator.cc     |    8 ++---
 src/gnome-cmd-file-list.cc         |    8 ++--
 src/gnome-cmd-file-popmenu.cc      |    2 +-
 src/gnome-cmd-file-props-dialog.cc |    8 ++---
 src/gnome-cmd-main-win.cc          |   20 ++++++------
 src/gnome-cmd-options-dialog.cc    |    8 ++---
 12 files changed, 70 insertions(+), 96 deletions(-)
---
diff --git a/libgcmd/libgcmd-widget-factory.cc b/libgcmd/libgcmd-widget-factory.cc
index 62d27f5..169a3cc 100644
--- a/libgcmd/libgcmd-widget-factory.cc
+++ b/libgcmd/libgcmd-widget-factory.cc
@@ -58,8 +58,7 @@ GtkWidget *create_frame (GtkWidget *parent, const gchar *text, gint spacing)
 {
     GtkWidget *frame = gtk_frame_new (text);
     gtk_widget_ref (frame);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "spaced_frame", frame,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "spaced_frame", frame, g_object_unref);
     gtk_container_set_border_width (GTK_CONTAINER (frame), spacing);
     gtk_widget_show (frame);
     return frame;
@@ -86,8 +85,7 @@ GtkWidget *create_table (GtkWidget *parent, gint rows, gint cols)
 {
     GtkWidget *table = gtk_table_new (rows, cols, FALSE);
     gtk_widget_ref (table);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "table", table,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "table", table, g_object_unref);
     gtk_widget_show (table);
     gtk_table_set_row_spacings (GTK_TABLE (table), 6);
     gtk_table_set_col_spacings (GTK_TABLE (table), 12);
@@ -100,8 +98,7 @@ GtkWidget *create_vbox (GtkWidget *parent, gboolean h, gint s)
 {
     GtkWidget *vbox = gtk_vbox_new (h, s);
     gtk_widget_ref (vbox);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "vbox", vbox,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "vbox", vbox, g_object_unref);
     gtk_widget_show (vbox);
 
     return vbox;
@@ -112,8 +109,7 @@ GtkWidget *create_hbox (GtkWidget *parent, gboolean h, gint s)
 {
     GtkWidget *hbox = gtk_hbox_new (h, s);
     gtk_widget_ref (hbox);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "hbox", hbox,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "hbox", hbox, g_object_unref);
     gtk_widget_show (hbox);
 
     return hbox;
@@ -126,8 +122,7 @@ GtkWidget *create_label (GtkWidget *parent, const gchar *text)
 
     label = gtk_label_new (text);
     gtk_widget_ref (label);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "label", label,
-                              (GtkDestroyNotify) 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);
 
@@ -151,8 +146,7 @@ GtkWidget *create_hsep (GtkWidget *parent)
 {
     GtkWidget *sep = gtk_hseparator_new ();
     gtk_widget_ref (sep);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "sep", sep,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "sep", sep, g_object_unref);
     gtk_widget_show (sep);
     return sep;
 }
@@ -162,8 +156,7 @@ GtkWidget *create_vsep (GtkWidget *parent)
 {
     GtkWidget *sep = gtk_vseparator_new ();
     gtk_widget_ref (sep);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "sep", sep,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "sep", sep, g_object_unref);
     gtk_widget_show (sep);
     return sep;
 }
@@ -209,7 +202,7 @@ GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label,
                                 key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
     gtk_window_add_accel_group (GTK_WINDOW (parent), accel_group);
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
     gtk_widget_show (w);
     if (func)
         gtk_signal_connect (GTK_OBJECT (w), "clicked", func, data);
@@ -222,8 +215,7 @@ GtkWidget * create_named_stock_button_with_data (GtkWidget *parent, gconstpointe
 {
     GtkWidget *w = gtk_button_new_from_stock ((const gchar *) stock);
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, w,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
     gtk_widget_show (w);
     if (func)
         gtk_signal_connect (GTK_OBJECT (w), "clicked", func, data);
@@ -235,7 +227,7 @@ GtkWidget *create_entry (GtkWidget *parent, const gchar *name, const gchar *valu
 {
     GtkWidget *w = gtk_entry_new ();
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
     if (value)
         gtk_entry_set_text (GTK_ENTRY (w), value);
     gtk_widget_show (w);
@@ -247,8 +239,7 @@ GtkWidget *create_check (GtkWidget *parent, const gchar *text, const gchar *name
 {
     GtkWidget *btn = gtk_check_button_new_with_label (text);
     gtk_widget_ref (btn);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, btn,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, btn, g_object_unref);
     gtk_widget_show (btn);
 
     return btn;
@@ -259,8 +250,7 @@ GtkWidget *create_radio (GtkWidget *parent, GSList *group, const gchar *text, co
 {
     GtkWidget *btn = gtk_radio_button_new_with_label (group, text);
     gtk_widget_ref (btn);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, btn,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, btn, g_object_unref);
     gtk_widget_show (btn);
 
     return btn;
@@ -275,7 +265,7 @@ GtkWidget *create_spin (GtkWidget *parent, const gchar *name, gint min, gint max
     adj = gtk_adjustment_new (value, min, max, 1, 10, 10);
     spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
     gtk_widget_ref (spin);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, spin, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, spin, g_object_unref);
     gtk_widget_show (spin);
     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
 
@@ -287,7 +277,7 @@ GtkWidget *create_color_button (GtkWidget *parent, const gchar *name)
 {
     GtkWidget *w = gtk_color_button_new ();
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
     gtk_widget_show (w);
     return w;
 }
@@ -297,7 +287,7 @@ GtkWidget *create_icon_entry (GtkWidget *parent, const gchar *name, const gchar
 {
     GtkWidget *icon_entry = gnome_icon_entry_new (NULL, NULL);
     gtk_widget_ref (icon_entry);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, icon_entry, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, icon_entry, g_object_unref);
     gtk_widget_show (icon_entry);
     if (icon_path)
         gnome_icon_entry_set_filename (GNOME_ICON_ENTRY (icon_entry), icon_path);
@@ -310,7 +300,7 @@ GtkWidget *create_scale (GtkWidget *parent, const gchar *name, gint value, gint
     GtkWidget *scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (value, min, max, 0, 0, 0)));
 
     gtk_widget_ref (scale);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, scale,(GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, scale, g_object_unref);
     gtk_widget_show (scale);
     gtk_scale_set_digits (GTK_SCALE (scale), 0);
 
@@ -324,12 +314,12 @@ GtkWidget *create_file_entry (GtkWidget *parent, const gchar *name, const gchar
 
     fentry = gnome_file_entry_new (NULL, NULL);
     gtk_widget_ref (fentry);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "fileentry", fentry, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "fileentry", fentry, g_object_unref);
     gtk_widget_show (fentry);
 
     entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fentry));
     gtk_widget_ref (entry);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, entry, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, entry, g_object_unref);
     if (value)
         gtk_entry_set_text (GTK_ENTRY (entry), value);
     gtk_widget_show (entry);
@@ -344,14 +334,14 @@ GtkWidget *create_clist (GtkWidget *parent, const gchar *name, gint cols, gint r
 
     sw = gtk_scrolled_window_new (NULL, NULL);
     gtk_widget_ref (sw);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "sw", sw, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "sw", sw, g_object_unref);
     gtk_widget_show (sw);
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
     clist = gtk_clist_new (cols);
     gtk_widget_ref (clist);
     gtk_object_set_data (GTK_OBJECT (sw), "clist", clist);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, clist, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, clist, g_object_unref);
     gtk_widget_show (clist);
     gtk_clist_set_row_height (GTK_CLIST (clist), rowh);
     gtk_container_add (GTK_CONTAINER (sw), clist);
@@ -377,7 +367,7 @@ GtkWidget *create_vbuttonbox (GtkWidget *parent)
 {
     GtkWidget *w = gtk_vbutton_box_new ();
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "vbuttonbox", w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "vbuttonbox", w, g_object_unref);
     gtk_widget_show (w);
     gtk_button_box_set_layout (GTK_BUTTON_BOX (w), GTK_BUTTONBOX_START);
     gtk_box_set_spacing (GTK_BOX (w), 12);
@@ -389,7 +379,7 @@ GtkWidget *create_hbuttonbox (GtkWidget *parent)
 {
     GtkWidget *w = gtk_hbutton_box_new ();
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "hbuttonbox", w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "hbuttonbox", w, g_object_unref);
     gtk_widget_show (w);
     gtk_box_set_spacing (GTK_BOX (w), 12);
     return w;
@@ -400,7 +390,7 @@ GtkWidget *create_combo (GtkWidget *parent)
 {
     GtkWidget *combo = gtk_combo_new ();
     gtk_widget_ref (combo);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "combo", combo, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "combo", combo, g_object_unref);
     gtk_widget_show (combo);
     return combo;
 }
@@ -410,7 +400,7 @@ GtkWidget *create_option_menu (GtkWidget *parent, const gchar **items)
 {
     GtkWidget *optmenu = gtk_option_menu_new ();
     gtk_widget_ref (optmenu);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "optmenu", optmenu, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "optmenu", optmenu, g_object_unref);
     gtk_widget_show (optmenu);
 
     GtkWidget *menu = gtk_menu_new ();
@@ -439,7 +429,7 @@ GtkWidget *create_progress_bar (GtkWidget *parent)
 {
     GtkWidget *w = gtk_progress_bar_new ();
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "progress_bar", w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "progress_bar", w, g_object_unref);
     gtk_widget_show (w);
     gtk_progress_set_show_text (GTK_PROGRESS (w), TRUE);
     return w;
@@ -450,7 +440,7 @@ GtkWidget *create_pixmap (GtkWidget *parent, GdkPixmap *pm, GdkBitmap *mask)
 {
     GtkWidget *w = gtk_pixmap_new (pm, mask);
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "pixmap", w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "pixmap", w, g_object_unref);
     gtk_widget_show (w);
     return w;
 }
@@ -460,7 +450,7 @@ GtkWidget *create_sw (GtkWidget *parent)
 {
     GtkWidget *scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
     gtk_widget_ref (scrolledwindow);
-    gtk_object_set_data_full (GTK_OBJECT (parent), "scrolledwindow", scrolledwindow, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "scrolledwindow", scrolledwindow, g_object_unref);
     gtk_widget_show (scrolledwindow);
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
     return scrolledwindow;
diff --git a/plugins/cvs/interface.cc b/plugins/cvs/interface.cc
index 7128797..486b9c2 100644
--- a/plugins/cvs/interface.cc
+++ b/plugins/cvs/interface.cc
@@ -181,7 +181,7 @@ static GtkWidget *create_compare_win (LogHistory *log_history)
     g_signal_connect (radio, "toggled", G_CALLBACK (on_other_rev_toggled), dialog);
 
     combo = create_combo (dialog);
-    gtk_object_set_data_full (GTK_OBJECT (dialog), "rev_combo", combo, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (dialog), "rev_combo", combo, g_object_unref);
     gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, FALSE, 0);
     gtk_widget_set_sensitive (combo, FALSE);
 
@@ -263,7 +263,7 @@ GtkWidget *create_diff_win (CvsPlugin *plugin)
 
     notebook = gtk_notebook_new ();
     gtk_widget_ref (notebook);
-    gtk_object_set_data_full (GTK_OBJECT (dialog), "notebook", notebook, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (dialog), "notebook", notebook, g_object_unref);
     gtk_widget_show (notebook);
     gnome_cmd_dialog_add_expanding_category (GNOME_CMD_DIALOG (dialog), notebook);
 
@@ -293,7 +293,7 @@ GtkWidget *create_log_win (CvsPlugin *plugin)
 
     notebook = gtk_notebook_new ();
     gtk_widget_ref (notebook);
-    gtk_object_set_data_full (GTK_OBJECT (dialog), "notebook", notebook, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (dialog), "notebook", notebook, g_object_unref);
     gtk_widget_show (notebook);
     gnome_cmd_dialog_add_expanding_category (GNOME_CMD_DIALOG (dialog), notebook);
 
@@ -352,7 +352,7 @@ void add_diff_tab (CvsPlugin *plugin, const gchar *cmd, const gchar *fname)
     text_view = gtk_text_view_new ();
     gtk_container_add (GTK_CONTAINER (sw), text_view);
     gtk_widget_ref (text_view);
-    gtk_object_set_data_full (GTK_OBJECT (sw), "text_view", text_view, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (sw), "text_view", text_view, g_object_unref);
     gtk_widget_show (text_view);
 
     notebook = lookup_widget (plugin->diff_win, "notebook");
@@ -398,10 +398,8 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
     hpaned = gtk_hpaned_new ();
     gtk_container_set_border_width (GTK_CONTAINER (hpaned), 6);
     gtk_widget_ref (hpaned);
-    gtk_object_set_data_full (GTK_OBJECT (plugin->log_win), "hpaned", hpaned,
-                              (GtkDestroyNotify) gtk_widget_unref);
-    gtk_object_set_data_full (GTK_OBJECT (hpaned), "log_history", log_history,
-                              (GtkDestroyNotify) log_free);
+    g_object_set_data_full (G_OBJECT (plugin->log_win), "hpaned", hpaned, g_object_unref);
+    g_object_set_data_full (G_OBJECT (hpaned), "log_history", log_history, (GDestroyNotify) log_free);
     gtk_widget_show (hpaned);
     gtk_paned_set_position (GTK_PANED (hpaned), 100);
 
@@ -515,8 +513,7 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
     msg_text = gtk_text_view_new ();
     log_history->msg_text_view = msg_text;
     gtk_widget_ref (msg_text);
-    gtk_object_set_data_full (GTK_OBJECT (hpaned), "msg_text", msg_text,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (hpaned), "msg_text", msg_text, g_object_unref);
     gtk_widget_show (msg_text);
     gtk_container_add (GTK_CONTAINER (sw), msg_text);
     gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (msg_text), GTK_WRAP_WORD);
diff --git a/src/gnome-cmd-chmod-dialog.cc b/src/gnome-cmd-chmod-dialog.cc
index 2dad872..3da5984 100644
--- a/src/gnome-cmd-chmod-dialog.cc
+++ b/src/gnome-cmd-chmod-dialog.cc
@@ -201,9 +201,7 @@ static void init (GnomeCmdChmodDialog *dialog)
 
     dialog->priv->chmod_component = gnome_cmd_chmod_component_new ((GnomeVFSFilePermissions) 0);
     gtk_widget_ref (dialog->priv->chmod_component);
-    gtk_object_set_data_full (GTK_OBJECT (chmod_dialog),
-                              "chmod_component", dialog->priv->chmod_component,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (chmod_dialog), "chmod_component", dialog->priv->chmod_component, g_object_unref);
     gtk_widget_show (dialog->priv->chmod_component);
     gtk_box_pack_start (GTK_BOX (vbox), dialog->priv->chmod_component, TRUE, TRUE, 0);
 
diff --git a/src/gnome-cmd-chown-dialog.cc b/src/gnome-cmd-chown-dialog.cc
index 213c56c..b6bd7cc 100644
--- a/src/gnome-cmd-chown-dialog.cc
+++ b/src/gnome-cmd-chown-dialog.cc
@@ -180,9 +180,7 @@ init (GnomeCmdChownDialog *dialog)
 
     dialog->priv->chown_component = gnome_cmd_chown_component_new ();
     gtk_widget_ref (dialog->priv->chown_component);
-    gtk_object_set_data_full (GTK_OBJECT (dialog),
-                              "chown_component", dialog->priv->chown_component,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (dialog), "chown_component", dialog->priv->chown_component, g_object_unref);
     gtk_widget_show (dialog->priv->chown_component);
     gtk_box_pack_start (GTK_BOX (vbox), dialog->priv->chown_component, FALSE, FALSE, 0);
 
diff --git a/src/gnome-cmd-cmdline.cc b/src/gnome-cmd-cmdline.cc
index 671fc0c..9a43679 100644
--- a/src/gnome-cmd-cmdline.cc
+++ b/src/gnome-cmd-cmdline.cc
@@ -225,8 +225,7 @@ static void init (GnomeCmdCmdline *cmdline)
 
     cmdline->priv->cwd = gtk_label_new ("cwd");
     gtk_widget_ref (cmdline->priv->cwd);
-    gtk_object_set_data_full (GTK_OBJECT (cmdline), "cwdlabel", cmdline->priv->cwd,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (cmdline), "cwdlabel", cmdline->priv->cwd, g_object_unref);
     gtk_widget_show (cmdline->priv->cwd);
     gtk_box_pack_start (GTK_BOX (cmdline), cmdline->priv->cwd,
                         FALSE, TRUE, 2);
@@ -234,15 +233,13 @@ static void init (GnomeCmdCmdline *cmdline)
 
     label = gtk_label_new ("#");
     gtk_widget_ref (label);
-    gtk_object_set_data_full (GTK_OBJECT (cmdline), "label", label,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (cmdline), "label", label, g_object_unref);
     gtk_widget_show (label);
     gtk_box_pack_start (GTK_BOX (cmdline), label, FALSE, FALSE, 0);
 
     cmdline->priv->combo = new GnomeCmdCombo(1, 0);
     gtk_widget_ref (*cmdline->priv->combo);
-    gtk_object_set_data_full (GTK_OBJECT (cmdline), "combo", cmdline->priv->combo,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (cmdline), "combo", cmdline->priv->combo, g_object_unref);
     gtk_clist_set_column_width (GTK_CLIST (cmdline->priv->combo->list), 0, 500);
     gtk_box_pack_start (GTK_BOX (cmdline), *cmdline->priv->combo, TRUE, TRUE, 2);
     gtk_widget_show (*cmdline->priv->combo);
diff --git a/src/gnome-cmd-combo.cc b/src/gnome-cmd-combo.cc
index df25465..77c7b38 100644
--- a/src/gnome-cmd-combo.cc
+++ b/src/gnome-cmd-combo.cc
@@ -369,7 +369,7 @@ static void init (GnomeCmdCombo *combo)
 
     combo->entry = gtk_entry_new ();
     gtk_widget_ref (combo->entry);
-    gtk_object_set_data_full (*combo, "entry", combo->entry, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "entry", combo->entry, g_object_unref);
     gtk_widget_show (combo->entry);
     gtk_widget_set_size_request (combo->entry, 60, -1);
     gtk_entry_set_editable (GTK_ENTRY (combo->entry), FALSE);
@@ -378,12 +378,12 @@ static void init (GnomeCmdCombo *combo)
     combo->button = gtk_button_new ();
     gtk_widget_ref (combo->button);
     gtk_button_set_relief (GTK_BUTTON (combo->button), gnome_cmd_data.button_relief);
-    gtk_object_set_data_full (*combo, "button", combo->button, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "button", combo->button, g_object_unref);
     gtk_widget_show (combo->button);
 
     arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
     gtk_widget_ref (arrow);
-    gtk_object_set_data_full (*combo, "arrow", arrow, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "arrow", arrow, g_object_unref);
     gtk_widget_show (arrow);
 
     gtk_container_add (GTK_CONTAINER (combo->button), arrow);
@@ -395,7 +395,7 @@ static void init (GnomeCmdCombo *combo)
 
     combo->popwin = gtk_window_new (GTK_WINDOW_POPUP);
     gtk_widget_ref (combo->popwin);
-    gtk_object_set_data_full (*combo, "popwin", combo->popwin, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "popwin", combo->popwin, g_object_unref);
     gtk_window_set_policy (GTK_WINDOW (combo->popwin), 1, 1, 0);
 
     gtk_widget_set_events (combo->popwin, GDK_KEY_PRESS_MASK);
@@ -409,7 +409,7 @@ static void init (GnomeCmdCombo *combo)
 
     event_box = gtk_event_box_new ();
     gtk_widget_ref (event_box);
-    gtk_object_set_data_full (*combo, "event_box", event_box, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "event_box", event_box, g_object_unref);
     gtk_container_add (GTK_CONTAINER (combo->popwin), event_box);
     gtk_widget_show (event_box);
     gtk_widget_realize (event_box);
@@ -420,14 +420,14 @@ static void init (GnomeCmdCombo *combo)
 
     frame = gtk_frame_new (NULL);
     gtk_widget_ref (frame);
-    gtk_object_set_data_full (*combo, "frame", frame, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "frame", frame, g_object_unref);
     gtk_container_add (GTK_CONTAINER (event_box), frame);
     gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
     gtk_widget_show (frame);
 
     combo->popup = gtk_scrolled_window_new (NULL, NULL);
     gtk_widget_ref (combo->popup);
-    gtk_object_set_data_full (*combo, "combo->popup", combo->popup, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*combo, "combo->popup", combo->popup, g_object_unref);
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (combo->popup), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
     GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (combo->popup)->hscrollbar, GTK_CAN_FOCUS);
     GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (combo->popup)->vscrollbar, GTK_CAN_FOCUS);
diff --git a/src/gnome-cmd-dir-indicator.cc b/src/gnome-cmd-dir-indicator.cc
index 86d621c..6c133b6 100644
--- a/src/gnome-cmd-dir-indicator.cc
+++ b/src/gnome-cmd-dir-indicator.cc
@@ -475,14 +475,12 @@ static void init (GnomeCmdDirIndicator *indicator)
     GTK_WIDGET_UNSET_FLAGS (indicator->priv->history_button, GTK_CAN_FOCUS);
     gtk_widget_ref (indicator->priv->history_button);
     gtk_button_set_relief (GTK_BUTTON (indicator->priv->history_button), gnome_cmd_data.button_relief);
-    gtk_object_set_data_full (GTK_OBJECT (indicator),
-                              "button", indicator->priv->history_button,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    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);
-    gtk_object_set_data_full (GTK_OBJECT (indicator), "arrow", arrow, (GtkDestroyNotify) gtk_widget_unref);
+    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);
 
@@ -490,7 +488,7 @@ static void init (GnomeCmdDirIndicator *indicator)
     indicator->priv->bookmark_button = create_styled_pixmap_button (NULL, IMAGE_get_gnome_cmd_pixmap (PIXMAP_BOOKMARK));
     GTK_WIDGET_UNSET_FLAGS (indicator->priv->bookmark_button, GTK_CAN_FOCUS);
     gtk_button_set_relief (GTK_BUTTON (indicator->priv->bookmark_button), gnome_cmd_data.button_relief);
-    gtk_object_set_data_full (GTK_OBJECT (indicator), "button", indicator->priv->bookmark_button, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (indicator), "button", indicator->priv->bookmark_button, g_object_unref);
     gtk_widget_show (indicator->priv->bookmark_button);
 
     // pack
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 0ab86bf..c6f97c7 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -610,18 +610,18 @@ void GnomeCmdFileList::create_column_titles()
 
         hbox = gtk_hbox_new (FALSE, 1);
         gtk_widget_ref (hbox);
-        gtk_object_set_data_full (*this, "column-hbox", hbox, (GtkDestroyNotify) gtk_widget_unref);
+        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]);
-        gtk_object_set_data_full (*this, "column-label", priv->column_labels[i], (GtkDestroyNotify) gtk_widget_unref);
+        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);
-        gtk_object_set_data_full (*this, "column-pixmap", pixmap, (GtkDestroyNotify) gtk_widget_unref);
+        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);
 
@@ -754,7 +754,7 @@ static void show_file_popup (GnomeCmdFileList *fl, GdkEventButton *event)
     if (!menu) return;
 
     gtk_widget_ref (menu);
-    gtk_object_set_data_full (*fl, "file_popup_menu", menu, (GtkDestroyNotify) gtk_widget_unref);
+    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);
 }
diff --git a/src/gnome-cmd-file-popmenu.cc b/src/gnome-cmd-file-popmenu.cc
index a743914..ef07299 100644
--- a/src/gnome-cmd-file-popmenu.cc
+++ b/src/gnome-cmd-file-popmenu.cc
@@ -161,7 +161,7 @@ static void on_open_with_other (GtkMenuItem *menu_item, GList *files)
     GtkWidget *term_check = create_check (dialog, _("Needs terminal"), "term_check");
 
     gtk_widget_ref (dialog);
-    gtk_object_set_data_full (GTK_OBJECT (menu_item), "new_textfile_dialog", dialog, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (menu_item), "new_textfile_dialog", dialog, g_object_unref);
 
     gnome_cmd_dialog_add_category (GNOME_CMD_DIALOG (dialog), term_check);
 
diff --git a/src/gnome-cmd-file-props-dialog.cc b/src/gnome-cmd-file-props-dialog.cc
index b6525c4..686dc83 100644
--- a/src/gnome-cmd-file-props-dialog.cc
+++ b/src/gnome-cmd-file-props-dialog.cc
@@ -543,9 +543,7 @@ inline GtkWidget *create_permissions_tab (GnomeCmdFilePropsDialogPrivate *data)
 
     data->chown_component = gnome_cmd_chown_component_new ();
     gtk_widget_ref (data->chown_component);
-    gtk_object_set_data_full (GTK_OBJECT (data->dialog),
-                              "chown_component", data->chown_component,
-                              (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "chown_component", data->chown_component, g_object_unref);
     gtk_widget_show (data->chown_component);
     gnome_cmd_chown_component_set (GNOME_CMD_CHOWN_COMPONENT (data->chown_component),
         data->f->info->uid, data->f->info->gid);
@@ -556,7 +554,7 @@ inline GtkWidget *create_permissions_tab (GnomeCmdFilePropsDialogPrivate *data)
 
     data->chmod_component = gnome_cmd_chmod_component_new ((GnomeVFSFilePermissions) 0);
     gtk_widget_ref (data->chmod_component);
-    gtk_object_set_data_full (GTK_OBJECT (data->dialog), "chmod_component", data->chmod_component, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (data->dialog), "chmod_component", data->chmod_component, g_object_unref);
     gtk_widget_show (data->chmod_component);
     gnome_cmd_chmod_component_set_perms (GNOME_CMD_CHMOD_COMPONENT (data->chmod_component), data->f->info->permissions);
 
@@ -731,7 +729,7 @@ GtkWidget *gnome_cmd_file_props_dialog_create (GnomeCmdFile *f)
     gnome_cmd_file_ref (f);
 
     gtk_widget_ref (notebook);
-    gtk_object_set_data_full (GTK_OBJECT (dialog), "notebook", notebook, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (dialog), "notebook", notebook, g_object_unref);
     gtk_widget_show (notebook);
     gnome_cmd_dialog_add_expanding_category (GNOME_CMD_DIALOG (dialog), notebook);
 
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index abbe642..b042dd8 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -174,7 +174,7 @@ inline GtkWidget *add_buttonbar_button (char *label,
                                         gint accel_signal_id)
 {
     GtkWidget *button = create_styled_button (label);
-    gtk_object_set_data_full (*mw, data_label, button, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, data_label, button, g_object_unref);
     GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
 
     gtk_box_pack_start (GTK_BOX (mw->priv->buttonbar), button, TRUE, TRUE, 0);
@@ -217,7 +217,7 @@ static void create_toolbar (GnomeCmdMainWin *mw, GnomeUIInfo *uiinfo)
 
     mw->priv->toolbar = gtk_hbox_new (FALSE, 0);
     gtk_widget_ref (mw->priv->toolbar);
-    gtk_object_set_data_full (GTK_OBJECT (mw), "toolbar", mw->priv->toolbar, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, "toolbar", mw->priv->toolbar, g_object_unref);
     gtk_widget_show (mw->priv->toolbar);
 
     if (!toolbar_tooltips)
@@ -347,7 +347,7 @@ static GtkWidget *create_slide_popup ()
 
     GtkWidget *menu = gtk_menu_new ();
     gtk_widget_ref (menu);
-    gtk_object_set_data_full (*main_win, "slide-popup", menu, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*main_win, "slide-popup", menu, g_object_unref);
 
     // Fill the menu
 
@@ -427,7 +427,7 @@ void GnomeCmdMainWin::create_buttonbar()
 
     priv->buttonbar = gtk_hbox_new (FALSE, 0);
     gtk_widget_ref (priv->buttonbar);
-    gtk_object_set_data_full (*this, "buttonbar", priv->buttonbar, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*this, "buttonbar", priv->buttonbar, g_object_unref);
     gtk_widget_show (priv->buttonbar);
 
     priv->view_btn = add_buttonbar_button(_("F3 View"), this, "view_btn", priv->accel_group, 0);
@@ -784,12 +784,12 @@ static void init (GnomeCmdMainWin *mw)
 
     mw->priv->vbox = gtk_vbox_new (FALSE, 0);
     gtk_widget_ref (mw->priv->vbox);
-    gtk_object_set_data_full (*mw, "vbox", mw->priv->vbox, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, "vbox", mw->priv->vbox, g_object_unref);
     gtk_widget_show (mw->priv->vbox);
 
     mw->priv->menubar = gnome_cmd_main_menu_new ();
     gtk_widget_ref (mw->priv->menubar);
-    gtk_object_set_data_full (*mw, "vbox", mw->priv->menubar, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, "vbox", mw->priv->menubar, g_object_unref);
     gtk_widget_show (mw->priv->menubar);
     gtk_box_pack_start (GTK_BOX (mw->priv->vbox), mw->priv->menubar, FALSE, TRUE, 0);
     gtk_box_pack_start (GTK_BOX (mw->priv->vbox), create_separator (FALSE), FALSE, TRUE, 0);
@@ -799,20 +799,20 @@ static void init (GnomeCmdMainWin *mw)
     mw->priv->paned = gnome_cmd_data.list_orientation ? gtk_vpaned_new () : gtk_hpaned_new ();
 
     gtk_widget_ref (mw->priv->paned);
-    gtk_object_set_data_full (*mw, "paned", mw->priv->paned, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, "paned", mw->priv->paned, g_object_unref);
     gtk_widget_show (mw->priv->paned);
     gtk_box_pack_start (GTK_BOX (mw->priv->vbox), mw->priv->paned, TRUE, TRUE, 0);
     mw->create_buttonbar();
 
     mw->priv->file_selector[LEFT] = gnome_cmd_file_selector_new ();
     gtk_widget_ref (mw->priv->file_selector[LEFT]);
-    gtk_object_set_data_full (*mw, "left_file_selector", mw->priv->file_selector[LEFT], (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, "left_file_selector", mw->priv->file_selector[LEFT], g_object_unref);
     gtk_widget_show (mw->priv->file_selector[LEFT]);
     gtk_paned_pack1 (GTK_PANED (mw->priv->paned), mw->priv->file_selector[LEFT], TRUE, TRUE);
 
     mw->priv->file_selector[RIGHT] = gnome_cmd_file_selector_new ();
     gtk_widget_ref (mw->priv->file_selector[RIGHT]);
-    gtk_object_set_data_full (*mw, "right_file_selector", mw->priv->file_selector[RIGHT], (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*mw, "right_file_selector", mw->priv->file_selector[RIGHT], g_object_unref);
     gtk_widget_show (mw->priv->file_selector[RIGHT]);
     gtk_paned_pack2 (GTK_PANED (mw->priv->paned), mw->priv->file_selector[RIGHT], TRUE, TRUE);
 
@@ -1241,7 +1241,7 @@ void GnomeCmdMainWin::update_cmdline_visibility()
         priv->cmdline_sep = create_separator (FALSE);
         priv->cmdline = gnome_cmd_cmdline_new ();
         gtk_widget_ref (priv->cmdline);
-        gtk_object_set_data_full (*this, "cmdline", priv->cmdline, (GtkDestroyNotify) gtk_widget_unref);
+        g_object_set_data_full (*this, "cmdline", priv->cmdline, g_object_unref);
         gtk_widget_show (priv->cmdline);
         if (gnome_cmd_data.toolbar_visibility)
             pos += 2;
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index ad6da64..dcbc3c3 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -46,7 +46,7 @@ inline GtkWidget *create_font_picker (GtkWidget *parent, gchar *name)
 {
     GtkWidget *w = gtk_font_button_new ();
     gtk_widget_ref (w);
-    gtk_object_set_data_full (GTK_OBJECT (parent), name, w, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
     gtk_widget_show (w);
 
     return w;
@@ -288,8 +288,7 @@ static GtkWidget *create_format_tab (GtkWidget *parent)
     table_add (table, label, 0, 1, GTK_FILL);
 
     label = create_label (parent, "");
-    gtk_object_set_data_full (GTK_OBJECT (parent), "date_format_test_label",
-                              label, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (parent), "date_format_test_label", label, g_object_unref);
     g_signal_connect (label, "realize", G_CALLBACK (on_date_format_update), parent);
     table_add (table, label, 1, 1, (GtkAttachOptions) (GTK_EXPAND|GTK_FILL));
 
@@ -1949,8 +1948,7 @@ static void init (GnomeCmdOptionsDialog *dialog)
 
     dialog->notebook = gtk_notebook_new ();
     gtk_widget_ref (dialog->notebook);
-    gtk_object_set_data_full (GTK_OBJECT (options_dialog), "notebook",
-                              dialog->notebook, (GtkDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (G_OBJECT (options_dialog), "notebook", dialog->notebook, g_object_unref);
     gtk_widget_show (dialog->notebook);
     gnome_cmd_dialog_add_expanding_category (GNOME_CMD_DIALOG (dialog), dialog->notebook);
 



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