delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/10/14/16:18:47

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=ed097zCQL3CGsTkYNrE5NR9iKlnsNanwyU3MB/rIAqE=;
b=JPNJWRXsFSupPC/1RVvlKfVxIa8+1m3wBzY6Z+EOZYmSB/ufTUz5zHYtr6/TSr0xOm
i4FQl1c9g5z5ccN5lcL1LKDqwMEGY+svzAFjITP95lI0O8jBBG83bDm6H37vNvpPYOr+
nUcSGwmr5LUZvIW9AWjX/Y0Lyps5Lyrpgz0JjCjskOB7HdD8LunLXzq7CqIonxjvYsln
EPprmHpbPyt/eHnA0jyKA0TctDuSkph5XwOdUCuy2KCZjXplWcr8sCgd7XAfq4DRafU2
u04QyZihj3pAfvpHtJQRMEsHL5V7hrFrTQWnXSkVsTsbCcQzWZqrq6cQQxerASnvYEQr
kznA==
X-Received: by 10.180.99.67 with SMTP id eo3mr7739449wib.82.1413317919762;
Tue, 14 Oct 2014 13:18:39 -0700 (PDT)
From: Riccardo Lucchese <riccardo DOT lucchese AT gmail DOT com>
To: geda-user AT delorie DOT com
Cc: paubert AT iram DOT es, Riccardo Lucchese <riccardo DOT lucchese AT gmail DOT com>
Subject: [geda-user] [PATCH V2 22/43] Remove deprecated use of gtk_object_set_data()
Date: Tue, 14 Oct 2014 22:17:14 +0200
Message-Id: <1413317855-10673-23-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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019