Re: [spicy PATCH 4/7 v4] spicy: Fixed reselecting in recent chooser

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

 



Hey,
The patch looks good, but the commit log could be improved imo.

On Tue, Jun 16, 2015 at 11:41:54AM +0200, Lukas Venhoda wrote:
> Recent chooser didn't unselect on loosing focus.
> Selecting recent connection, then modifying the
> entries and doubleclicking on the same recent
> connection caused spicy to connect to address
> in the entry, instead of the one in recent chooser.
> 
> 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.


"Selecting an entry in the recent connections list, and then modifying
the host/port/TLS port, and double-clicking on that same entry in the
list would cause spicy to connect to the edited address rather than
the one which was picked in the recent chooser.

After this commit, the selection will be cleared from the recent
chooser, and double-clicking on an entry after editing it will always
trigger a 'selection-changed' signal, which will properly set the
address to connect to"

An alternative fix would be to trigger
recent_selection_changed_dialog_cb() before connect_cb() on
GtkRecentChooser::item-activated


> ---
> No changes since v3
> 
> Changes since v2
>  - New patch
>  - Split from the v2 patch as requested
> ---
>  src/spicy-connect.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/spicy-connect.c b/src/spicy-connect.c
> index d27cce1..1b90217 100644
> --- a/src/spicy-connect.c
> +++ b/src/spicy-connect.c
> @@ -63,6 +63,13 @@ static gboolean close_cb(gpointer data)
>      return TRUE;
>  }
> 
> +static gboolean entry_focus_in_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
> +{
> +    GtkRecentChooser *recent = data;

I'd add a GTK_RECENT_CHOOSER(data) cast in order to get a runtime check
in case something bad happens.

Christophe

Attachment: pgpJw0Ifov2TT.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]