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=0wajB+cjcQ0kouXYWGFG+qdjbLRwyOiFcFZH/lOicWQ=; b=fiaiz2eg9JNl2NLHnaDkL5e7xvThc8Xb2cmZpvriT2ba/bI/SGvzqnvN0SNccA/b0D PhCsPkTC16aqEsBdX9XXkyrQ/FHfK6F8pFKHiWxuTgF5QV17AhJaFY56Sz2t6hENWluI IO2inoVi+PrOLe69EEJ0swnKmbkIDaHIGpOWSkgj89FGsOBAH+WgZ50P39ksk85RuR+Y vEtXDdTJt8wS2ZSEOs5WBWdybVpKbPUhj32SNsJcugHmHnxB1uY7BR+X9m1YQnT/VPLJ uGBI7p6Bkf2jdjdaAaxraIQX5iXPpCQWVKH7ON46/wRjVUcIiPtI/qMVLJYXgeGpARmZ BPRA== X-Received: by 10.180.72.170 with SMTP id e10mr11736966wiv.75.1411038468135; Thu, 18 Sep 2014 04:07:48 -0700 (PDT) From: Riccardo Lucchese To: geda-user AT delorie DOT com Cc: Riccardo Lucchese Subject: [geda-user] [PATCH 19/43] Remove deprecated use of gdk_drawable_get_size() Date: Thu, 18 Sep 2014 13:06:14 +0200 Message-Id: <1411038398-10231-20-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: "gdk_drawable_get_size has been deprecated since version 2.24 and should not be used in newly-written code. Use gdk_window_get_width() and gdk_window_get_height() for GdkWindows." --- gschem/src/gschem_page_view.c | 3 ++- gschem/src/x_event.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gschem/src/gschem_page_view.c b/gschem/src/gschem_page_view.c index 5b6d81f..7ffbd8b 100644 --- a/gschem/src/gschem_page_view.c +++ b/gschem/src/gschem_page_view.c @@ -365,7 +365,8 @@ gschem_page_view_get_page_geometry (GschemPageView *view) geometry = g_hash_table_lookup (view->geometry_table, page); /* \todo The following line is depricated in GDK 2.24 */ - gdk_drawable_get_size (GTK_WIDGET (view)->window, &screen_width, &screen_height); + screen_width = gdk_window_get_width(GTK_WIDGET(view)->window); + screen_height = gdk_window_get_height(GTK_WIDGET(view)->window); if (geometry == NULL) { geometry = gschem_page_geometry_new_with_values (screen_width, diff --git a/gschem/src/x_event.c b/gschem/src/x_event.c index 4404241..bc31fc0 100644 --- a/gschem/src/x_event.c +++ b/gschem/src/x_event.c @@ -1383,7 +1383,8 @@ x_event_get_pointer_position (GschemToplevel *w_current, gboolean snapped, gint g_return_val_if_fail (GTK_WIDGET (page_view)->window != NULL, FALSE); /* \todo The following line is depricated in GDK 2.24 */ - gdk_drawable_get_size (GTK_WIDGET (page_view)->window, &width, &height); + width = gdk_window_get_width(GTK_WIDGET(page_view)->window); + height = gdk_window_get_height(GTK_WIDGET(page_view)->window); gtk_widget_get_pointer(GTK_WIDGET (page_view), &sx, &sy); -- 2.1.0