All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] ‘vte_terminal_copy_clipboard’ is deprecated
@ 2017-10-09 14:55 Anthony PERARD
  2017-10-09 15:02 ` Daniel P. Berrange
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony PERARD @ 2017-10-09 14:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Hi,

Looks like vte_terminal_copy_clipboard() is been deprecated:

  CC      ui/gtk.o
ui/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,

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] ‘vte_terminal_copy_clipboard’ is deprecated
  2017-10-09 14:55 [Qemu-devel] ‘vte_terminal_copy_clipboard’ is deprecated Anthony PERARD
@ 2017-10-09 15:02 ` Daniel P. Berrange
  2017-10-09 15:16   ` Anthony PERARD
  2017-10-10 10:24   ` [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard Anthony PERARD
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2017-10-09 15:02 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: qemu-devel, Gerd Hoffmann

On Mon, Oct 09, 2017 at 03:55:42PM +0100, Anthony PERARD wrote:
> Hi,
> 
> Looks like vte_terminal_copy_clipboard() is been deprecated:
> 
>   CC      ui/gtk.o
> ui/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

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
-- 
|: 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 :|

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] ‘vte_terminal_copy_clipboard’ is deprecated
  2017-10-09 15:02 ` Daniel P. Berrange
@ 2017-10-09 15:16   ` Anthony PERARD
  2017-10-10 10:24   ` [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard Anthony PERARD
  1 sibling, 0 replies; 5+ messages in thread
From: Anthony PERARD @ 2017-10-09 15:16 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Gerd Hoffmann

On Mon, Oct 09, 2017 at 04:02:31PM +0100, Daniel P. Berrange wrote:
> On Mon, Oct 09, 2017 at 03:55:42PM +0100, Anthony PERARD wrote:
> > Hi,
> > 
> > Looks like vte_terminal_copy_clipboard() is been deprecated:
> > 
> >   CC      ui/gtk.o
> > ui/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
> 
> 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 :-)

I was lazy, but yes, I can write the patch. Thanks for reading the doc
:).

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard
  2017-10-09 15:02 ` Daniel P. Berrange
  2017-10-09 15:16   ` Anthony PERARD
@ 2017-10-10 10:24   ` Anthony PERARD
  2017-10-10 14:43     ` Daniel P. Berrange
  1 sibling, 1 reply; 5+ messages in thread
From: Anthony PERARD @ 2017-10-10 10:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Daniel P. Berrange, Anthony PERARD, Gerd Hoffmann

vte_terminal_copy_clipboard() is deprecated in VTE 0.50.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 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)
-- 
Anthony PERARD

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard
  2017-10-10 10:24   ` [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard Anthony PERARD
@ 2017-10-10 14:43     ` Daniel P. Berrange
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2017-10-10 14:43 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: qemu-devel, qemu-trivial, Gerd Hoffmann

On Tue, Oct 10, 2017 at 11:24:18AM +0100, Anthony PERARD wrote:
> vte_terminal_copy_clipboard() is deprecated in VTE 0.50.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>  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)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>


Regards,
Daniel
-- 
|: 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 :|

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-10 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 14:55 [Qemu-devel] ‘vte_terminal_copy_clipboard’ is deprecated Anthony PERARD
2017-10-09 15:02 ` Daniel P. Berrange
2017-10-09 15:16   ` Anthony PERARD
2017-10-10 10:24   ` [Qemu-devel] [PATCH] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard Anthony PERARD
2017-10-10 14:43     ` Daniel P. Berrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.