Mail Archives: geda-user/2014/10/14/16:19:21
Verbatim from Gtk+ 2 Reference Manual: "gtk_widget_ref has been
deprecated since version 2.12 and should not be used in newly-written
code. Use g_object_ref() instead."
---
gattrib/src/gtksheet_2_2.c | 6 +++---
gschem/src/x_attribedit.c | 14 +++++++-------
gschem/src/x_autonumber.c | 2 +-
gschem/src/x_dialog.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 09bf8fa..051fb7a 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2684,14 +2684,14 @@ gtk_sheet_realize (GtkWidget * widget)
GDK_GC_SUBWINDOW);
if(sheet->sheet_entry->parent){
- gtk_widget_ref(sheet->sheet_entry);
+ g_object_ref(sheet->sheet_entry);
gtk_widget_unparent(sheet->sheet_entry);
}
gtk_widget_set_parent_window (sheet->sheet_entry, sheet->sheet_window);
gtk_widget_set_parent(sheet->sheet_entry, GTK_WIDGET(sheet));
if(sheet->button && sheet->button->parent){
- gtk_widget_ref(sheet->button);
+ g_object_ref(sheet->button);
gtk_widget_unparent(sheet->button);
}
gtk_widget_set_parent_window(sheet->button, sheet->sheet_window);
@@ -6150,7 +6150,7 @@ create_sheet_entry(GtkSheet *sheet)
if(sheet->sheet_entry){
/* avoids warnings */
- gtk_widget_ref(sheet->sheet_entry);
+ g_object_ref(sheet->sheet_entry);
gtk_widget_unparent(sheet->sheet_entry);
gtk_widget_destroy(sheet->sheet_entry);
}
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index bc23693..266b2df 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -394,7 +394,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (0), 0, 0);
value_entry = gtk_entry_new ();
- gtk_widget_ref (value_entry);
+ g_object_ref(value_entry);
g_object_set_data_full(G_OBJECT(aewindow), "value_entry", value_entry,
(GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach (GTK_TABLE (table), value_entry, 1, 2, 1, 2,
@@ -404,7 +404,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
/* Visibility */
visbutton = gtk_check_button_new_with_label (_("Visible"));
- gtk_widget_ref (visbutton);
+ g_object_ref(visbutton);
g_object_set_data_full(G_OBJECT(aewindow), "visbutton", visbutton,
(GtkDestroyNotify)gtk_widget_unref);
@@ -414,7 +414,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (0), 0, 0);
show_options = gtk_option_menu_new ();
- gtk_widget_ref (show_options);
+ g_object_ref(show_options);
g_object_set_data_full(G_OBJECT(aewindow), "show_options", show_options,
(GtkDestroyNotify)gtk_widget_unref);
gtk_widget_show (show_options);
@@ -450,7 +450,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
addtoallbutton = gtk_radio_button_new_with_label (hbox2_group, _("All"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtoallbutton));
- gtk_widget_ref (addtoallbutton);
+ g_object_ref(addtoallbutton);
g_object_set_data_full(G_OBJECT(aewindow), "addtoallbutton",
addtoallbutton, (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach(GTK_TABLE(table), addtoallbutton, 0, 1, 0, 1,
@@ -458,7 +458,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
addtocompsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Components"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtocompsbutton));
- gtk_widget_ref (addtocompsbutton);
+ g_object_ref(addtocompsbutton);
g_object_set_data_full(G_OBJECT(aewindow), "addtocompsbutton",
addtocompsbutton,
(GtkDestroyNotify)gtk_widget_unref);
@@ -467,7 +467,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
addtonetsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Nets"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtonetsbutton));
- gtk_widget_ref (addtonetsbutton);
+ g_object_ref(addtonetsbutton);
g_object_set_data_full(G_OBJECT(aewindow), "addtonetsbutton",
addtonetsbutton,
(GtkDestroyNotify)gtk_widget_unref);
@@ -476,7 +476,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
overwritebutton = gtk_check_button_new_with_label (_("Replace existing attributes"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(overwritebutton), TRUE);
- gtk_widget_ref (overwritebutton);
+ g_object_ref(overwritebutton);
g_object_set_data_full(G_OBJECT(aewindow), "overwritebutton",
overwritebutton,
(GtkDestroyNotify)gtk_widget_unref);
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index 7a94cc1..0926347 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -34,7 +34,7 @@
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
- gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+ g_object_ref(widget), (GDestroyNotify) gtk_widget_unref)
/** @brief How many entries to keep in the "Search text" combo box. */
#define HISTORY_LENGTH 15
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index fcc0381..97120f1 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -34,7 +34,7 @@
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
- gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+ g_object_ref(widget), (GDestroyNotify) gtk_widget_unref)
--
2.1.0
- Raw text -