summaryrefslogtreecommitdiff
path: root/plugins/xsettings/xsettings-manager.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-03-07 19:31:53 -0500
committerRyan Lortie <desrt@desrt.ca>2012-03-09 15:13:17 -0500
commit4d8a96debf83c469e1f869ab300a3e5cfe4d34d4 (patch)
treeecf1bf270d0783a60871f926c697fce8e387aebb /plugins/xsettings/xsettings-manager.c
parent583bf9ac921e14ca710274f7775b5bd3cc6615ef (diff)
downloadgnome-settings-daemon-4d8a96debf83c469e1f869ab300a3e5cfe4d34d4.tar.gz
xsettings: remove global 'settings' list
This looks like an abortive attempt to merge the settings list for the settings managers for all screens into one. Unfortunately, the code that actually calls into the settings managers to do updates still updated each one individually and a bunch of code in the manager itself was still referring to the per-instance variable (which was never removed). Switch back to each manager having its own copy.
Diffstat (limited to 'plugins/xsettings/xsettings-manager.c')
-rw-r--r--plugins/xsettings/xsettings-manager.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/xsettings/xsettings-manager.c b/plugins/xsettings/xsettings-manager.c
index c41236d7..0ccf194c 100644
--- a/plugins/xsettings/xsettings-manager.c
+++ b/plugins/xsettings/xsettings-manager.c
@@ -45,8 +45,6 @@ struct _XSettingsManager
unsigned long serial;
};
-static XSettingsList *settings;
-
typedef struct
{
Window window;
@@ -220,14 +218,14 @@ XSettingsResult
xsettings_manager_delete_setting (XSettingsManager *manager,
const char *name)
{
- return xsettings_list_delete (&settings, name);
+ return xsettings_list_delete (&manager->settings, name);
}
static XSettingsResult
xsettings_manager_set_setting (XSettingsManager *manager,
XSettingsSetting *setting)
{
- XSettingsSetting *old_setting = xsettings_list_lookup (settings, setting->name);
+ XSettingsSetting *old_setting = xsettings_list_lookup (manager->settings, setting->name);
XSettingsSetting *new_setting;
XSettingsResult result;
@@ -236,7 +234,7 @@ xsettings_manager_set_setting (XSettingsManager *manager,
if (xsettings_setting_equal (old_setting, setting))
return XSETTINGS_SUCCESS;
- xsettings_list_delete (&settings, setting->name);
+ xsettings_list_delete (&manager->settings, setting->name);
}
new_setting = xsettings_setting_copy (setting);
@@ -245,7 +243,7 @@ xsettings_manager_set_setting (XSettingsManager *manager,
new_setting->last_change_serial = manager->serial;
- result = xsettings_list_insert (&settings, new_setting);
+ result = xsettings_list_insert (&manager->settings, new_setting);
if (result != XSETTINGS_SUCCESS)
xsettings_setting_free (new_setting);
@@ -386,7 +384,7 @@ xsettings_manager_notify (XSettingsManager *manager)
buffer.len = 12; /* byte-order + pad + SERIAL + N_SETTINGS */
- iter = settings;
+ iter = manager->settings;
while (iter)
{
buffer.len += setting_length (iter->setting);
@@ -406,7 +404,7 @@ xsettings_manager_notify (XSettingsManager *manager)
*(CARD32 *)buffer.pos = n_settings;
buffer.pos += 4;
- iter = settings;
+ iter = manager->settings;
while (iter)
{
setting_store (iter->setting, &buffer);