From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO39p-0007QG-4O for qemu-devel@nongnu.org; Thu, 13 Mar 2014 06:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO39j-0002U1-5s for qemu-devel@nongnu.org; Thu, 13 Mar 2014 06:46:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO39i-0002Tf-Uh for qemu-devel@nongnu.org; Thu, 13 Mar 2014 06:46:31 -0400 From: Gerd Hoffmann Date: Thu, 13 Mar 2014 11:46:08 +0100 Message-Id: <1394707572-15112-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1394707572-15112-1-git-send-email-kraxel@redhat.com> References: <1394707572-15112-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 3/7] gtk: Don't use deprecated vte_terminal_get_adjustment List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori , Cole Robinson From: Cole Robinson Guard this with a VTE version check, since I'm not sure if this is backwa= rds compatible. ui/gtk.c: In function =E2=80=98gd_vc_init=E2=80=99: ui/gtk.c:1176:5: error: =E2=80=98vte_terminal_get_adjustment=E2=80=99 is = deprecated (declared at /usr/include/vte-2.90/vte/vtedeprecated.h:101) [-= Werror=3Ddeprecated-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 107860c..3f2e5f2 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1173,7 +1173,11 @@ static GSList *gd_vc_init(GtkDisplayState *s, Virt= ualConsole *vc, int index, GSL =20 vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1); =20 +#if VTE_CHECK_VERSION(0, 28, 0) + vadjustment =3D gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vc->te= rminal)); +#else vadjustment =3D vte_terminal_get_adjustment(VTE_TERMINAL(vc->termina= l)); +#endif =20 scrolled_window =3D gtk_scrolled_window_new(NULL, vadjustment); gtk_container_add(GTK_CONTAINER(scrolled_window), vc->terminal); --=20 1.8.3.1