[gnome-bluetooth] lib: Fix "default-adapter-name" property



commit cf80e20342a48b2b84aae1cecf965ba9c543d2fb
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Nov 29 16:51:59 2013 +0100

    lib: Fix "default-adapter-name" property
    
    Which wasn't getting updated when the default-adapter changed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719564

 lib/bluetooth-client.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 1f19ef3..ff062e0 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -535,6 +535,7 @@ default_adapter_changed (ObjectManager   *manager,
                g_object_notify (G_OBJECT (client), "default-adapter-powered");
                g_object_notify (G_OBJECT (client), "default-adapter-discoverable");
                g_object_notify (G_OBJECT (client), "default-adapter-discovering");
+               g_object_notify (G_OBJECT (client), "default-adapter-name");
                return;
        }
 
@@ -572,8 +573,10 @@ adapter_g_properties_changed (GDBusProxy      *adapter,
                                            BLUETOOTH_COLUMN_NAME, name, -1);
                        gtk_tree_model_get (GTK_TREE_MODEL(priv->store), &iter,
                                            BLUETOOTH_COLUMN_DEFAULT, &is_default, -1);
-                       if (is_default != FALSE)
+                       if (is_default != FALSE) {
                                g_object_notify (G_OBJECT (client), "default-adapter-powered");
+                               g_object_notify (G_OBJECT (client), "default-adapter-name");
+                       }
                        notify = TRUE;
                } else if (g_str_equal (property, "Discovering") == TRUE) {
                        gboolean discovering = g_variant_get_boolean (v);
@@ -599,6 +602,7 @@ adapter_g_properties_changed (GDBusProxy      *adapter,
                                g_object_notify (G_OBJECT (client), "default-adapter-powered");
                                g_object_notify (G_OBJECT (client), "default-adapter-discoverable");
                                g_object_notify (G_OBJECT (client), "default-adapter-discovering");
+                               g_object_notify (G_OBJECT (client), "default-adapter-name");
                        }
                        notify = TRUE;
                } else if (g_str_equal (property, "Discoverable") == TRUE) {


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