qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/12] ui/gtk-clipboard: use existing macros


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 03/12] ui/gtk-clipboard: use existing macros
Date: Mon, 19 Jul 2021 11:13:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/19/21 9:26 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Rather than hardcoding strings

Why not write a full sentence? It is only 3 words saved, and
we could directly understand the comment without having to
look at the subject.

> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/gtk-clipboard.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c
> index bff28d2030..5e817ae55c 100644
> --- a/ui/gtk-clipboard.c
> +++ b/ui/gtk-clipboard.c
> @@ -177,11 +177,11 @@ void gd_clipboard_init(GtkDisplayState *gd)
>      qemu_clipboard_peer_register(&gd->cbpeer);
>  
>      gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD] =
> -        gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE));
> +        gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
>      gd->gtkcb[QEMU_CLIPBOARD_SELECTION_PRIMARY] =
> -        gtk_clipboard_get(gdk_atom_intern("PRIMARY", FALSE));
> +        gtk_clipboard_get(GDK_SELECTION_PRIMARY);
>      gd->gtkcb[QEMU_CLIPBOARD_SELECTION_SECONDARY] =
> -        gtk_clipboard_get(gdk_atom_intern("SECONDARY", FALSE));
> +        gtk_clipboard_get(GDK_SELECTION_SECONDARY);
>  
>      g_signal_connect(gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD],
>                       "owner-change", G_CALLBACK(gd_owner_change), gd);
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]