summaryrefslogtreecommitdiff
path: root/gnome-settings-daemon/gnome-settings-manager.c
diff options
context:
space:
mode:
authorJens Granseuer <jensgr@gmx.net>2008-05-27 21:25:15 +0000
committerJens Granseuer <jensg@src.gnome.org>2008-05-27 21:25:15 +0000
commita7c232b4e6a223b3c532f138d9d6cf814fbd61cf (patch)
tree7d0df31d66c4fa82d01b0d4f9082558b8723709e /gnome-settings-daemon/gnome-settings-manager.c
parentf6ff9d5f2dffb340c5a35c28bdada2cc210a3789 (diff)
downloadgnome-settings-daemon-a7c232b4e6a223b3c532f138d9d6cf814fbd61cf.tar.gz
stop all plugins on shutdown
2008-05-27 Jens Granseuer <jensgr@gmx.net> * gnome-settings-daemon/gnome-settings-manager.c: (_unload_plugin), (_unload_all): stop all plugins on shutdown svn path=/trunk/; revision=352
Diffstat (limited to 'gnome-settings-daemon/gnome-settings-manager.c')
-rw-r--r--gnome-settings-daemon/gnome-settings-manager.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnome-settings-daemon/gnome-settings-manager.c b/gnome-settings-daemon/gnome-settings-manager.c
index 9dae056e..0bc3f61d 100644
--- a/gnome-settings-daemon/gnome-settings-manager.c
+++ b/gnome-settings-daemon/gnome-settings-manager.c
@@ -273,9 +273,18 @@ _load_all (GnomeSettingsManager *manager)
}
static void
+_unload_plugin (GnomeSettingsPluginInfo *info, gpointer user_data)
+{
+ if (gnome_settings_plugin_info_get_enabled (info)) {
+ gnome_settings_plugin_info_deactivate (info);
+ }
+ g_object_unref (info);
+}
+
+static void
_unload_all (GnomeSettingsManager *manager)
{
- g_slist_foreach (manager->priv->plugins, (GFunc) g_object_unref, NULL);
+ g_slist_foreach (manager->priv->plugins, (GFunc) _unload_plugin, NULL);
g_slist_free (manager->priv->plugins);
manager->priv->plugins = NULL;
}