diff mbox

[2/6] gtk: Don't use deprecated vte_terminal_get_adjustment

Message ID 53fb95ab86dcc7fb1aba6661c7e62529b61bdd45.1394656582.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson March 12, 2014, 8:40 p.m. UTC
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>
---
 ui/gtk.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index 3879945..2a9b8c3 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1173,7 +1173,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)
+    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);