[gnome-bluetooth] sendto: Make double-click select a device



commit 6f69e4dea03d7cae8496775439a04ebd125e9b23
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Feb 22 15:58:54 2011 +0000

    sendto: Make double-click select a device
    
    In the chooser.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=612177

 sendto/main.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/sendto/main.c b/sendto/main.c
index 9197202..59c8c19 100644
--- a/sendto/main.c
+++ b/sendto/main.c
@@ -631,6 +631,16 @@ select_device_changed(BluetoothChooser *sel,
 				GTK_RESPONSE_ACCEPT, address != NULL);
 }
 
+static void
+select_device_activated(BluetoothChooser *sel,
+			char *address,
+			gpointer user_data)
+{
+	GtkDialog *dialog = user_data;
+
+	gtk_dialog_response(dialog, GTK_RESPONSE_ACCEPT);
+}
+
 static char *
 show_browse_dialog (char **device_name)
 {
@@ -663,6 +673,8 @@ show_browse_dialog (char **device_name)
 		     NULL);
 	g_signal_connect(selector, "selected-device-changed",
 			 G_CALLBACK(select_device_changed), dialog);
+	g_signal_connect(selector, "selected-device-activated",
+			 G_CALLBACK(select_device_activated), dialog);
 	gtk_container_add (GTK_CONTAINER (content_area), selector);
 	bluetooth_chooser_start_discovery (BLUETOOTH_CHOOSER (selector));
 



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