[gnome-settings-daemon/gnome-3-10] orientation: Unown the D-Bus name on Stop



commit 620645541dc0a4ad58f1dbd65a3bf6a9549ac81d
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jul 21 16:09:13 2014 +0200

    orientation: Unown the D-Bus name on Stop
    
    Instead of when finalizing the plugin, so that stop and starting
    the plugin again works as expected.

 plugins/orientation/gsd-orientation-manager.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/orientation/gsd-orientation-manager.c b/plugins/orientation/gsd-orientation-manager.c
index e325c95..f02d192 100644
--- a/plugins/orientation/gsd-orientation-manager.c
+++ b/plugins/orientation/gsd-orientation-manager.c
@@ -458,6 +458,9 @@ gsd_orientation_manager_stop (GsdOrientationManager *manager)
 
         g_debug ("Stopping orientation manager");
 
+        if (manager->priv->name_id != 0)
+                g_bus_unown_name (manager->priv->name_id);
+
         g_clear_object (&p->settings);
         g_clear_pointer (&p->sysfs_path, g_free);
         g_clear_pointer (&p->introspection_data, g_dbus_node_info_unref);
@@ -479,9 +482,6 @@ gsd_orientation_manager_finalize (GObject *object)
         if (orientation_manager->priv->start_idle_id != 0)
                 g_source_remove (orientation_manager->priv->start_idle_id);
 
-        if (orientation_manager->priv->name_id != 0)
-                g_bus_unown_name (orientation_manager->priv->name_id);
-
         G_OBJECT_CLASS (gsd_orientation_manager_parent_class)->finalize (object);
 }
 


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