gnome-bluetooth r395 - trunk/properties
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-bluetooth r395 - trunk/properties
- Date: Fri, 27 Feb 2009 16:38:08 +0000 (UTC)
Author: hadess
Date: Fri Feb 27 16:38:08 2009
New Revision: 395
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=395&view=rev
Log:
Work-around "Powered" -> false being slow
In bluez, we'll set the scan mode to 0 before bringing the device down,
problem is that we'll try to read the value again from the adapter when
the kernel tells us it's done, but the device will already be
unavailable: command timeout.
Modified:
trunk/properties/adapter.c
Modified: trunk/properties/adapter.c
==============================================================================
--- trunk/properties/adapter.c (original)
+++ trunk/properties/adapter.c Fri Feb 27 16:38:08 2009
@@ -98,6 +98,8 @@
GValue powered = { 0 };
adapter->powered = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ /* Cheat and update the visibility straight away */
+ update_visibility (adapter);
g_value_init(&powered, G_TYPE_BOOLEAN);
g_value_set_boolean(&powered, adapter->powered);
@@ -108,8 +110,6 @@
G_TYPE_INVALID, G_TYPE_INVALID);
g_value_unset(&powered);
-
- update_visibility (adapter);
}
static void discoverable_changed_cb(GtkWidget *button, gpointer user_data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]