X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dsR0g69mJgIeautJX1zz43exDILEptTSbb9W5xF0SJI=; b=swbun2egcKExaCLRSn68RmMuNx//bO6ATyAHas1HFTRoNQ+BuLt4NY0rUYolVYd22Z +UjX/IQd+4PpLkZASLrQaaQw8iSTglYhdXdG/+bZyn4ILHQb754xaJYsqu1TrEZz+a49 eq1uk4hBw4hO/LeKj4afCQxTW13ZbvrJwaHglT4Mj13lgNlg/QBX0Z/uo5iXmx7lxCK1 Sd2ysg379arLo/hzpY6NZpyXRvWXESbWdE+3BEkbqRc/haepgV3Pq9bw55S4u62JXtZa gbBy3HSPOhQGr85lyeO6SAJCC5P7YYRdVfjG1LbGNv2J2QQnrlHjupUcQwwtM17Kv6cH 3PUA== X-Received: by 10.180.72.241 with SMTP id g17mr7757728wiv.31.1413317974847; Tue, 14 Oct 2014 13:19:34 -0700 (PDT) From: Riccardo Lucchese To: geda-user AT delorie DOT com Cc: paubert AT iram DOT es, Riccardo Lucchese Subject: [geda-user] [PATCH V2 41/43] Remove deprecated use of gtk_object_get_data() Date: Tue, 14 Oct 2014 22:17:33 +0200 Message-Id: <1413317855-10673-42-git-send-email-riccardo.lucchese@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1413317855-10673-1-git-send-email-riccardo.lucchese@gmail.com> References: <1413317855-10673-1-git-send-email-riccardo DOT lucchese AT gmail DOT com> Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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