[gnome-settings-daemon/gnome-3-10] remote-display: Stop plugin when exiting



commit 2560fbfb02be0c4748285dcf9d5375dbe527ab85
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Sep 25 12:12:47 2014 +0200

    remote-display: Stop plugin when exiting
    
    Make sure that the plugin is stopped when it's disposed of.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1145144

 .../remote-display/gsd-remote-display-manager.c    |   21 ++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/plugins/remote-display/gsd-remote-display-manager.c 
b/plugins/remote-display/gsd-remote-display-manager.c
index ab49ee5..616fb1a 100644
--- a/plugins/remote-display/gsd-remote-display-manager.c
+++ b/plugins/remote-display/gsd-remote-display-manager.c
@@ -263,8 +263,29 @@ gsd_remote_display_manager_stop (GsdRemoteDisplayManager *manager)
 }
 
 static void
+gsd_remote_display_manager_finalize (GObject *object)
+{
+        GsdRemoteDisplayManager *manager;
+
+        g_return_if_fail (object != NULL);
+        g_return_if_fail (GSD_IS_REMOTE_DISPLAY_MANAGER (object));
+
+        manager = GSD_REMOTE_DISPLAY_MANAGER (object);
+
+        g_return_if_fail (manager->priv != NULL);
+
+        gsd_remote_display_manager_stop (manager);
+
+        G_OBJECT_CLASS (gsd_remote_display_manager_parent_class)->finalize (object);
+}
+
+static void
 gsd_remote_display_manager_class_init (GsdRemoteDisplayManagerClass *klass)
 {
+        GObjectClass   *object_class = G_OBJECT_CLASS (klass);
+
+        object_class->finalize = gsd_remote_display_manager_finalize;
+
         g_type_class_add_private (klass, sizeof (GsdRemoteDisplayManagerPrivate));
 }
 


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