[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] ui/gtk: Support versions of VTE before 2.26
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] ui/gtk: Support versions of VTE before 2.26 |
Date: |
Fri, 22 Feb 2013 19:59:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
Sorry, wrong patch. The version check should check for 2.26.0 instead of
2.24.0.
Am 22.02.2013 19:56, schrieb Stefan Weil:
> This is needed for current Debian stable (Squeeze).
>
> VTE versions before 2.26 did not support VtePty.
>
> Lower the version requirement and use alternate code which works for Debian.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> configure | 2 +-
> ui/gtk.c | 7 ++++++-
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 0eb25dd..d62ad7a 100755
> --- a/configure
> +++ b/configure
> @@ -1645,7 +1645,7 @@ fi
>
> if test "$gtk" != "no"; then
> if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
> - $pkg_config --exists 'vte >= 0.26.0'; then
> + $pkg_config --exists 'vte >= 0.24.0'; then
> gtk_cflags=`$pkg_config --cflags gtk+-2.0 2>/dev/null`
> gtk_libs=`$pkg_config --libs gtk+-2.0 2>/dev/null`
> vte_cflags=`$pkg_config --cflags vte 2>/dev/null`
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 10bac94..d1230a6 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -869,7 +869,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(2, 24, 0)
> VtePty *pty;
> +#endif
> GIOChannel *chan;
> GtkWidget *scrolled_window;
> GtkAdjustment *vadjustment;
> @@ -902,9 +904,12 @@ static GSList *gd_vc_init(GtkDisplayState *s,
> VirtualConsole *vc, int index, GSL
> cfmakeraw(&tty);
> tcsetattr(slave_fd, TCSAFLUSH, &tty);
>
> +#if VTE_CHECK_VERSION(2, 24, 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);
>