summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gconf.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gconf.c b/src/gconf.c
index a39acb0..fbdcebb 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -59,8 +59,8 @@
#define BUFSIZE 512
-#define KEYNAME char keyName[BUFSIZE]; \
- snprintf (keyName, BUFSIZE, "allscreens");
+#define KEYNAME(sn) char keyName[BUFSIZE]; \
+ snprintf (keyName, BUFSIZE, "screen%i", sn);
#define PATHNAME char pathName[BUFSIZE]; \
if (!setting->parent->name || \
@@ -474,13 +474,8 @@ valueChanged (GConfClient *client,
if (!token)
return;
- if (strcmp (token, "allscreens") == 0)
- isScreen = FALSE;
- else
- {
- isScreen = TRUE;
- sscanf (token, "screen%d", &screenNum);
- }
+ isScreen = TRUE;
+ sscanf (token, "screen%d", &screenNum);
token = strsep (&keyName, "/"); /* 'options' */
if (!token)
@@ -1136,7 +1131,7 @@ readOption (CCSSetting * setting)
Bool ret = FALSE;
Bool valid = TRUE;
- KEYNAME;
+ KEYNAME(setting->parent->context->screenNum);
PATHNAME;
/* first check if the key is set */
@@ -1678,7 +1673,7 @@ writeIntegratedOption (CCSContext *context,
static void
resetOptionToDefault (CCSSetting * setting)
{
- KEYNAME;
+ KEYNAME (setting->parent->context->screenNum);
PATHNAME;
gconf_client_recursive_unset (client, pathName, 0, NULL);
@@ -1688,7 +1683,7 @@ resetOptionToDefault (CCSSetting * setting)
static void
writeOption (CCSSetting * setting)
{
- KEYNAME;
+ KEYNAME (setting->parent->context->screenNum);
PATHNAME;
switch (setting->type)