summaryrefslogtreecommitdiff
path: root/src/gsettings.c
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-07-15 05:55:30 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-07-15 05:55:30 +0800
commit12e267452e11b9fb31960a8c965ec797b70aeebc (patch)
tree15c3f5a18773e4f22204cb3fcf9dfa73877c3736 /src/gsettings.c
parentfcea48cc8c78af202e7b104223220a997d0c1171 (diff)
downloadcompizconfig-backend-gsettings-12e267452e11b9fb31960a8c965ec797b70aeebc.tar.gz
compizconfig-backend-gsettings-12e267452e11b9fb31960a8c965ec797b70aeebc.tar.bz2
Replace by a #define where appropriate
Diffstat (limited to 'src/gsettings.c')
-rw-r--r--src/gsettings.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/gsettings.c b/src/gsettings.c
index 6ecf913..eeacf8c 100644
--- a/src/gsettings.c
+++ b/src/gsettings.c
@@ -199,7 +199,7 @@ static GSettings *
getSettingsObjectForCCSSetting (CCSSetting *setting)
{
KEYNAME(setting->parent->context->screenNum);
- PATHNAME;
+ PATHNAME (setting->parent->name, keyName);
return getSettingsObjectForPluginWithPath (setting->parent->name, pathName, setting->parent->context);
}
@@ -480,7 +480,7 @@ readOption (CCSSetting * setting)
char *cleanSettingName = translateKeyForGSettings (setting->name);
KEYNAME(setting->parent->context->screenNum);
- PATHNAME;
+ PATHNAME (setting->parent->name, keyName);
/* first check if the key is set */
gsettingsValue = g_settings_get_value (settings, cleanSettingName);
@@ -786,7 +786,7 @@ resetOptionToDefault (CCSSetting * setting)
char *cleanSettingName = translateKeyForGSettings (setting->name);
KEYNAME (setting->parent->context->screenNum);
- PATHNAME;
+ PATHNAME (setting->parent->name, keyName);
g_settings_reset (settings, cleanSettingName);
@@ -800,7 +800,7 @@ writeOption (CCSSetting * setting)
GSettings *settings = getSettingsObjectForCCSSetting (setting);
char *cleanSettingName = translateKeyForGSettings (setting->name);
KEYNAME (setting->parent->context->screenNum);
- PATHNAME;
+ PATHNAME (setting->parent->name, keyName);
switch (setting->type)
{
@@ -1185,19 +1185,9 @@ deleteProfile (CCSContext *context,
while (g_variant_iter_loop (iter, "s", &plugin))
{
GSettings *settings;
- char pathName[BUFSIZE];
-
-
- /* FIXME: We should not be hardcoding to screen0 in this case */
- if (!plugin ||
- strcmp (plugin, "core") == 0) \
- snprintf (pathName, BUFSIZE,
- "%s/%s/plugins/%s/%s/options/", COMPIZ, profile, plugin,
- "screen0");
- else
- snprintf (pathName, BUFSIZE,
- "%s/%s/plugins/%s/%s/options/", COMPIZ, profile, plugin,
- "screen0");
+
+ KEYNAME (context->screenNum);
+ PATHNAME (plugin, keyName);
settings = getSettingsObjectForPluginWithPath (plugin, pathName, context);