‘vte_terminal_copy_clipboard’ is deprecated
Hi,
Looks like vte_terminal_copy_clipboard() is been deprecated:
CC ui/gtk.oui/gtk.c: In function ‘gd_menu_copy’ui/gtk.c:1705:5: error: ‘vte_terminal_copy_clipboard’ is deprecated [-Werror=deprecated-declarations]
vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte.terminal));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/vte-2.91/vte/vte.h:35:0,
from ui/gtk.c:47:
/usr/include/vte-2.91/vte/vtedeprecated.h:94:6: note: declared here
void vte_terminal_copy_clipboard(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
make: *** [/local/home/sheep/work/qemu/rules.mak:66: ui/gtk.o] Error 1
Package version:
$ pacman -Qo /usr/include/vte-2.91/vte/vte.h /usr/include/vte-2.91/vte/vte.h is owned by vte3 0.50.1-1
Regards,
Signature · 1 line
Anthony PERARD
Quoted 14 lines · Anthony PERARD
Hi,
Looks like
vte_terminal_copy_clipboard()is been deprecated:CC
ui/gtk.oui/gtk.c: In function ‘gd_menu_copy’ui/gtk.c:1705:5: error: ‘vte_terminal_copy_clipboard’ is deprecated [-Werror=deprecated-declarations]vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte.terminal)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/vte-2.91/vte/vte.h:35:0, from ui/gtk.c:47: /usr/include/vte-2.91/vte/vtedeprecated.h:94:6: note: declared here void vte_terminal_copy_clipboard(VteTerminal *terminal) _VTE_GNUC_NONNULL(1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 2 lines
cc1: all warnings being treated as errors
make: *** [/local/home/sheep/work/qemu/rules.mak:66:ui/gtk.o] Error 1
The docs say it should be simply replaced with a call to vte_terminal_copy_clipboard_format, using VTE_FORMAT_TEXT as the format.
So we just need to make either the old or new method call conditional on VTE version >= 0.50.0
Since you've got the new vte installed to test with, do you want to write a patch for that :-)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 22 lines · Daniel P. Berrange
Quoted 14 lines · Anthony PERARD
Hi,
Looks like
vte_terminal_copy_clipboard()is been deprecated:CC
ui/gtk.oui/gtk.c: In function ‘gd_menu_copy’ui/gtk.c:1705:5: error: ‘vte_terminal_copy_clipboard’ is deprecated [-Werror=deprecated-declarations]vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte.terminal)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/vte-2.91/vte/vte.h:35:0, from ui/gtk.c:47: /usr/include/vte-2.91/vte/vtedeprecated.h:94:6: note: declared here void vte_terminal_copy_clipboard(VteTerminal *terminal) _VTE_GNUC_NONNULL(1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 2 lines
cc1: all warnings being treated as errors
make: *** [/local/home/sheep/work/qemu/rules.mak:66:ui/gtk.o] Error 1The docs say it should be simply replaced with a call to
vte_terminal_copy_clipboard_format, usingVTE_FORMAT_TEXTas the format.
Quoted 5 lines
So we just need to make either the old or new method call conditional on VTE version >= 0.50.0
Since you've got the new vte installed to test with, do you want to write a patch for that :-)
I was lazy, but yes, I can write the patch. Thanks for reading the doc :).
Signature · 1 line
Anthony PERARD
PATCH 1/1 ui/gtk: Fix deprecation of vte_terminal_copy_clipboard
In reply to Daniel P. Berrangevte_terminal_copy_clipboard() is deprecated in VTE 0.50.
--- ui/gtk.c | 5 +++++ 1 file changed, 5 insertions(+)
ui/gtk.c +5 -0
@@ -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)
Signature · 1 line
Anthony PERARD
Re: [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard
Quoted 14 lines · Anthony PERARD
vte_terminal_copy_clipboard()is deprecated in VTE 0.50.Signed-off-by Anthony PERARD <[email protected]>--- ui/gtk.c | 5 +++++ 1 file changed, 5 insertions(+)ui/gtk.c +0
-0@@ -1702,7 +1702,12 @@ static void gd_menu_copy(GtkMenuItem *item, void *opaque)GtkDisplayState *s = opaque;VirtualConsole *vc =gd_vc_find_current (s);
ui/gtk.c static void gd_menu_copy(GtkMenuItem *item, void *opaque) · line 1713
Quoted 10 lines
ui/gtk.c +5
-0+#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)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|