[gnome-settings-daemon/wip/xsettings-manager: 2/16] xsettings: remove global 'settings' list
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/xsettings-manager: 2/16] xsettings: remove global 'settings' list
- Date: Thu, 8 Mar 2012 14:24:48 +0000 (UTC)
commit 8323f6ba13650ecdaad1297b841cbe5097549a8b
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Mar 7 19:31:53 2012 -0500
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.
plugins/xsettings/xsettings-manager.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/plugins/xsettings/xsettings-manager.c b/plugins/xsettings/xsettings-manager.c
index c41236d..0ccf194 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]