Re: [remote-viewer PATCH 6/7 v2] remote-viewer-connect: Fixed reselecting in recent chooser

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

 



ACK

On Thu, 2015-06-11 at 16:28 +0200, Lukas Venhoda wrote:
> Recent chooser didn't unselect on loosing focus.
> Selecting recent connection, then modifying address in entry and
> doubleclicking on the same recent connection caused remote-viewer to
> connect to address in the entry,
> 
> Recent chooser now unselects on loosing focus, forcing to re-select when
> doubleclicking the recent connection, which will now properly set the
> address to connect to.
> ---
> Changes since v1
>  - New patch
>  - Split from the v1 patch as requested
> ---
>  src/remote-viewer-connect.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/remote-viewer-connect.c b/src/remote-viewer-connect.c
> index 85bd8cc..194104e 100644
> --- a/src/remote-viewer-connect.c
> +++ b/src/remote-viewer-connect.c
> @@ -97,6 +97,14 @@ entry_changed_cb(GtkEditable* entry, gpointer data G_GNUC_UNUSED)
>                   NULL);
>  }
> 
> +static gboolean
> +entry_focus_in_cb(GtkWidget *widget G_GNUC_UNUSED, GdkEvent *event G_GNUC_UNUSED, gpointer data)
> +{
> +    GtkRecentChooser *recent = data;
> +    gtk_recent_chooser_unselect_all(recent);
> +    return FALSE;
> +}
> +
>  static void
>  entry_activated_cb(GtkEntry *entry G_GNUC_UNUSED, gpointer data)
>  {
> @@ -209,6 +217,8 @@ remote_viewer_connect_dialog(gchar **uri)
>                       G_CALLBACK(recent_selection_changed_dialog_cb), entry);
>      g_signal_connect(recent, "item-activated",
>                       G_CALLBACK(recent_item_activated_dialog_cb), &ci);
> +    g_signal_connect(entry, "focus-in-event",
> +                     G_CALLBACK(entry_focus_in_cb), recent);
> 
>      /* show and wait for response */
>      gtk_widget_show_all(window);
> --
> 2.4.2
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list


_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux