aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-02-22 20:09:59 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-22 14:48:53 -0600
commit28d2e5b27d538d94d2489d657b563c58b4d69bc4 (patch)
tree7b9d8a43c21bd6bd0f7cc9f2b186572a56b44327 /ui
parentc95e3080a44946ac5739542b549f5a10ee4ec377 (diff)
ui/gtk: Support versions of VTE before 0.26
This is needed for current Debian stable (Squeeze). VTE versions before 0.26 did not support VtePty. Lower the version requirement and use alternate code which works for Debian. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1361560199-28906-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 008a6f8aef..bc8bdfd6b2 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -868,7 +868,9 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL
const char *label;
char buffer[32];
char path[32];
+#if VTE_CHECK_VERSION(0, 26, 0)
VtePty *pty;
+#endif
GIOChannel *chan;
GtkWidget *scrolled_window;
GtkAdjustment *vadjustment;
@@ -901,9 +903,12 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL
cfmakeraw(&tty);
tcsetattr(slave_fd, TCSAFLUSH, &tty);
+#if VTE_CHECK_VERSION(0, 26, 0)
pty = vte_pty_new_foreign(master_fd, NULL);
-
vte_terminal_set_pty_object(VTE_TERMINAL(vc->terminal), pty);
+#else
+ vte_terminal_set_pty(VTE_TERMINAL(vc->terminal), master_fd);
+#endif
vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1);