[Spice-devel] [PATCH spice-gtk] RecentChooser should act on single-click

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Tue May 24 13:37:36 PDT 2011


Fill-in the connection dialog fields as soon user selects a recent
connection.
---
 gtk/spicy.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gtk/spicy.c b/gtk/spicy.c
index 0120692..262d465 100644
--- a/gtk/spicy.c
+++ b/gtk/spicy.c
@@ -160,6 +160,8 @@ static void recent_item_activated_dialog_cb(GtkRecentChooser *chooser, gpointer
     SpiceSession *session = data;
 
     info = gtk_recent_chooser_get_current_item(chooser);
+    if (info == NULL)
+        return;
 
     uri = gtk_recent_info_get_uri(info);
     g_return_if_fail(uri != NULL);
@@ -234,7 +236,7 @@ static int connect_dialog(GtkWidget *parent, SpiceSession *session)
     gtk_recent_filter_add_mime_type(rfilter, "application/x-spice");
     gtk_recent_chooser_set_filter(GTK_RECENT_CHOOSER(recent), rfilter);
     gtk_recent_chooser_set_local_only(GTK_RECENT_CHOOSER(recent), FALSE);
-    g_signal_connect(recent, "item-activated",
+    g_signal_connect(recent, "selection-changed",
                      G_CALLBACK(recent_item_activated_dialog_cb), session);
 #endif
     /* show and wait for response */
-- 
1.7.5.1



More information about the Spice-devel mailing list