Mail Archives: geda-user/2014/10/14/16:19:43
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_get_data is
deprecated and should not be used in newly-written code. Use
g_object_get_data() instead."
---
gschem/src/x_attribedit.c | 31 ++++++++++++-------------------
gschem/src/x_menus.c | 5 +++--
2 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index 266b2df..6ead11a 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -82,13 +82,13 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
i_set_state(w_current, SELECT);
value_entry =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "value_entry");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "value_entry");
name_entry =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "attrib_combo_entry");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "attrib_combo_entry");
visbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "visbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "visbutton");
show_options =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "show_options");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "show_options");
value = gtk_entry_get_text(value_entry);
label = gtk_entry_get_text(name_entry);
@@ -126,7 +126,7 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
}
attribptr =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "attrib");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "attrib");
if (!attribptr) {
OBJECT *new = NULL;
@@ -146,20 +146,16 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
if (nsel > 1) {
addtoallbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "addtoallbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "addtoallbutton");
addtocompsbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "addtocompsbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "addtocompsbutton");
addtonetsbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "addtonetsbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "addtonetsbutton");
overwritebutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "overwritebutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "overwritebutton");
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(overwritebutton))) {
replace = 1;
@@ -219,12 +215,9 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
new = o_attrib_add_attrib(w_current, newtext, vis, show, object);
invocation_flag =
- GPOINTER_TO_INT( gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "invocation_flag") );
- wx = GPOINTER_TO_INT( gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "position_wx"));
- wy = GPOINTER_TO_INT( gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "position_wy"));
+ GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w_current->aewindow), "invocation_flag"));
+ wx = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w_current->aewindow), "position_wx"));
+ wy = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w_current->aewindow), "position_wy"));
#if DEBUG
printf("invocation flag: %d\n", invocation_flag);
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 96be8ea..aec4955 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -324,7 +324,7 @@ void x_menus_sensitivity (GschemToplevel *w_current, const char *buf, int flag)
return;
}
- item = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(w_current->menubar), buf);
+ item = (GtkWidget *) g_object_get_data(G_OBJECT(w_current->menubar), buf);
if (item) {
gtk_widget_set_sensitive(GTK_WIDGET(item), flag);
@@ -412,7 +412,8 @@ void x_menu_attach_recent_files_submenu(GschemToplevel *w_current)
g_signal_connect(GTK_OBJECT(menuitem_file_recent_items), "item-activated",
G_CALLBACK(recent_chooser_item_activated), w_current);
- menuitem_to_append_to = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(w_current->menubar), "_File/Open Recen_t");
+ menuitem_to_append_to = (GtkWidget *) g_object_get_data(G_OBJECT(w_current->menubar),
+ "_File/Open Recen_t");
if(menuitem_to_append_to == NULL)
return;
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem_to_append_to), menuitem_file_recent_items);
--
2.1.0
- Raw text -