[gnome-control-center] bluetooth: use uuids to set switch_connection sensitiveness



commit c7b02d716a9763ba2fca2339d7a7a71f4e1c29f1
Author: Gustavo Padovan <gustavo padovan collabora co uk>
Date:   Tue May 21 18:03:02 2013 -0300

    bluetooth: use uuids to set switch_connection sensitiveness
    
    Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700915

 egg-list-box                          |    2 +-
 libgd                                 |    2 +-
 panels/bluetooth/cc-bluetooth-panel.c |   14 ++++++--------
 3 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/egg-list-box b/egg-list-box
index 9d825b6..1810c05 160000
--- a/egg-list-box
+++ b/egg-list-box
@@ -1 +1 @@
-Subproject commit 9d825b60070ce78a1d892b0888754be72b72033c
+Subproject commit 1810c054ef97833863deff909c46d34da7214bf2
diff --git a/libgd b/libgd
index 3abc95d..5bcd11f 160000
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit 3abc95da3c5b44484aeae3c69e3701da160bf057
+Subproject commit 5bcd11f1add8964ef0a056b2b7051bb97575a94b
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index 7a45a7f..61182ec 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -335,7 +335,6 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
                BluetoothType type;
                gboolean connected;
                GValue value = { 0 };
-               GHashTable *services;
 
                if (self->priv->debug)
                        bluetooth_chooser_dump_selected_device (BLUETOOTH_CHOOSER (self->priv->chooser));
@@ -358,13 +357,6 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
                                    g_value_get_boolean (&value) ? _("Yes") : _("No"));
                g_value_unset (&value);
 
-               /* Connection */
-               bluetooth_chooser_get_selected_device_info (BLUETOOTH_CHOOSER (self->priv->chooser),
-                                                           "services", &value);
-               services = g_value_get_boxed (&value);
-               gtk_widget_set_sensitive (GTK_WIDGET (button), (services != NULL));
-               g_value_unset (&value);
-
                /* UUIDs */
                if (bluetooth_chooser_get_selected_device_info (BLUETOOTH_CHOOSER (self->priv->chooser),
                                                                "uuids", &value)) {
@@ -372,12 +364,18 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
                        guint i;
 
                        uuids = (const char **) g_value_get_boxed (&value);
+
+                       gtk_widget_set_sensitive (GTK_WIDGET(button),
+                                                 bluetooth_client_get_connectable (uuids));
+
                        for (i = 0; uuids && uuids[i] != NULL; i++) {
                                if (g_str_equal (uuids[i], "OBEXObjectPush")) {
                                        gtk_widget_show (WID ("send_box"));
                                        break;
                                }
+
                        }
+
                        g_value_unset (&value);
                }
 


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