From patchwork Tue Apr 29 09:46:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 343763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 421EE1400E2 for ; Tue, 29 Apr 2014 19:48:52 +1000 (EST) Received: from localhost ([::1]:48430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf4eg-00028K-54 for incoming@patchwork.ozlabs.org; Tue, 29 Apr 2014 05:48:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf4cO-0008Nu-SR for qemu-devel@nongnu.org; Tue, 29 Apr 2014 05:46:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wf4cH-0008Dh-Fr for qemu-devel@nongnu.org; Tue, 29 Apr 2014 05:46:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf4cH-0008DH-8S for qemu-devel@nongnu.org; Tue, 29 Apr 2014 05:46:21 -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 s3T9kJU5020655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Apr 2014 05:46:19 -0400 Received: from nilsson.home.kraxel.org (ovpn-116-81.ams2.redhat.com [10.36.116.81]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3T9kI2X027485; Tue, 29 Apr 2014 05:46:19 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id CA8A380642; Tue, 29 Apr 2014 11:46:17 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 29 Apr 2014 11:46:10 +0200 Message-Id: <1398764774-22595-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1398764774-22595-1-git-send-email-kraxel@redhat.com> References: <1398764774-22595-1-git-send-email-kraxel@redhat.com> 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 s3T9kJU5020655 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] [PULL 4/8] 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 From: Cole Robinson 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 Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index a56678f..5cdc044 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);