From: Cole Robinson <crobinso@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Cole Robinson <crobinso@redhat.com>
Subject: [Qemu-devel] [PATCH v2 3/7] gtk: Don't use deprecated vte_terminal_get_adjustment
Date: Thu, 13 Mar 2014 15:30:20 -0400 [thread overview]
Message-ID: <e229e545771d3a0d9a9c9a6465b3340be0ffda4d.1394738819.git.crobinso@redhat.com> (raw)
In-Reply-To: <cover.1394738819.git.crobinso@redhat.com>
In-Reply-To: <cover.1394738819.git.crobinso@redhat.com>
Guard this with a VTE and GTK version check so we don't break GTK2 builds.
ui/gtk.c: In function ‘gd_vc_init’:
ui/gtk.c:1176:5: error: ‘vte_terminal_get_adjustment’ is deprecated (declared at /usr/include/vte-2.90/vte/vtedeprecated.h:101) [-Werror=deprecated-declarations]
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
v2: Fix GTK2 build
ui/gtk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index ce24b95..82a7fd2 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1194,7 +1194,11 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL
vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1);
+#if VTE_CHECK_VERSION(0, 28, 0) && GTK_CHECK_VERSION(3, 0, 0)
+ vadjustment = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vc->terminal));
+#else
vadjustment = vte_terminal_get_adjustment(VTE_TERMINAL(vc->terminal));
+#endif
scrolled_window = gtk_scrolled_window_new(NULL, vadjustment);
gtk_container_add(GTK_CONTAINER(scrolled_window), vc->terminal);
--
1.8.5.3
next prev parent reply other threads:[~2014-03-13 19:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 19:30 [Qemu-devel] [PATCH v2 0/7] gtk: A few bug fixes Cole Robinson
2014-03-13 19:30 ` [Qemu-devel] [PATCH v2 1/7] configure: Document --with-gtkabi Cole Robinson
2014-03-13 19:30 ` [Qemu-devel] [PATCH v2 2/7] gtk: Don't use deprecated gtk_image_menu_item_new_with_mnemonic Cole Robinson
2014-03-13 19:30 ` Cole Robinson [this message]
2014-03-13 19:30 ` [Qemu-devel] [PATCH v2 4/7] gtk: Remove use of deprecated stock items Cole Robinson
2014-03-13 19:30 ` [Qemu-devel] [PATCH v2 5/7] gtk: Use ctrl+alt+q for quit accelerator Cole Robinson
2014-03-13 19:30 ` [Qemu-devel] [PATCH v2 6/7] gtk: Fix mouse warping with gtk3 Cole Robinson
2014-03-13 19:30 ` [Qemu-devel] [PATCH v2 7/7] gtk: Don't warp absolute pointer Cole Robinson
2014-03-14 9:48 ` [Qemu-devel] [PATCH v2 0/7] gtk: A few bug fixes Gerd Hoffmann
2014-03-14 12:03 ` Cole Robinson
2014-03-14 12:09 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e229e545771d3a0d9a9c9a6465b3340be0ffda4d.1394738819.git.crobinso@redhat.com \
--to=crobinso@redhat.com \
--cc=aliguori@amazon.com \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).