[gnome-settings-daemon] daemon: Set priority for plugins based on settings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] daemon: Set priority for plugins based on settings
- Date: Wed, 13 Oct 2010 12:54:36 +0000 (UTC)
commit bdea3304383eb5d2b0a7160ae186f9ea2b69befe
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 13 13:53:40 2010 +0100
daemon: Set priority for plugins based on settings
gnome-settings-daemon/gnome-settings-manager.c | 2 +-
gnome-settings-daemon/gnome-settings-plugin-info.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gnome-settings-daemon/gnome-settings-manager.c b/gnome-settings-daemon/gnome-settings-manager.c
index 0288e09..1aa7efc 100644
--- a/gnome-settings-daemon/gnome-settings-manager.c
+++ b/gnome-settings-daemon/gnome-settings-manager.c
@@ -152,7 +152,6 @@ _load_file (GnomeSettingsManager *manager,
{
GnomeSettingsPluginInfo *info;
char *key_name;
- int priority;
GSList *l;
g_debug ("Loading plugin: %s", filename);
@@ -182,6 +181,7 @@ _load_file (GnomeSettingsManager *manager,
DEFAULT_SETTINGS_PREFIX,
gnome_settings_plugin_info_get_location (info));
gnome_settings_plugin_info_set_settings_prefix (info, key_name);
+ /* Priority is set in the call above */
g_free (key_name);
out:
diff --git a/gnome-settings-daemon/gnome-settings-plugin-info.c b/gnome-settings-daemon/gnome-settings-plugin-info.c
index 6d397aa..615d232 100644
--- a/gnome-settings-daemon/gnome-settings-plugin-info.c
+++ b/gnome-settings-daemon/gnome-settings-plugin-info.c
@@ -319,8 +319,15 @@ void
gnome_settings_plugin_info_set_settings_prefix (GnomeSettingsPluginInfo *info,
const char *settings_prefix)
{
+ int priority;
+
info->priv->settings = g_settings_new (settings_prefix);
info->priv->enabled = g_settings_get_boolean (info->priv->settings, "active");
+
+ priority = g_settings_get_int (info->priv->settings, "priority");
+ if (priority > 0)
+ info->priv->priority = g_settings_get_int (info->priv->settings, "priority");
+
g_signal_connect (G_OBJECT (info->priv->settings), "changed",
G_CALLBACK (plugin_enabled_cb), info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]