summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-01-14 09:05:22 +0100
committerDanny Baumann <dannybaumann@web.de>2009-01-14 09:05:22 +0100
commitf22deacbc9e5239ff2d587cf0a8286f895ffb4e2 (patch)
tree5d8fba89e9be070b8115a7e37d81d719563f6c96
parentf62a2895ea311bf34ac65ec362738106856f06fb (diff)
downloadcompizconfig-backend-gsettings-f22deacbc9e5239ff2d587cf0a8286f895ffb4e2.tar.gz
compizconfig-backend-gsettings-f22deacbc9e5239ff2d587cf0a8286f895ffb4e2.tar.bz2
Improve readability.
-rw-r--r--settings-backend/gconf.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/settings-backend/gconf.c b/settings-backend/gconf.c
index 85651e1..9b72c91 100644
--- a/settings-backend/gconf.c
+++ b/settings-backend/gconf.c
@@ -406,19 +406,35 @@ isIntegratedOption (CCSSetting *setting,
for (i = 0; i < N_SOPTIONS; i++)
{
- if ((strcmp (setting->name, specialOptions[i].settingName) == 0) &&
- ((!setting->parent->name && !specialOptions[i].pluginName) ||
- (setting->parent->name && specialOptions[i].pluginName &&
- (strcmp (setting->parent->name,
- specialOptions[i].pluginName) == 0))) &&
- ((setting->isScreen && specialOptions[i].screen) ||
- (!setting->isScreen && !specialOptions[i].screen)))
+ SpecialOption *opt = &specialOptions[i];
+
+ if (strcmp (setting->name, opt->settingName) != 0)
+ continue;
+
+ if (setting->parent->name)
{
- if (index)
- *index = i;
- return TRUE;
+ if (!opt->pluginName)
+ continue;
+ if (strcmp (setting->parent->name, opt->pluginName) != 0)
+ continue;
}
+ else
+ {
+ if (opt->pluginName)
+ continue;
+ }
+
+ if (setting->isScreen && !opt->screen)
+ continue;
+ if (!setting->isScreen && opt->screen)
+ continue;
+
+ if (index)
+ *index = i;
+
+ return TRUE;
}
+
return FALSE;
}