diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-17 12:34:38 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-17 12:36:44 +0200 |
commit | c33528da7a300718b03ed3e19ef2fea5bdf27c1d (patch) | |
tree | 0dab29c3c730bbd8750f248f9436ad630f17c28a /libupower-glib | |
parent | c9f3a13b296eb9b2e4a457f87d57bd0dfabd1225 (diff) | |
download | upower-c33528da7a300718b03ed3e19ef2fea5bdf27c1d.tar.gz |
lib: Simplify proxying glue properties in UpClient
Diffstat (limited to 'libupower-glib')
-rw-r--r-- | libupower-glib/up-client.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c index 4bdfa91..025455a 100644 --- a/libupower-glib/up-client.c +++ b/libupower-glib/up-client.c @@ -573,9 +573,6 @@ static void up_client_init (UpClient *client) { GError *error = NULL; - GParamSpec **specs; - guint n_props; - guint i; client->priv = UP_CLIENT_GET_PRIVATE (client); client->priv->array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); @@ -603,17 +600,8 @@ up_client_init (UpClient *client) g_signal_connect (client->priv->proxy, "changed", G_CALLBACK (up_client_changed_cb), client); - /* Proxy all the property notifications from the glue object */ - specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (client), &n_props); - for (i = 0; i < n_props; i++) { - gchar *signal_name; - - signal_name = g_strdup_printf ("notify::%s", specs[i]->name); - g_signal_connect (client->priv->proxy, signal_name, - G_CALLBACK (up_client_notify_cb), client); - g_free (signal_name); - } - g_free (specs); + g_signal_connect (client->priv->proxy, "notify", + G_CALLBACK (up_client_notify_cb), client); } /* |