From patchwork Mon Mar 17 20:06:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 331161 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7D8BF2C00BE for ; Tue, 18 Mar 2014 07:09:35 +1100 (EST) Received: from localhost ([::1]:60046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPdqm-0004II-Vo for incoming@patchwork.ozlabs.org; Mon, 17 Mar 2014 16:09:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPdp4-0002Ge-Rm for qemu-devel@nongnu.org; Mon, 17 Mar 2014 16:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPdoy-0003OR-Fn for qemu-devel@nongnu.org; Mon, 17 Mar 2014 16:07:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPdoy-0003OF-8I for qemu-devel@nongnu.org; Mon, 17 Mar 2014 16:07:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2HK6cCX010758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Mar 2014 16:06:38 -0400 Received: from colepc.home.com (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2HK6WeB008397; Mon, 17 Mar 2014 16:06:37 -0400 From: Cole Robinson To: qemu-devel@nongnu.org Date: Mon, 17 Mar 2014 16:06:25 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id s2HK6cCX010758 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori , Cole Robinson Subject: [Qemu-devel] [PATCH v3 3/5] gtk: Don't use deprecated vte_terminal_get_adjustment X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- ui/gtk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 8d2873a..a048956 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1202,7 +1202,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);