]> Git Repo - qemu.git/commitdiff
gtk: Don't vte_terminal_set_encoding() on new VTE versions
authorKevin Wolf <[email protected]>
Thu, 11 Oct 2018 15:30:39 +0000 (17:30 +0200)
committerGerd Hoffmann <[email protected]>
Fri, 12 Oct 2018 12:40:02 +0000 (14:40 +0200)
The function vte_terminal_set_encoding() is deprecated since VTE 0.54,
so stop calling it from that version on. This fixes a build error
because of our use of warning flags [-Werror=deprecated-declarations].

Fixes: https://bugs.launchpad.net/bugs/1794939
Reported-by: Bastian Koppelmann <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
Message-id: 20181011153039[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/gtk.c

index 3ddb5fe162b8b51ebf3768901437dbdd8fd469db..1d68276253f514494022635762bd9c141bd7120d 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1951,12 +1951,14 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
     g_signal_connect(vc->vte.terminal, "commit", G_CALLBACK(gd_vc_in), vc);
 
     /* The documentation says that the default is UTF-8, but actually it is
-     * 7-bit ASCII at least in VTE 0.38.
-     */
+     * 7-bit ASCII at least in VTE 0.38. The function is deprecated since
+     * VTE 0.54 (only UTF-8 is supported now). */
+#if !VTE_CHECK_VERSION(0, 54, 0)
 #if VTE_CHECK_VERSION(0, 38, 0)
     vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8", NULL);
 #else
     vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8");
+#endif
 #endif
 
     vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte.terminal), -1);
This page took 0.029563 seconds and 4 git commands to generate.