[gnome-bluetooth] applet: We have a submenu if we have a service



commit d973feb103c247b3e703d8dc60fe8ee2e8977a68
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 27 20:40:26 2010 +0100

    applet: We have a submenu if we have a service
    
    If we can't "Connect" to a device, then we don't have a menu item.
    Keyboards, mice, as well as audio devices will need to have services
    for us to connect to, otherwise there's nothing for us to do.

 applet/main.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/applet/main.c b/applet/main.c
index 6c404f4..c5d8fe1 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -637,16 +637,10 @@ escape_label_for_action (const char *alias)
 static gboolean
 device_has_submenu (BluetoothSimpleDevice *dev)
 {
-	if (dev->can_connect)
+	if (dev->can_connect != FALSE)
 		return TRUE;
 	if (dev->capabilities != BLUETOOTH_CAPABILITIES_NONE)
 		return TRUE;
-	if (dev->type == BLUETOOTH_TYPE_KEYBOARD ||
-		dev->type == BLUETOOTH_TYPE_MOUSE ||
-		dev->type == BLUETOOTH_TYPE_HEADSET ||
-		dev->type == BLUETOOTH_TYPE_HEADPHONES ||
-		dev->type == BLUETOOTH_TYPE_OTHER_AUDIO)
-		return TRUE;
 	return FALSE;
 }
 



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