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=ntwMyHJDMlVV+MGmq393SQLf9jWZpD46nllkIxzePNM=; b=kdtFL7PMs38uvSFIV7LrEMWMmal9bPoezEC5rX9rNRKHi0NKLDfJNhDOPlh8rqj1O9 +3RAYeMmixgA0kwxpgGkqyKWAHIE4DvRxyna/d2gT/0XTeCIKaoHWyZCdJUNit+po07G EEfKXypLRbY7Dbi+69LJDyZ3WRWsEpNaJ/9m+pP2xfRfoQOhcm5iVYQdfpPTh25igIbh 0x6vqWl9lBOrBWM3Asw9xJ15n3WT1dEX73W5CMM6jjfpnx0CQyHydlcfeBzYKz1NZG0q Woqswx9pB986TnZ10zL2UThTWzQkAFDIKttVAw4+1QeEPqTwmH6/BD4MFvFRpE8GAHbD LIcw== X-Received: by 10.180.14.101 with SMTP id o5mr12392848wic.25.1411038539751; Thu, 18 Sep 2014 04:08:59 -0700 (PDT) From: Riccardo Lucchese To: geda-user AT delorie DOT com Cc: Riccardo Lucchese Subject: [geda-user] [PATCH 41/43] Remove deprecated use of gtk_object_get_data() Date: Thu, 18 Sep 2014 13:06:36 +0200 Message-Id: <1411038398-10231-42-git-send-email-riccardo.lucchese@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411038398-10231-1-git-send-email-riccardo.lucchese@gmail.com> References: <1411038398-10231-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 b6a66a0..d76d166 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 d72c4eb..e690b31 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