提交 6415994f 编写于 作者: K Kevin Wolf 提交者: Gerd Hoffmann

gtk: Don't vte_terminal_set_encoding() on new VTE versions

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/1794939Reported-by: NBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Message-id: 20181011153039.2324-1-kwolf@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 75e50c80
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册