[gnome-commander] Replacing obsoleted gtk_object_set_data() with g_object_set_data()



commit 55f184d1f6c8c20b87a18d3a6ddd8343d1d231a1
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Wed Aug 4 20:25:22 2010 +0200

    Replacing obsoleted gtk_object_set_data() with g_object_set_data()

 libgcmd/libgcmd-widget-factory.cc        |    4 ++--
 plugins/cvs/cvs-plugin.cc                |    4 ++--
 plugins/cvs/interface.cc                 |   16 ++++++++--------
 plugins/fileroller/file-roller-plugin.cc |    6 +++---
 plugins/test/test-plugin.cc              |    2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/libgcmd/libgcmd-widget-factory.cc b/libgcmd/libgcmd-widget-factory.cc
index 1e26386..4f555e6 100644
--- a/libgcmd/libgcmd-widget-factory.cc
+++ b/libgcmd/libgcmd-widget-factory.cc
@@ -181,7 +181,7 @@ GtkWidget *create_category (GtkWidget *parent, GtkWidget *content, gchar *title)
     GtkWidget *hbox = create_space_hbox (parent, content);
     GtkWidget *inner_frame = create_space_frame (parent, 3);
 
-    gtk_object_set_data (GTK_OBJECT (frame), "label", label);
+    g_object_set_data (G_OBJECT (frame), "label", label);
 
     gtk_box_pack_start (GTK_BOX (frame), label, FALSE, TRUE, 0);
     gtk_box_pack_start (GTK_BOX (frame), inner_frame, TRUE, TRUE, 0);
@@ -340,7 +340,7 @@ GtkWidget *create_clist (GtkWidget *parent, const gchar *name, gint cols, gint r
 
     clist = gtk_clist_new (cols);
     g_object_ref (clist);
-    gtk_object_set_data (GTK_OBJECT (sw), "clist", clist);
+    g_object_set_data (G_OBJECT (sw), "clist", clist);
     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);
diff --git a/plugins/cvs/cvs-plugin.cc b/plugins/cvs/cvs-plugin.cc
index 9bfd9b2..d8012dd 100644
--- a/plugins/cvs/cvs-plugin.cc
+++ b/plugins/cvs/cvs-plugin.cc
@@ -176,12 +176,12 @@ static GtkWidget *create_menu_item (const gchar *name, gboolean show_pixmap,
     gtk_container_add (GTK_CONTAINER (item), label);
 
     // Connect to the signal and set user data
-    gtk_object_set_data (GTK_OBJECT (item), GNOMEUIINFO_KEY_UIDATA, data);
+    g_object_set_data (G_OBJECT (item), GNOMEUIINFO_KEY_UIDATA, data);
 
     if (callback)
         g_signal_connect (item, "activate", G_CALLBACK (callback), data);
 
-    gtk_object_set_data (GTK_OBJECT (item), "plugin", plugin);
+    g_object_set_data (G_OBJECT (item), "plugin", plugin);
 
     return item;
 }
diff --git a/plugins/cvs/interface.cc b/plugins/cvs/interface.cc
index 17c19ae..f8aca55 100644
--- a/plugins/cvs/interface.cc
+++ b/plugins/cvs/interface.cc
@@ -154,10 +154,10 @@ static GtkWidget *create_compare_win (LogHistory *log_history)
 
     prev_rev = find_prev_rev (log_history, log_history->plugin->selected_rev);
     if (prev_rev)
-        gtk_object_set_data (GTK_OBJECT (dialog), "prev_rev", prev_rev->number);
+        g_object_set_data (G_OBJECT (dialog), "prev_rev", prev_rev->number);
 
-    gtk_object_set_data (GTK_OBJECT (dialog), "selected_rev", log_history->plugin->selected_rev->number);
-    gtk_object_set_data (GTK_OBJECT (dialog), "log_history", log_history);
+    g_object_set_data (G_OBJECT (dialog), "selected_rev", log_history->plugin->selected_rev->number);
+    g_object_set_data (G_OBJECT (dialog), "log_history", log_history);
 
 
     /**
@@ -431,7 +431,7 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
 
     label = create_label (hpaned, "...");
     log_history->rev_label = label;
-    gtk_object_set_data (GTK_OBJECT (hpaned), "rev_label", label);
+    g_object_set_data (G_OBJECT (hpaned), "rev_label", label);
     gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
     gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 
@@ -447,7 +447,7 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
 
     label = create_label (hpaned, "...");
     log_history->author_label = label;
-    gtk_object_set_data (GTK_OBJECT (hpaned), "author_label", label);
+    g_object_set_data (G_OBJECT (hpaned), "author_label", label);
     gtk_table_attach (GTK_TABLE (table1), label, 1, 2, 1, 2,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (0), 0, 0);
@@ -461,7 +461,7 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
 
     label = create_label (hpaned, "...");
     log_history->date_label = label;
-    gtk_object_set_data (GTK_OBJECT (hpaned), "date_label", label);
+    g_object_set_data (G_OBJECT (hpaned), "date_label", label);
     gtk_table_attach (GTK_TABLE (table1), label, 1, 2, 2, 3,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (0), 0, 0);
@@ -475,7 +475,7 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
 
     label = create_label (hpaned, "...");
     log_history->state_label = label;
-    gtk_object_set_data (GTK_OBJECT (hpaned), "state_label", label);
+    g_object_set_data (G_OBJECT (hpaned), "state_label", label);
     gtk_table_attach (GTK_TABLE (table1), label, 1, 2, 3, 4,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (0), 0, 0);
@@ -489,7 +489,7 @@ void add_log_tab (CvsPlugin *plugin, const gchar *fname)
 
     label = create_label (hpaned, "...");
     log_history->lines_label = label;
-    gtk_object_set_data (GTK_OBJECT (hpaned), "lines_label", label);
+    g_object_set_data (G_OBJECT (hpaned), "lines_label", label);
     gtk_table_attach (GTK_TABLE (table1), label, 1, 2, 4, 5,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (0), 0, 0);
diff --git a/plugins/fileroller/file-roller-plugin.cc b/plugins/fileroller/file-roller-plugin.cc
index 312a3e4..dcfbb1f 100644
--- a/plugins/fileroller/file-roller-plugin.cc
+++ b/plugins/fileroller/file-roller-plugin.cc
@@ -259,7 +259,7 @@ static GtkWidget *create_menu_item (const gchar *name, gboolean show_pixmap,
     gtk_container_add (GTK_CONTAINER (item), label);
 
     // Connect to the signal and set user data
-    gtk_object_set_data (GTK_OBJECT (item), GNOMEUIINFO_KEY_UIDATA, data);
+    g_object_set_data (G_OBJECT (item), GNOMEUIINFO_KEY_UIDATA, data);
 
     if (callback)
         g_signal_connect (item, "activate", G_CALLBACK (callback), data);
@@ -313,7 +313,7 @@ static GList *create_popup_menu_items (GnomeCmdPlugin *plugin, GnomeCmdState *st
 
                 text = g_strdup_printf (_("Extract to '%s'"), fname);
                 item = create_menu_item (text, TRUE, GTK_SIGNAL_FUNC (on_extract_cwd), f->uri);
-                gtk_object_set_data (GTK_OBJECT (item), "target_name", g_strdup (fname));
+                g_object_set_data (G_OBJECT (item), "target_name", g_strdup (fname));
                 items = g_list_append (items, item);
                 g_free (text);
 
@@ -323,7 +323,7 @@ static GList *create_popup_menu_items (GnomeCmdPlugin *plugin, GnomeCmdState *st
 
                     text = g_strdup_printf (_("Extract to '%s'"), path);
                     item = create_menu_item (text, TRUE, GTK_SIGNAL_FUNC (on_extract_cwd), f->uri);
-                    gtk_object_set_data (GTK_OBJECT (item), "target_dir", path);
+                    g_object_set_data (G_OBJECT (item), "target_dir", path);
                     items = g_list_append (items, item);
                     g_free (text);
                 }
diff --git a/plugins/test/test-plugin.cc b/plugins/test/test-plugin.cc
index 158e7ee..54d9fe4 100644
--- a/plugins/test/test-plugin.cc
+++ b/plugins/test/test-plugin.cc
@@ -87,7 +87,7 @@ static GtkWidget *create_menu_item (const gchar *name, gboolean show_pixmap, Gtk
     gtk_container_add (GTK_CONTAINER (item), label);
 
     // Connect to the signal and set user data
-    gtk_object_set_data (GTK_OBJECT (item), GNOMEUIINFO_KEY_UIDATA, data);
+    g_object_set_data (G_OBJECT (item), GNOMEUIINFO_KEY_UIDATA, data);
 
     if (callback)
         g_signal_connect (item, "activate", G_CALLBACK (callback), data);



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