delorie.com/archives/browse.cgi | search |
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=3fE9Ce8WzSx8fpmSeaSV8aRb6RHIk5Z6BnG81h97zPg=; | |
b=UBxQBn70hTKQXqM9dudUG++31pYww9ZXN/XXaTWjW2Vb5zMZeCKNxjjTVWiLUP3/dW | |
nzOfM7V7GhLNhRnRuXm+J+xvr18mHM7bOkUJTgpFtNN2KQzp8NucBE2ycS6i4QQ6Ompe | |
bpXKIexVzZu9RNwRhKI7dtD+0aWMyM3yiEOU4VvTyLSI5Y1CR6keC9n7rtABBz2MA+Lq | |
TC+kKiPCfRK5VfoSrJ6b9xRhQ6LHFoYRko2uMJTc8rquzghnNXFpZNSiI4lMrl4jnnu+ | |
ndqFRgKdoe+MCNwpjQAb0H/KOV2XDR0Vbn9tuVCN3dGg+itp9dL7JXS0HLd/IYQP2deC | |
RQUg== | |
X-Received: | by 10.180.205.162 with SMTP id lh2mr7613152wic.14.1413317908626; |
Tue, 14 Oct 2014 13:18:28 -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 19/43] Remove deprecated use of gdk_drawable_get_size() |
Date: | Tue, 14 Oct 2014 22:17:11 +0200 |
Message-Id: | <1413317855-10673-20-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: "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 | 5 ++--- gschem/src/x_event.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gschem/src/gschem_page_view.c b/gschem/src/gschem_page_view.c index a67ff55..99d502f 100644 --- a/gschem/src/gschem_page_view.c +++ b/gschem/src/gschem_page_view.c @@ -359,9 +359,8 @@ gschem_page_view_get_page_geometry (GschemPageView *view) } geometry = g_hash_table_lookup (view->geometry_table, page); - - /* \todo The following line is deprecated 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 c31f913..d33a40a 100644 --- a/gschem/src/x_event.c +++ b/gschem/src/x_event.c @@ -1328,8 +1328,8 @@ x_event_get_pointer_position (GschemToplevel *w_current, gboolean snapped, gint g_return_val_if_fail (page_view != NULL, FALSE); 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |