www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/09/18/07:08:05.1

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=HqaH1clFUrR6qYz7RIGiEWyyOiNsTYA2ikpbnTf4vfD6cc+s0O0aYF/GuK73hVcVon
CSkFbXHENMLJFj3eX2atvZVS4QsooHN5Gzon1sN1alOG7W7gKErFVNigdlHmAhHK8v1a
fmS60TXUcv+EwFAswAyBsnE3olNvYLkNgbdG1Pm1Q39Fz2TTAVlhzObeEUn6xj/kz5JH
F1NzAvC6iHThHWH8iVrILDCo9/clkV8e9QEMg8sLTZswQn7693e8ISZ+xIdn2R/gbQs7
jb/uhlGph2uNekakGZENJjwGnv6JzShnWcTuxl7js0r2p6x8Oa8DuAI6Z6/03AxUT6sW
C3oQ==
X-Received: by 10.180.99.195 with SMTP id es3mr2014778wib.33.1411038478103;
Thu, 18 Sep 2014 04:07:58 -0700 (PDT)
From: Riccardo Lucchese <riccardo DOT lucchese AT gmail DOT com>
To: geda-user AT delorie DOT com
Cc: Riccardo Lucchese <riccardo DOT lucchese AT gmail DOT com>
Subject: [geda-user] [PATCH 22/43] Remove deprecated use of gtk_object_set_data()
Date: Thu, 18 Sep 2014 13:06:17 +0200
Message-Id: <1411038398-10231-23-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

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