From patchwork Tue Oct 10 10:24:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 9996327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E840E603B5 for ; Tue, 10 Oct 2017 14:42:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB69528614 for ; Tue, 10 Oct 2017 14:42:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D04932861C; Tue, 10 Oct 2017 14:42:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=2.0 tests=BAYES_00, DATE_IN_PAST_03_06, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 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 mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 07D6728615 for ; Tue, 10 Oct 2017 14:42:47 +0000 (UTC) Received: from localhost ([::1]:35415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1vk6-0004lz-RH for patchwork-qemu-devel@patchwork.kernel.org; Tue, 10 Oct 2017 10:42:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1vjD-0004j6-MB for qemu-devel@nongnu.org; Tue, 10 Oct 2017 10:41:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1vjA-0002Vx-FV for qemu-devel@nongnu.org; Tue, 10 Oct 2017 10:41:51 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:29524) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1vjA-0002SR-2y; Tue, 10 Oct 2017 10:41:48 -0400 X-IronPort-AV: E=Sophos;i="5.42,505,1500940800"; d="scan'208";a="451628672" From: Anthony PERARD To: Date: Tue, 10 Oct 2017 11:24:18 +0100 Message-ID: <20171010102418.13487-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171009150231.GN2954@redhat.com> References: <20171009150231.GN2954@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Subject: [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Anthony PERARD , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP vte_terminal_copy_clipboard() is deprecated in VTE 0.50. Signed-off-by: Anthony PERARD Reviewed-by: Daniel P. Berrange --- ui/gtk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 5bd87c265a..342e96fbe9 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1702,7 +1702,12 @@ static void gd_menu_copy(GtkMenuItem *item, void *opaque) GtkDisplayState *s = opaque; VirtualConsole *vc = gd_vc_find_current(s); +#if VTE_CHECK_VERSION(0, 50, 0) + vte_terminal_copy_clipboard_format(VTE_TERMINAL(vc->vte.terminal), + VTE_FORMAT_TEXT); +#else vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte.terminal)); +#endif } static void gd_vc_adjustment_changed(GtkAdjustment *adjustment, void *opaque)