summaryrefslogtreecommitdiff
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2014-03-17 16:06:25 -0400
committerGerd Hoffmann <kraxel@redhat.com>2014-04-29 10:46:30 +0200
commit105923e08c724c2a5561673442bca91ddab83b41 (patch)
tree8df4b9a834b26ac073dec3898e27c2aab56caf16 /ui/gtk.c
parent9068f20dfbc8e24afe467ce568dc30049b520652 (diff)
downloadqemu-105923e08c724c2a5561673442bca91ddab83b41.tar.gz
gtk: Don't use deprecated vte_terminal_get_adjustment
Guard this with a VTE version check, since I'm not sure if this is backwards compatible. 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> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index a56678f5ec..5cdc044138 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1251,7 +1251,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);