gnome-bluetooth r442 - trunk/common



Author: hadess
Date: Tue Mar  3 17:42:58 2009
New Revision: 442
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=442&view=rev

Log:
Remember if a disco was started programatically

So that we start discovering when the user
plugs an adapter in (Closes: #573778)



Modified:
   trunk/common/bluetooth-chooser.c

Modified: trunk/common/bluetooth-chooser.c
==============================================================================
--- trunk/common/bluetooth-chooser.c	(original)
+++ trunk/common/bluetooth-chooser.c	Tue Mar  3 17:42:58 2009
@@ -69,6 +69,7 @@
 	guint show_search : 1;
 	guint show_device_type : 1;
 	guint show_device_category : 1;
+	guint disco_rq : 1;
 };
 
 G_DEFINE_TYPE(BluetoothChooser, bluetooth_chooser, GTK_TYPE_VBOX)
@@ -145,6 +146,8 @@
 
 	if (bluetooth_client_start_discovery (priv->client) != FALSE)
 		gtk_widget_set_sensitive (GTK_WIDGET(priv->search_button), FALSE);
+	else
+		priv->disco_rq = TRUE;
 }
 
 static char *
@@ -418,6 +421,13 @@
 		gtk_widget_set_sensitive (GTK_WIDGET (priv->treeview), TRUE);
 		gtk_widget_set_sensitive (GTK_WIDGET(priv->search_button), TRUE);
 
+		/* Start a disovery if it was requested before we
+		 * had an adapter available */
+		if (priv->disco_rq != FALSE) {
+			bluetooth_chooser_start_discovery (self);
+			priv->disco_rq = FALSE;
+		}
+
 		g_signal_connect (priv->adapter_model, "row-changed",
 				  G_CALLBACK (device_model_row_changed), self);
 	}



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