Mail Archives: geda-user/2014/10/14/16:18:47
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_set_data is
deprecated and should not be used in newly-written code. Use
g_object_set_data() instead."
---
gschem/src/x_attribedit.c | 12 +++++-------
gschem/src/x_menus.c | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index ef90e2a..ee0ad97 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -513,7 +513,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
/* show value only */
gtk_option_menu_set_history (GTK_OPTION_MENU (show_options), 0);
}
- gtk_object_set_data(GTK_OBJECT(aewindow), "attrib", attrib);
+ g_object_set_data(G_OBJECT(aewindow), "attrib", attrib);
if (name) {
gtk_entry_set_text(GTK_ENTRY(attrib_combo_entry), name);
}
@@ -522,16 +522,14 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
len = strlen(val);
gtk_editable_select_region(GTK_EDITABLE(value_entry), 0, len);
}
- gtk_object_set_data(GTK_OBJECT(aewindow), "invocation_flag",
- GINT_TO_POINTER(flag));
+ g_object_set_data(G_OBJECT(aewindow), "invocation_flag",
+ GINT_TO_POINTER(flag));
if (!x_event_get_pointer_position(w_current, TRUE, &wx, &wy)) {
wx = wy = -1;
}
- gtk_object_set_data(GTK_OBJECT(aewindow), "position_wx",
- GINT_TO_POINTER(wx));
- gtk_object_set_data(GTK_OBJECT(aewindow), "position_wy",
- GINT_TO_POINTER(wy));
+ g_object_set_data(G_OBJECT(aewindow), "position_wx", GINT_TO_POINTER(wx));
+ g_object_set_data(G_OBJECT(aewindow), "position_wy", GINT_TO_POINTER(wy));
/* gschem specific */
i = 0;
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 8a0e3d1..ac5b0d9 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -215,7 +215,7 @@ get_main_menu(GschemToplevel *w_current)
/* add a handle to the menu_bar object to get access to widget objects */
/* This string should NOT be internationalized */
buf = g_strdup_printf("%s/%s", *raw_menu_name, raw_menu_item_name);
- gtk_object_set_data(GTK_OBJECT(menu_bar), buf, menu_item);
+ g_object_set_data(G_OBJECT(menu_bar), buf, menu_item);
g_free(buf);
scm_dynwind_end();
--
2.1.0
- Raw text -