[gnome-commander] Replacing obsoleted gtk_object_set_data() with g_object_set_data()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-commander] Replacing obsoleted gtk_object_set_data() with g_object_set_data()
- Date: Mon, 28 Sep 2009 22:41:19 +0000 (UTC)
commit 07546df241f02c68fefe547624aa9f1ed8edff03
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Sep 28 23:33:10 2009 +0200
Replacing obsoleted gtk_object_set_data() with g_object_set_data()
src/gnome-cmd-bookmark-dialog.cc | 2 +-
src/gnome-cmd-dir-indicator.cc | 2 +-
src/gnome-cmd-file-popmenu.cc | 2 +-
src/gnome-cmd-file-selector.cc | 2 +-
src/gnome-cmd-main-win.cc | 4 ++--
src/gnome-cmd-options-dialog.cc | 28 ++++++++++++++--------------
src/gnome-cmd-search-dialog.cc | 2 +-
src/plugin_manager.cc | 6 +++---
8 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/gnome-cmd-bookmark-dialog.cc b/src/gnome-cmd-bookmark-dialog.cc
index 8af0fd5..ed3bd11 100644
--- a/src/gnome-cmd-bookmark-dialog.cc
+++ b/src/gnome-cmd-bookmark-dialog.cc
@@ -491,7 +491,7 @@ static void init (GnomeCmdBookmarkDialog *in_dialog)
in_dialog->priv->groups = NULL;
dialog = GTK_WIDGET (in_dialog);
- gtk_object_set_data (GTK_OBJECT (dialog), "dialog", dialog);
+ g_object_set_data (G_OBJECT (dialog), "dialog", dialog);
gtk_window_set_title (GTK_WINDOW (dialog), _("Bookmarks"));
gtk_widget_set_size_request (GTK_WIDGET (dialog), 400, 400);
gtk_window_set_default_size (GTK_WINDOW (dialog), bookmark_dlg_width, bookmark_dlg_height);
diff --git a/src/gnome-cmd-dir-indicator.cc b/src/gnome-cmd-dir-indicator.cc
index 9db3ca7..7eedf6c 100644
--- a/src/gnome-cmd-dir-indicator.cc
+++ b/src/gnome-cmd-dir-indicator.cc
@@ -308,7 +308,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);
- gtk_object_set_data (GTK_OBJECT (item), "indicator", indicator);
+ g_object_set_data (G_OBJECT (item), "indicator", indicator);
gtk_object_set_data_full (GTK_OBJECT (shell), "menu_item", item, (GtkDestroyNotify) gtk_widget_unref);
if (func)
g_signal_connect (item, "activate", G_CALLBACK (func), data);
diff --git a/src/gnome-cmd-file-popmenu.cc b/src/gnome-cmd-file-popmenu.cc
index 57a1c71..d04747b 100644
--- a/src/gnome-cmd-file-popmenu.cc
+++ b/src/gnome-cmd-file-popmenu.cc
@@ -242,7 +242,7 @@ static void add_fav_app_menu_item (GnomeCmdFilePopmenu *menu, GnomeCmdApp *app,
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);
g_signal_connect (item, "activate", G_CALLBACK (cb_exec_with_app), data);
}
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index e7072cb..15823b0 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -804,7 +804,7 @@ static void create_con_buttons (GnomeCmdFileSelector *fs)
GnomeCmdPixmap *pm = gnome_cmd_con_get_go_pixmap (con);
GtkWidget *btn = create_styled_button (NULL);
- gtk_object_set_data (GTK_OBJECT (btn), "con", con);
+ g_object_set_data (G_OBJECT (btn), "con", con);
g_signal_connect (btn, "clicked", (GtkSignalFunc) on_con_btn_clicked, fs);
gtk_box_pack_start (GTK_BOX (fs->con_btns_hbox), btn, FALSE, FALSE, 0);
GTK_WIDGET_UNSET_FLAGS (btn, GTK_CAN_FOCUS);
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index b24107b..29a0e37 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -774,8 +774,8 @@ static void init (GnomeCmdMainWin *mw)
mw->priv->file_selector[RIGHT] = NULL;
gnome_app_construct (GNOME_APP (mw), "gnome-commander", gcmd_owner.is_root() ? _("GNOME Commander - ROOT PRIVILEGES") :
- _("GNOME Commander"));
- gtk_object_set_data (*mw, "main_win", mw);
+ _("GNOME Commander"));
+ g_object_set_data (G_OBJECT (mw), "main_win", mw);
restore_size_and_pos (mw);
gtk_window_set_policy (GTK_WINDOW (mw), TRUE, TRUE, FALSE);
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index 15935fc..92c68f3 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -485,7 +485,7 @@ static GtkWidget *create_layout_tab (GtkWidget *parent)
table_add (table, label, 0, 2, GTK_FILL);
fe_optmenu = create_option_menu (parent, ext_modes);
- gtk_object_set_data (GTK_OBJECT (parent), "fe_optmenu", fe_optmenu);
+ g_object_set_data (G_OBJECT (parent), "fe_optmenu", fe_optmenu);
table_add (table, fe_optmenu, 1, 2, (GtkAttachOptions) (GTK_FILL|GTK_EXPAND));
// Graphical mode
@@ -493,7 +493,7 @@ static GtkWidget *create_layout_tab (GtkWidget *parent)
table_add (table, label, 0, 3, GTK_FILL);
lm_optmenu = create_option_menu (parent, gfx_modes);
- gtk_object_set_data (GTK_OBJECT (parent), "lm_optmenu", lm_optmenu);
+ g_object_set_data (G_OBJECT (parent), "lm_optmenu", lm_optmenu);
g_signal_connect (lm_optmenu, "changed", G_CALLBACK (on_layout_mode_changed), parent);
table_add (table, lm_optmenu, 1, 3, (GtkAttachOptions) (GTK_FILL|GTK_EXPAND));
@@ -505,13 +505,13 @@ static GtkWidget *create_layout_tab (GtkWidget *parent)
table_add (table, hbox, 1, 4, (GtkAttachOptions) (GTK_FILL|GTK_EXPAND));
cm_optmenu = create_option_menu (parent, color_modes);
- gtk_object_set_data (GTK_OBJECT (parent), "cm_optmenu", cm_optmenu);
+ g_object_set_data (G_OBJECT (parent), "cm_optmenu", cm_optmenu);
g_signal_connect (cm_optmenu, "changed", G_CALLBACK (on_color_mode_changed), parent);
gtk_box_pack_start (GTK_BOX (hbox), cm_optmenu, TRUE, TRUE, 0);
btn = create_button_with_data (parent, _("Edit..."), GTK_SIGNAL_FUNC (on_colors_edit), parent);
- gtk_object_set_data (GTK_OBJECT (parent), "color_btn", btn);
+ g_object_set_data (G_OBJECT (parent), "color_btn", btn);
gtk_box_pack_start (GTK_BOX (hbox), btn, FALSE, TRUE, 0);
gtk_widget_set_sensitive (btn, gnome_cmd_data.color_mode == GNOME_CMD_COLOR_CUSTOM);
@@ -525,7 +525,7 @@ static GtkWidget *create_layout_tab (GtkWidget *parent)
// MIME icon settings
table = create_table (parent, 4, 2);
cat = create_category (parent, table, _("MIME icon settings"));
- gtk_object_set_data (GTK_OBJECT (parent), "mime_icon_settings_frame", cat);
+ g_object_set_data (G_OBJECT (parent), "mime_icon_settings_frame", cat);
gtk_box_pack_start (GTK_BOX (vbox), cat, FALSE, FALSE, 0);
spin = create_spin (parent, "iconsize_spin", 8, 64, gnome_cmd_data.icon_size);
@@ -1077,7 +1077,7 @@ static GtkWidget *create_app_dialog (GnomeCmdApp *app, GtkSignalFunc on_ok, GtkS
GtkWidget *dialog = gnome_cmd_dialog_new (NULL);
gtk_widget_ref (dialog);
- gtk_object_set_data (GTK_OBJECT (dialog), "options_dialog", options_dialog);
+ g_object_set_data (G_OBJECT (dialog), "options_dialog", options_dialog);
hbox = create_hbox (dialog, FALSE, 6);
gnome_cmd_dialog_add_category (GNOME_CMD_DIALOG (dialog), hbox);
@@ -1197,7 +1197,7 @@ static void on_app_edit (GtkWidget *button, GtkWidget *parent)
static void on_app_selected (GtkCList *clist, gint row, gint column, GdkEventButton *event, GtkWidget *parent)
{
GnomeCmdApp *app = (GnomeCmdApp *) gtk_clist_get_row_data (clist, row);
- gtk_object_set_data (GTK_OBJECT (parent), "selected_app", app);
+ g_object_set_data (G_OBJECT (parent), "selected_app", app);
gtk_widget_set_sensitive (lookup_widget (parent, "remove_app_button"), TRUE);
gtk_widget_set_sensitive (lookup_widget (parent, "edit_app_button"), TRUE);
@@ -1320,13 +1320,13 @@ static GtkWidget *create_programs_tab (GtkWidget *parent)
gtk_container_add (GTK_CONTAINER (bbox), button);
button = create_stock_button (parent, GTK_STOCK_EDIT, GTK_SIGNAL_FUNC (on_app_edit));
- gtk_object_set_data (GTK_OBJECT (parent), "edit_app_button", button);
+ g_object_set_data (G_OBJECT (parent), "edit_app_button", button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_sensitive (button, FALSE);
gtk_container_add (GTK_CONTAINER (bbox), button);
button = create_stock_button (parent, GTK_STOCK_REMOVE, GTK_SIGNAL_FUNC (on_app_remove));
- gtk_object_set_data (GTK_OBJECT (parent), "remove_app_button", button);
+ g_object_set_data (G_OBJECT (parent), "remove_app_button", button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_sensitive (button, FALSE);
gtk_container_add (GTK_CONTAINER (bbox), button);
@@ -1486,7 +1486,7 @@ static GtkWidget *create_device_dialog (GnomeCmdConDevice *dev, GtkSignalFunc on
dialog = gnome_cmd_dialog_new ("");
gtk_widget_ref (dialog);
gtk_window_set_title (GTK_WINDOW (dialog), "");
- gtk_object_set_data (GTK_OBJECT (dialog), "options_dialog", options_dialog);
+ g_object_set_data (G_OBJECT (dialog), "options_dialog", options_dialog);
table = create_table (dialog, 4, 2);
gnome_cmd_dialog_add_category (GNOME_CMD_DIALOG (dialog), table);
@@ -1573,7 +1573,7 @@ static void on_device_remove (GtkWidget *button, GtkWidget *frame)
static void on_device_selected (GtkCList *clist, gint row, gint column, GdkEventButton *event, GtkWidget *parent)
{
GnomeCmdConDevice *dev = GNOME_CMD_CON_DEVICE (gtk_clist_get_row_data (clist, row));
- gtk_object_set_data (GTK_OBJECT (parent), "selected_device", dev);
+ g_object_set_data (G_OBJECT (parent), "selected_device", dev);
gtk_widget_set_sensitive (lookup_widget (parent, "remove_device_button"), TRUE);
gtk_widget_set_sensitive (lookup_widget (parent, "edit_device_button"), TRUE);
@@ -1649,13 +1649,13 @@ static GtkWidget *create_devices_tab (GtkWidget *parent)
gtk_container_add (GTK_CONTAINER (bbox), button);
button = create_stock_button (parent, GTK_STOCK_EDIT, GTK_SIGNAL_FUNC (on_device_edit));
- gtk_object_set_data (GTK_OBJECT (parent), "edit_device_button", button);
+ g_object_set_data (G_OBJECT (parent), "edit_device_button", button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_sensitive (button, FALSE);
gtk_container_add (GTK_CONTAINER (bbox), button);
button = create_stock_button (parent, GTK_STOCK_REMOVE, GTK_SIGNAL_FUNC (on_device_remove));
- gtk_object_set_data (GTK_OBJECT (parent), "remove_device_button", button);
+ g_object_set_data (G_OBJECT (parent), "remove_device_button", button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_sensitive (button, FALSE);
gtk_container_add (GTK_CONTAINER (bbox), button);
@@ -1763,7 +1763,7 @@ static void init (GnomeCmdOptionsDialog *dialog)
dialog->priv = g_new0 (GnomeCmdOptionsDialog::Private, 1);
- gtk_object_set_data (GTK_OBJECT (options_dialog), "options_dialog", options_dialog);
+ g_object_set_data (G_OBJECT (options_dialog), "options_dialog", options_dialog);
gtk_window_set_position (GTK_WINDOW (options_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_title (GTK_WINDOW (options_dialog), _("Options"));
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index 78eb004..000d52a 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -802,7 +802,7 @@ static void init (GnomeCmdSearchDialog *dialog)
dialog->priv->data = g_new0 (SearchData, 1);
window = GTK_WIDGET (dialog);
- gtk_object_set_data (GTK_OBJECT (window), "window", window);
+ g_object_set_data (G_OBJECT (window), "window", window);
gtk_window_set_title (GTK_WINDOW (window), _("Search..."));
gnome_cmd_dialog_set_resizable (GNOME_CMD_DIALOG (dialog), TRUE);
gtk_window_set_default_size (GTK_WINDOW (window), defaults.width, defaults.height);
diff --git a/src/plugin_manager.cc b/src/plugin_manager.cc
index c13ba37..e3bb27c 100644
--- a/src/plugin_manager.cc
+++ b/src/plugin_manager.cc
@@ -416,16 +416,16 @@ void plugin_manager_show ()
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_START);
button = create_button (GTK_WIDGET (dialog), _("_Enable"), GTK_SIGNAL_FUNC (on_toggle));
- gtk_object_set_data (GTK_OBJECT (dialog), "toggle_button", button);
+ g_object_set_data (G_OBJECT (dialog), "toggle_button", button);
gtk_box_pack_start (GTK_BOX (bbox), button, TRUE, FALSE, 0);
button = create_button (GTK_WIDGET (dialog), _("_Configure"), GTK_SIGNAL_FUNC (on_configure));
- gtk_object_set_data (GTK_OBJECT (dialog), "conf_button", button);
+ g_object_set_data (G_OBJECT (dialog), "conf_button", button);
gtk_widget_set_sensitive (button, FALSE);
gtk_box_pack_start (GTK_BOX (bbox), button, TRUE, FALSE, 0);
button = create_button (GTK_WIDGET (dialog), _("_About"), GTK_SIGNAL_FUNC (on_about));
- gtk_object_set_data (GTK_OBJECT (dialog), "about_button", button);
+ g_object_set_data (G_OBJECT (dialog), "about_button", button);
gtk_widget_set_sensitive (button, FALSE);
gtk_box_pack_start (GTK_BOX (bbox), button, TRUE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]