[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libcompizconfig: Changes to 'upstream-unstable'



 Makefile.am         |    3 ++-
 VERSION             |    2 +-
 config/Makefile.am  |    6 ++++++
 config/config       |   16 ++++++++++++++++
 configure.ac        |    1 +
 metadata/global.xml |    1 +
 src/compiz.c        |   14 ++++++++++++--
 src/ini.c           |   19 +++++++++++++++++++
 src/iniparser.c     |    6 +++---
 src/main.c          |    5 ++++-
 10 files changed, 65 insertions(+), 8 deletions(-)

New commits:
commit bc9b09f3c5d1e1667e13b32afa1a12f4cef872a0
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sat Oct 20 22:00:44 2007 +0200

    * Bump VERSION to 0.6.1

diff --git a/VERSION b/VERSION
index de3b1c2..161c807 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.6.0
+VERSION=0.6.1

commit 5615cac87c48455128cc42f6144bfa3493cb1dd9
Author: Jigish Gohil <cyberorg@prime.(none)>
Date:   Wed Oct 3 13:29:52 2007 +0530

    bump version to 0.6.0

diff --git a/VERSION b/VERSION
index 2313ac4..de3b1c2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.5.2
+VERSION=0.6.0

commit 6ab37f581c1322d5a64e97baaaae063e5608e081
Author: Danny Baumann <dannybaumann@web.de>
Date:   Mon Sep 17 19:06:43 2007 +0200

    Prevent binding key combinations with invalid key names.
    XStringToKeysym fails for those, leading to the unwanted effect that the binding was grabbed as modifier-only binding.

diff --git a/src/compiz.c b/src/compiz.c
index b71e015..fcb0702 100644
--- a/src/compiz.c
+++ b/src/compiz.c
@@ -607,7 +607,14 @@ stringToKey (const char *binding, int *keysym, unsigned int *mods)
     while (*binding && !isalnum (*binding))
 	binding++;
 
-    *keysym = XStringToKeysym (binding);
+    if (*binding)
+    {
+    	*keysym = XStringToKeysym (binding);
+	if (!*keysym)
+	    *mods = 0;
+    }
+    else
+	*keysym = NoSymbol;
 }
 
 

commit 9c6ad85017253a9415f02b532a2107e19a0af1cb
Author: Dennis Kasprzyk <onestone@opencompositing.org>
Date:   Sun Sep 2 22:22:18 2007 +0200

    Allow empty lists.

diff --git a/src/ini.c b/src/ini.c
index 1ae59a3..ea25362 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -352,6 +352,19 @@ ccsIniGetAction (IniDictionary         *dictionary,
 	return FALSE;
 }
 
+static Bool
+isEmptyString (char *value)
+{
+    int i = 0;
+
+    for (i = 0; i < strlen(value); i++)
+    {
+	if (!isblank(value[i]))
+	    return FALSE;
+    }
+    return TRUE;
+}
+
 Bool
 ccsIniGetList (IniDictionary       *dictionary,
    	       const char          *section,
@@ -368,6 +381,12 @@ ccsIniGetList (IniDictionary       *dictionary,
     if (!valString)
 	return FALSE;
 
+    if (strlen(valString) == 0 || isEmptyString(valString))
+    {
+	*value = NULL;
+	return TRUE;
+    }
+
     valueString = strdup (valString);
     valueStart = valueString;
 

commit c699e529dc456d415709f3eb5007de9515cf14b0
Author: Danny Baumann <dannybaumann@web.de>
Date:   Sun Sep 2 13:52:28 2007 +0200

    Make wobbly provide the feature "edgeresistance".

diff --git a/metadata/global.xml b/metadata/global.xml
index ef81454..73a408b 100644
--- a/metadata/global.xml
+++ b/metadata/global.xml
@@ -260,6 +260,7 @@
 	<!-- wobbly metadata -->
 	<plugin name="wobbly">
 		<category>Effects</category>
+		<feature>edgeresistance</feature>
 	</plugin>
 	<!-- zoom metadata -->
 	<plugin name="zoom">

commit 52dba67492c3ae322e709c4dd11c3052f9514ac4
Author: Roland Bär <roland@Vista.(none)>
Date:   Fri Aug 31 12:29:30 2007 +0200

    Plug minor memleak.

diff --git a/src/compiz.c b/src/compiz.c
index b5c8c19..b71e015 100644
--- a/src/compiz.c
+++ b/src/compiz.c
@@ -295,7 +295,10 @@ getNodesFromPath (xmlDoc * doc, xmlNode * base, char *path, int *num)
 	char *bPath = getGenericNodePath (base);
 
 	if (!bPath)
+	{
+	    free (rv);
 	    return NULL;
+	}
 
 	asprintf (&gPath, "%s/%s", bPath, path);
 	if (gPath)

commit 1f56a23dd771dd438dd833fab65f3a662a13dc37
Author: Dennis Kasprzyk <onestone@opencompositing.org>
Date:   Thu Aug 30 01:20:24 2007 +0200

    Do not create dir/file during import.
    Save settings after import.

diff --git a/src/main.c b/src/main.c
index c275a2d..77d94fb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,6 +36,7 @@
 #include <ccs.h>
 
 #include "ccs-private.h"
+#include "iniparser.h"
 
 Bool basicMetadata = FALSE;
 
@@ -2468,7 +2469,7 @@ ccsImportFromFile (CCSContext * context, const char * fileName, Bool overwrite)
     CCSSetting *setting;
     char *keyName;
 
-    importFile = ccsIniOpen (fileName);
+    importFile = iniparser_new ((char *) fileName);
     if (!importFile)
 	return FALSE;
 
@@ -2566,6 +2567,8 @@ ccsImportFromFile (CCSContext * context, const char * fileName, Bool overwrite)
 	}
     }
 
+    ccsWriteSettings (context);
+
     ccsIniClose (importFile);
 
     return TRUE;

commit b05ff08bc9f2bc42e7e483af6ca9d2a3718b0211
Author: Danny Baumann <dannybaumann@web.de>
Date:   Fri Aug 24 15:03:28 2007 +0200

    Another attempt at properly fixing file locking.

diff --git a/src/iniparser.c b/src/iniparser.c
index 359a0fd..35b526b 100644
--- a/src/iniparser.c
+++ b/src/iniparser.c
@@ -56,7 +56,7 @@ ini_file_lock (const char *fileName, Bool exclusive)
     struct flock lockinfo;
 
     if (exclusive)
-	fd = open (fileName, O_WRONLY | O_CREAT, 0666);
+	fd = open (fileName, O_WRONLY | O_CREAT | O_TRUNC, 0666);
     else
 	fd = open (fileName, O_RDONLY | O_CREAT, 0666);
     if (fd < 0)
@@ -689,6 +689,7 @@ iniparser_dump_ini (dictionary * d, const char * file_name)
 	    fprintf (f, "%s = %s\n", d->key[i], d->val[i]);
 	}
 
+	fflush (f);
 	ini_file_unlock (lock);
 	return;
     }
@@ -716,6 +717,7 @@ iniparser_dump_ini (dictionary * d, const char * file_name)
     	fprintf (f, "\n");
     }
 
+    fflush (f);
     ini_file_unlock (lock );
 }
 

commit 3d8b161d513f5ce9b6564251f7dd27b1abe3eee7
Author: Roland Baer <roland@Vista.(none)>
Date:   Tue Aug 21 15:21:11 2007 +0300

    [PATCH] Sanitised return value(s) of getNodesFromXPath().
    
    If we return NULL, then *num should also be 0.
    Mostly not directly the return value get checked, it
    checks only num. At this rare path num is !=0 but it returns
    NULL....

diff --git a/src/compiz.c b/src/compiz.c
index 80d6c01..b5c8c19 100644
--- a/src/compiz.c
+++ b/src/compiz.c
@@ -241,7 +241,6 @@ getNodesFromXPath (xmlDoc * doc, xmlNode * base, char *path, int *num)
 	return NULL;
     }
 
-    *num = size;
     rv = malloc (size * sizeof (xmlNode *));
     if (!rv)
     {
@@ -249,6 +248,7 @@ getNodesFromXPath (xmlDoc * doc, xmlNode * base, char *path, int *num)
 	xmlXPathFreeContext (xpathCtx);
 	return NULL;
     }
+    *num = size;
 
     for (i = 0; i < size; i++)
 	rv[i] = xpathObj->nodesetval->nodeTab[i];

commit 8dfe40b5f7dda340272f65ee00645eaaa5fcf680
Author: Danny Baumann <dannybaumann@web.de>
Date:   Thu Aug 23 09:03:33 2007 +0200

    Fix ini file corruption.

diff --git a/src/iniparser.c b/src/iniparser.c
index 0d01ca5..359a0fd 100644
--- a/src/iniparser.c
+++ b/src/iniparser.c
@@ -689,7 +689,6 @@ iniparser_dump_ini (dictionary * d, const char * file_name)
 	    fprintf (f, "%s = %s\n", d->key[i], d->val[i]);
 	}
 
-	fclose (f);
 	ini_file_unlock (lock);
 	return;
     }
@@ -717,7 +716,6 @@ iniparser_dump_ini (dictionary * d, const char * file_name)
     	fprintf (f, "\n");
     }
 
-    fclose (f);
     ini_file_unlock (lock );
 }
 

commit 3bd0c4b4957904fc76bc38eae0c94980e06faa96
Author: Dennis Kasprzyk <onestone@opencompositing.org>
Date:   Tue Aug 14 18:48:52 2007 +0200

    Install default global config file.

diff --git a/Makefile.am b/Makefile.am
index 699c5ff..5e3e7d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,8 @@ ALL_SUBDIRS = 	 \
     src	         \
     backend      \
     plugin       \
-    metadata
+    metadata	 \
+    config
 
 SUBDIRS = $(ALL_SUBDIRS)
 
diff --git a/config/Makefile.am b/config/Makefile.am
new file mode 100644
index 0000000..e89f2d5
--- /dev/null
+++ b/config/Makefile.am
@@ -0,0 +1,6 @@
+globalconfigdir = $(sysconfdir)/compizconfig
+globalconfig_DATA =	       \
+	config
+
+EXTRA_DIST =	       \
+	config
\ No newline at end of file
diff --git a/config/config b/config/config
new file mode 100644
index 0000000..21842ed
--- /dev/null
+++ b/config/config
@@ -0,0 +1,16 @@
+[kde_session]
+backend = kconfig
+integration = true
+plugin_list_autosort = true
+
+[gnome_session]
+backend = gconf
+integration = true
+plugin_list_autosort = true
+
+[general]
+backend = ini
+plugin_list_autosort = true
+
+
+
diff --git a/configure.ac b/configure.ac
index 77231d8..71d11bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,7 @@ plugin/Makefile
 include/Makefile
 metadata/Makefile
 po/Makefile.in
+config/Makefile
 ])
 
 AC_OUTPUT



Reply to: