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



commit 9765a98a1063ef9bfc0a7cfee566e534384c601c
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 b58b467..104678b 100644
--- a/plugins/remote-display/gsd-remote-display-manager.c
+++ b/plugins/remote-display/gsd-remote-display-manager.c
@@ -224,8 +224,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]