[gnome-settings-daemon/docking-stations] Oops, register all of our DBus interfaces, not just the first one



commit 3ab4df3e04a23d09fb5468fd6689164ba5930c56
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Nov 23 09:34:15 2011 -0600

    Oops, register all of our DBus interfaces, not just the first one
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 plugins/xrandr/gsd-xrandr-manager.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 7ce1b2f..231489c 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -2209,6 +2209,8 @@ on_bus_gotten (GObject             *source_object,
 {
         GDBusConnection *connection;
         GError *error = NULL;
+        GDBusInterfaceInfo **infos;
+        int i;
 
         if (manager->priv->bus_cancellable == NULL ||
             g_cancellable_is_cancelled (manager->priv->bus_cancellable)) {
@@ -2224,13 +2226,16 @@ on_bus_gotten (GObject             *source_object,
         }
         manager->priv->connection = connection;
 
-        g_dbus_connection_register_object (connection,
-                                           GSD_XRANDR_DBUS_PATH,
-                                           manager->priv->introspection_data->interfaces[0],
-                                           &interface_vtable,
-                                           manager,
-                                           NULL,
-                                           NULL);
+        infos = manager->priv->introspection_data->interfaces;
+        for (i = 0; infos[i] != NULL; i++) {
+                g_dbus_connection_register_object (connection,
+                                                   GSD_XRANDR_DBUS_PATH,
+                                                   infos[i],
+                                                   &interface_vtable,
+                                                   manager,
+                                                   NULL,
+                                                   NULL);
+        }
 }
 
 static void



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