compizconfig-backend-gconf: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor:
commit 861a1d44b2041d760226ffc2e7d8f62f4afd4d0d
Author: Sam Spilsbury <smspillaz@XPS-UNITY.(none)>
Date: Mon Dec 13 05:09:28 2010 +0800
Fix branch confusion
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67f4ffa..0ab43d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,157 +4,7 @@ find_package (CompizConfig REQUIRED)
include (LibCompizConfigCommon)
-# Generate GConf Schemas for existing installed plugins
-
-set (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS 1 CACHE BOOL "Generate GConf schemas for existing plugins")
-
-if (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS)
- pkg_check_modules (GCONF gconf-2.0)
-
- find_program (GCONFTOOL_EXECUTABLE gconftool-2)
- mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
- set (COMPIZ_GCONF_SCHEMAS_XSLT "${CMAKE_SOURCE_DIR}/xslt/compiz_gconf_schemas.xslt")
-
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (SCHEMADIR "${CMAKE_INSTALL_PREFIX}/share/gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
-
- if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
- set (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS 0)
- else ()
- option (
- COMPIZ_DISABLE_SCHEMAS_INSTALL
- "Disables gconf schema installation with gconftool"
- OFF
- )
-
- set (
- COMPIZ_INSTALL_GCONF_SCHEMA_DIR ${COMPIZ_INSTALL_GCONF_SCHEMA_DIR} CACHE PATH
- "Installation path of the gconf schema file"
- )
-
- function (compiz_install_gconf_schema _src _dst _name)
- find_program (GCONFTOOL_EXECUTABLE gconftool-2)
- mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
-
- if (GCONFTOOL_EXECUTABLE AND NOT COMPIZ_DISABLE_SCHEMAS_INSTALL)
- install (CODE "
- if (\"\$ENV{USER}\" STREQUAL \"root\")
- exec_program (${GCONFTOOL_EXECUTABLE}
- ARGS \"--get-default-source\"
- OUTPUT_VARIABLE ENV{GCONF_CONFIG_SOURCE})
- exec_program (${GCONFTOOL_EXECUTABLE}
- ARGS \"--makefile-install-rule ${_src} > /dev/null\")
- else (\"\$ENV{USER}\" STREQUAL \"root\")
- exec_program (${GCONFTOOL_EXECUTABLE}
- ARGS \"--install-schema-file=${_src} > /dev/null\")
- endif (\"\$ENV{USER}\" STREQUAL \"root\")
- ")
- endif ()
- install (
- FILES "${_src}"
- DESTINATION "${COMPIZ_DESTDIR}${_dst}"
- RENAME "${_name}"
- )
- endfunction ()
-
- # generate gconf schema
- function (compiz_gconf_schema _src _dst _inst _name)
- find_program (XSLTPROC_EXECUTABLE xsltproc)
- mark_as_advanced (FORCE XSLTPROC_EXECUTABLE)
-
- if (XSLTPROC_EXECUTABLE)
- add_custom_command (
- OUTPUT ${_dst}
- COMMAND ${XSLTPROC_EXECUTABLE}
- -o ${_dst}
- ${COMPIZ_GCONF_SCHEMAS_XSLT}
- ${_src}
- DEPENDS ${_src}
- )
- compiz_install_gconf_schema (${_dst} ${_inst} ${_name})
- endif ()
- endfunction ()
-
- # generate schemas for existing plugins in compiz prefix
-
- file (GLOB _compiz_schema_files "${COMPIZ_PREFIX}/share/compiz/*.xml")
- foreach (_file ${_compiz_schema_files})
- string (LENGTH "${COMPIZ_PREFIX}/share/compiz/" _dir_len)
- string (LENGTH ${_file} _path_len)
-
- math (EXPR _file_len "${_path_len} - ${_dir_len}")
- math (EXPR _plugin_name_len "${_file_len} - 4")
-
- string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
- string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_PREFIX}/share/gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/compiz-${_plugin_name}.schemas"
- ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
- list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/compiz-${_plugin_name}.schemas")
- endforeach ()
-
- # generate schemas for existing plugins in package prefix
-
- file (GLOB _compiz_schema_files "${datadir}/compiz/*.xml")
- foreach (_file ${_compiz_schema_files})
- string (LENGTH "${datadir}/compiz/" _dir_len)
- string (LENGTH ${_file} _path_len)
-
- math (EXPR _file_len "${_path_len} - ${_dir_len}")
- math (EXPR _plugin_name_len "${_file_len} - 4")
-
- string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
- string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
-
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${datadir}/gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
-
- compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/package-${_plugin_name}.schemas"
- ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
- list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/package-${_plugin_name}.schemas")
- endforeach ()
-
- # generate schemas for existing plugins in local prefix
-
- file (GLOB _compiz_schema_files "$ENV{HOME}/.compiz-1/metadata/*.xml")
- foreach (_file ${_compiz_schema_files})
- string (LENGTH "$ENV{HOME}/.compiz-1/metadata/" _dir_len)
- string (LENGTH ${_file} _path_len)
-
- math (EXPR _file_len "${_path_len} - ${_dir_len}")
- math (EXPR _plugin_name_len "${_file_len} - 4")
-
- string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
- string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
-
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "$ENV{HOME}/.gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
-
- compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/local-${_plugin_name}.schemas"
- ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
- list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/local-${_plugin_name}.schemas")
- endforeach ()
-
- endif ()
-endif ()
-
-compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0 FILESADD ${_gconf_files_add})
-
-add_subdirectory (xslt)
-add_subdirectory (cmake)
+compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0)
# compizconfig-gconf package version number
# An odd micro number indicates in-progress development.
@@ -166,9 +16,6 @@ set (COMPIZCONFIG_GCONF_VERSION_MACRO 1)
set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO}.${COMPIZCONFIG_GCONF_VERSION_MACRO})
compiz_print_configure_header ("CompizConfig GConf Storage Backend")
-compiz_color_message ("\n${_escape}[4mOptional features:${_escape}[0m\n")
-
-compiz_print_result_message ("generate schemas for existing plugins" GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS)
compiz_print_configure_footer ()
compiz_add_uninstall ()
commit 9e2664b3c1544f23d7db21c99bd11287fca20b35
Author: Sam Spilsbury <sam.spilsbury@canonical.com>
Date: Fri Dec 10 21:52:17 2010 +0800
Add multiscreen support
diff --git a/src/gconf.c b/src/gconf.c
index 4cb7aaa..06d1e9f 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -57,11 +57,6 @@
#define DEFAULTPROF "Default"
#define CORE_NAME "core"
-/* HACK: Really we should support multiple screens, but this would
- * require some work elsewhere so lets leave it at zero for now */
-
-#define DEFAULT_SCREEN_NUM 0
-
#define BUFSIZE 512
#define KEYNAME(sn) char keyName[BUFSIZE]; \
@@ -1136,7 +1131,7 @@ readOption (CCSSetting * setting)
Bool ret = FALSE;
Bool valid = TRUE;
- KEYNAME(DEFAULT_SCREEN_NUM);
+ 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 (DEFAULT_SCREEN_NUM);
+ 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 (DEFAULT_SCREEN_NUM);
+ KEYNAME (setting->parent->context->screenNum);
PATHNAME;
switch (setting->type)
commit b40d06f3023a031a1a32ecc0d3d5644a91b83f36
Author: Sam Spilsbury <sam.spilsbury@canonical.com>
Date: Fri Dec 10 21:41:31 2010 +0800
Fix setting /allscreens, we should set /screen%i (defaults to screen 0)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ab43d0..67f4ffa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,157 @@ find_package (CompizConfig REQUIRED)
include (LibCompizConfigCommon)
-compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0)
+# Generate GConf Schemas for existing installed plugins
+
+set (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS 1 CACHE BOOL "Generate GConf schemas for existing plugins")
+
+if (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS)
+ pkg_check_modules (GCONF gconf-2.0)
+
+ find_program (GCONFTOOL_EXECUTABLE gconftool-2)
+ mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
+ set (COMPIZ_GCONF_SCHEMAS_XSLT "${CMAKE_SOURCE_DIR}/xslt/compiz_gconf_schemas.xslt")
+
+ if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (SCHEMADIR "${CMAKE_INSTALL_PREFIX}/share/gconf/schemas")
+ else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
+ endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+
+ if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
+ set (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS 0)
+ else ()
+ option (
+ COMPIZ_DISABLE_SCHEMAS_INSTALL
+ "Disables gconf schema installation with gconftool"
+ OFF
+ )
+
+ set (
+ COMPIZ_INSTALL_GCONF_SCHEMA_DIR ${COMPIZ_INSTALL_GCONF_SCHEMA_DIR} CACHE PATH
+ "Installation path of the gconf schema file"
+ )
+
+ function (compiz_install_gconf_schema _src _dst _name)
+ find_program (GCONFTOOL_EXECUTABLE gconftool-2)
+ mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
+
+ if (GCONFTOOL_EXECUTABLE AND NOT COMPIZ_DISABLE_SCHEMAS_INSTALL)
+ install (CODE "
+ if (\"\$ENV{USER}\" STREQUAL \"root\")
+ exec_program (${GCONFTOOL_EXECUTABLE}
+ ARGS \"--get-default-source\"
+ OUTPUT_VARIABLE ENV{GCONF_CONFIG_SOURCE})
+ exec_program (${GCONFTOOL_EXECUTABLE}
+ ARGS \"--makefile-install-rule ${_src} > /dev/null\")
+ else (\"\$ENV{USER}\" STREQUAL \"root\")
+ exec_program (${GCONFTOOL_EXECUTABLE}
+ ARGS \"--install-schema-file=${_src} > /dev/null\")
+ endif (\"\$ENV{USER}\" STREQUAL \"root\")
+ ")
+ endif ()
+ install (
+ FILES "${_src}"
+ DESTINATION "${COMPIZ_DESTDIR}${_dst}"
+ RENAME "${_name}"
+ )
+ endfunction ()
+
+ # generate gconf schema
+ function (compiz_gconf_schema _src _dst _inst _name)
+ find_program (XSLTPROC_EXECUTABLE xsltproc)
+ mark_as_advanced (FORCE XSLTPROC_EXECUTABLE)
+
+ if (XSLTPROC_EXECUTABLE)
+ add_custom_command (
+ OUTPUT ${_dst}
+ COMMAND ${XSLTPROC_EXECUTABLE}
+ -o ${_dst}
+ ${COMPIZ_GCONF_SCHEMAS_XSLT}
+ ${_src}
+ DEPENDS ${_src}
+ )
+ compiz_install_gconf_schema (${_dst} ${_inst} ${_name})
+ endif ()
+ endfunction ()
+
+ # generate schemas for existing plugins in compiz prefix
+
+ file (GLOB _compiz_schema_files "${COMPIZ_PREFIX}/share/compiz/*.xml")
+ foreach (_file ${_compiz_schema_files})
+ string (LENGTH "${COMPIZ_PREFIX}/share/compiz/" _dir_len)
+ string (LENGTH ${_file} _path_len)
+
+ math (EXPR _file_len "${_path_len} - ${_dir_len}")
+ math (EXPR _plugin_name_len "${_file_len} - 4")
+
+ string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
+ string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
+ if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (PLUGIN_SCHEMADIR "${COMPIZ_PREFIX}/share/gconf/schemas")
+ else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
+ endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/compiz-${_plugin_name}.schemas"
+ ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
+ list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/compiz-${_plugin_name}.schemas")
+ endforeach ()
+
+ # generate schemas for existing plugins in package prefix
+
+ file (GLOB _compiz_schema_files "${datadir}/compiz/*.xml")
+ foreach (_file ${_compiz_schema_files})
+ string (LENGTH "${datadir}/compiz/" _dir_len)
+ string (LENGTH ${_file} _path_len)
+
+ math (EXPR _file_len "${_path_len} - ${_dir_len}")
+ math (EXPR _plugin_name_len "${_file_len} - 4")
+
+ string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
+ string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
+
+ if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (PLUGIN_SCHEMADIR "${datadir}/gconf/schemas")
+ else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
+ endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+
+ compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/package-${_plugin_name}.schemas"
+ ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
+ list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/package-${_plugin_name}.schemas")
+ endforeach ()
+
+ # generate schemas for existing plugins in local prefix
+
+ file (GLOB _compiz_schema_files "$ENV{HOME}/.compiz-1/metadata/*.xml")
+ foreach (_file ${_compiz_schema_files})
+ string (LENGTH "$ENV{HOME}/.compiz-1/metadata/" _dir_len)
+ string (LENGTH ${_file} _path_len)
+
+ math (EXPR _file_len "${_path_len} - ${_dir_len}")
+ math (EXPR _plugin_name_len "${_file_len} - 4")
+
+ string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
+ string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
+
+ if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (PLUGIN_SCHEMADIR "$ENV{HOME}/.gconf/schemas")
+ else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+ set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
+ endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
+
+ compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/local-${_plugin_name}.schemas"
+ ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
+ list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/local-${_plugin_name}.schemas")
+ endforeach ()
+
+ endif ()
+endif ()
+
+compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0 FILESADD ${_gconf_files_add})
+
+add_subdirectory (xslt)
+add_subdirectory (cmake)
# compizconfig-gconf package version number
# An odd micro number indicates in-progress development.
@@ -16,6 +166,9 @@ set (COMPIZCONFIG_GCONF_VERSION_MACRO 1)
set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO}.${COMPIZCONFIG_GCONF_VERSION_MACRO})
compiz_print_configure_header ("CompizConfig GConf Storage Backend")
+compiz_color_message ("\n${_escape}[4mOptional features:${_escape}[0m\n")
+
+compiz_print_result_message ("generate schemas for existing plugins" GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS)
compiz_print_configure_footer ()
compiz_add_uninstall ()
diff --git a/src/gconf.c b/src/gconf.c
index 400ce18..4cb7aaa 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -57,10 +57,15 @@
#define DEFAULTPROF "Default"
#define CORE_NAME "core"
+/* HACK: Really we should support multiple screens, but this would
+ * require some work elsewhere so lets leave it at zero for now */
+
+#define DEFAULT_SCREEN_NUM 0
+
#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 +479,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 +1136,7 @@ readOption (CCSSetting * setting)
Bool ret = FALSE;
Bool valid = TRUE;
- KEYNAME;
+ KEYNAME(DEFAULT_SCREEN_NUM);
PATHNAME;
/* first check if the key is set */
@@ -1678,7 +1678,7 @@ writeIntegratedOption (CCSContext *context,
static void
resetOptionToDefault (CCSSetting * setting)
{
- KEYNAME;
+ KEYNAME (DEFAULT_SCREEN_NUM);
PATHNAME;
gconf_client_recursive_unset (client, pathName, 0, NULL);
@@ -1688,7 +1688,7 @@ resetOptionToDefault (CCSSetting * setting)
static void
writeOption (CCSSetting * setting)
{
- KEYNAME;
+ KEYNAME (DEFAULT_SCREEN_NUM);
PATHNAME;
switch (setting->type)
commit 55a267f14038b2507abb743de432ccbfd729a4bb
Author: Didier Roche <didrocks@ubuntu.com>
Date: Fri Nov 26 14:33:13 2010 +0100
fix schema owner and typo
diff --git a/src/gconf.c b/src/gconf.c
index 400ce18..a39acb0 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -1829,7 +1829,7 @@ updateCurrentProfileName (char *profile)
gconf_schema_set_locale (schema, "C");
gconf_schema_set_short_desc (schema, "Current profile");
gconf_schema_set_long_desc (schema, "Current profile of gconf backend");
- gconf_schema_set_owner (schema, "compizconfig");
+ gconf_schema_set_owner (schema, "compizconfig-1");
gconf_value_set_string (value, profile);
gconf_schema_set_default_value (schema, value);
@@ -1902,7 +1902,7 @@ checkProfile (CCSContext *context)
{
copyGconfTree (context, pathName, COMPIZ, FALSE, NULL);
- /* delete the new profile tree in /apps/compiz-1config
+ /* delete the new profile tree in /apps/compizconfig-1
to avoid user modification in the wrong tree */
copyGconfTree (context, pathName, NULL, TRUE, NULL);
free (pathName);
commit 26440eb73a49b339e27398d9c8f151a53f490106
Author: Sam Spilsbury <sam.spilsbury@canonical.com>
Date: Tue Nov 23 02:51:59 2010 +0800
Change paths so that old and new settings don't conflict
diff --git a/src/gconf.c b/src/gconf.c
index 00e0ce2..400ce18 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -51,8 +51,8 @@
#define CompScrollLockMask (1 << 22)
#define METACITY "/apps/metacity"
-#define COMPIZ "/apps/compiz"
-#define COMPIZCONFIG "/apps/compizconfig"
+#define COMPIZ "/apps/compiz-1"
+#define COMPIZCONFIG "/apps/compizconfig-1"
#define PROFILEPATH COMPIZCONFIG "/profiles"
#define DEFAULTPROF "Default"
#define CORE_NAME "core"
@@ -1883,7 +1883,7 @@ checkProfile (CCSContext *context)
if (lastProfile)
{
- /* copy /apps/compiz tree to profile path */
+ /* copy /apps/compiz-1 tree to profile path */
asprintf (&pathName, "%s/%s", PROFILEPATH, lastProfile);
if (pathName)
{
@@ -1893,16 +1893,16 @@ checkProfile (CCSContext *context)
}
}
- /* reset /apps/compiz tree */
+ /* reset /apps/compiz-1 tree */
gconf_client_recursive_unset (client, COMPIZ, 0, NULL);
- /* copy new profile tree to /apps/compiz */
+ /* copy new profile tree to /apps/compiz-1 */
asprintf (&pathName, "%s/%s", PROFILEPATH, currentProfile);
if (pathName)
{
copyGconfTree (context, pathName, COMPIZ, FALSE, NULL);
- /* delete the new profile tree in /apps/compizconfig
+ /* delete the new profile tree in /apps/compiz-1config
to avoid user modification in the wrong tree */
copyGconfTree (context, pathName, NULL, TRUE, NULL);
free (pathName);
commit dd1abd3bc425c2f65cce23a868043ca10ae177a2
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sat Nov 6 20:48:51 2010 +0800
Update NEWS for 0.9.2.1 Release
diff --git a/NEWS b/NEWS
index 9c4521d..2b4b2ee 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,3 @@
-Release 0.9.2 (2010-11-06 Sam Spilsbury <sam.spilsbury@canonical.com>)
-=====================================================================
-Bugfix release.
-
Release 0.9.0 (2010-07-03 Sam Spilsbury <smspillaz@gmail.com>)
==============================================================
Development release.
@@ -13,3 +9,7 @@ Added CMake Buildsystem.
Release 0.9.2 (2010-10-24 Sam Spilsbury <smspillaz@gmail.com>)
==============================================================
Development release.
+
+Release 0.9.2.1 (2010-11-06 Sam Spilsbury <sam.spilsbury@canonical.com>)
+========================================================================
+Bugfix release.
commit b1575e20e5eeb5050981ab11d504074fe95cbdfc
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sat Nov 6 20:47:05 2010 +0800
Update NEWS for 0.9.2.1 Release
diff --git a/NEWS b/NEWS
index 4db2b58..9c4521d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Release 0.9.2 (2010-11-06 Sam Spilsbury <sam.spilsbury@canonical.com>)
+=====================================================================
+Bugfix release.
+
Release 0.9.0 (2010-07-03 Sam Spilsbury <smspillaz@gmail.com>)
==============================================================
Development release.
commit ec2ae9d05e464323eb1abb5493a7d8e372b0a23e
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sat Nov 6 20:42:08 2010 +0800
Set COMPIZCONFIG_GCONF_VERSION_MACRO and update to 0.9.2.1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a2ba33..0ab43d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,8 +11,9 @@ compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0)
# An even micro number indicates a released version.
set (COMPIZCONFIG_GCONF_VERSION_MAJOR 0)
set (COMPIZCONFIG_GCONF_VERSION_MINOR 9)
-set (COMPIZCONFIG_GCONF_VERSION_MICRO 0)
-set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO})
+set (COMPIZCONFIG_GCONF_VERSION_MICRO 2)
+set (COMPIZCONFIG_GCONF_VERSION_MACRO 1)
+set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO}.${COMPIZCONFIG_GCONF_VERSION_MACRO})
compiz_print_configure_header ("CompizConfig GConf Storage Backend")
compiz_print_configure_footer ()
commit b970dd24c945b79afab19bfe9a9ee9ee9b7387e0
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sat Nov 6 20:41:23 2010 +0800
Update to 0.9.2.1
diff --git a/VERSION b/VERSION
index f626ec2..5d08606 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.9.0
+VERSION=0.9.2.1
commit c6aad98e3d72006b80fadcffc502823e4342194d
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sun Oct 24 22:51:36 2010 +0800
Fix date on NEWS
diff --git a/NEWS b/NEWS
index 13f5420..4db2b58 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,6 @@ Removed multiscreen support to reflect core API changes.
Added CMake Buildsystem.
-Release 0.9.2 (2010-07-03 Sam Spilsbury <smspillaz@gmail.com>)
+Release 0.9.2 (2010-10-24 Sam Spilsbury <smspillaz@gmail.com>)
==============================================================
Development release.
commit d74ec0d2ea8ee74b6ccf44b97adb05147da5a374
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sun Oct 24 22:48:56 2010 +0800
Update NEWS for 0.9.2 release
diff --git a/NEWS b/NEWS
index 7bc795d..13f5420 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ Release 0.9.0 (2010-07-03 Sam Spilsbury <smspillaz@gmail.com>)
==============================================================
Development release.
-CMake Buildsystem.
+Removed multiscreen support to reflect core API changes.
-Adjust for libcompizconfig API changes.
\ No newline at end of file
+Added CMake Buildsystem.
+
+Release 0.9.2 (2010-07-03 Sam Spilsbury <smspillaz@gmail.com>)
+==============================================================
+Development release.
commit fba24675ef05ea876bb5abd7c29bab10093ef282
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sun Jul 4 09:09:28 2010 +0800
Update NEWS for 0.9.0 release
diff --git a/NEWS b/NEWS
index e69de29..7bc795d 100644
--- a/NEWS
+++ b/NEWS
@@ -0,0 +1,7 @@
+Release 0.9.0 (2010-07-03 Sam Spilsbury <smspillaz@gmail.com>)
+==============================================================
+Development release.
+
+CMake Buildsystem.
+
+Adjust for libcompizconfig API changes.
\ No newline at end of file
commit db40d8410e1c40953109f4d41a22c447d3dc7dbf
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sun Jul 4 07:34:16 2010 +0800
Bump version
diff --git a/VERSION b/VERSION
index bc600a0..f626ec2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.8.5
+VERSION=0.9.0
commit f05968778dac914583fe23c21bba58bf061eef9e
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Sun Jul 4 07:22:38 2010 +0800
Set project definition in cmake file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a598d4e..6a2ba33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
+project (compizconfig-backend-gconf)
+
find_package (CompizConfig REQUIRED)
include (LibCompizConfigCommon)
commit 0007d69e63d7982d888d9e9d5d0d8c8e6d8cba8f
Author: Sam Spilsbury <SmSpillaz@gmail.com>
Date: Sun Jun 6 10:11:34 2010 +0800
Typo
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 863ebaf..a598d4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,5 +16,5 @@ compiz_print_configure_header ("CompizConfig GConf Storage Backend")
compiz_print_configure_footer ()
compiz_add_uninstall ()
-compiz_add_package_generation ("CompizConfig GConf Storage Backend")
+compiz_package_generation ("CompizConfig GConf Storage Backend")
compiz_add_git_dist ()
commit f9d58342b1df25cc239a25a09b93b7de5eb18bc7
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Fri May 14 12:20:05 2010 +0000
Add package generation
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fdb0f6..863ebaf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,5 +12,9 @@ set (COMPIZCONFIG_GCONF_VERSION_MINOR 9)
set (COMPIZCONFIG_GCONF_VERSION_MICRO 0)
set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO})
-compiz_print_configure_header ("CompizConfig Backend GConf")
+compiz_print_configure_header ("CompizConfig GConf Storage Backend")
compiz_print_configure_footer ()
+
+compiz_add_uninstall ()
+compiz_add_package_generation ("CompizConfig GConf Storage Backend")
+compiz_add_git_dist ()
commit 129c6311cdd41e4751ca7cee659131c9502922fc
Author: Sam Spilsbury <smspillaz@gmail.com>
Date: Fri May 14 12:10:21 2010 +0000
Update for libcompizconfig buildsystem changes
and add dist and uninstall targets
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 792ef12..0fdb0f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,4 +2,15 @@ find_package (CompizConfig REQUIRED)
include (LibCompizConfigCommon)
-compizconfig_backend (gconf glib-2.0 gconf-2.0)
+compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0)
+
+# compizconfig-gconf package version number
+# An odd micro number indicates in-progress development.
+# An even micro number indicates a released version.
+set (COMPIZCONFIG_GCONF_VERSION_MAJOR 0)
+set (COMPIZCONFIG_GCONF_VERSION_MINOR 9)
+set (COMPIZCONFIG_GCONF_VERSION_MICRO 0)
+set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO})
+
+compiz_print_configure_header ("CompizConfig Backend GConf")
+compiz_print_configure_footer ()
diff --git a/gconf.c b/gconf.c
deleted file mode 100644
index 00e0ce2..0000000
--- a/gconf.c
+++ /dev/null
@@ -1,2113 +0,0 @@
-/**
- *
- * GConf libccs backend
- *
- * gconf.c
- *
- * Copyright (c) 2007 Danny Baumann <maniac@opencompositing.org>
- *
- * Parts of this code are taken from libberylsettings
- * gconf backend, written by:
- *
- * Copyright (c) 2006 Robert Carr <racarr@opencompositing.org>
- * Copyright (c) 2007 Dennis Kasprzyk <onestone@opencompositing.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- **/
-
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <string.h>
-#include <dirent.h>
-
-#include <ccs.h>
-#include <ccs-backend.h>
-
-#include <X11/X.h>
-#include <X11/Xlib.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-#include <gconf/gconf-value.h>
-
-#define CompAltMask (1 << 16)
-#define CompMetaMask (1 << 17)
-#define CompSuperMask (1 << 18)
-#define CompHyperMask (1 << 19)
-#define CompModeSwitchMask (1 << 20)
-#define CompNumLockMask (1 << 21)
-#define CompScrollLockMask (1 << 22)
-
-#define METACITY "/apps/metacity"
-#define COMPIZ "/apps/compiz"
-#define COMPIZCONFIG "/apps/compizconfig"
-#define PROFILEPATH COMPIZCONFIG "/profiles"
-#define DEFAULTPROF "Default"
-#define CORE_NAME "core"
-
-#define BUFSIZE 512
-
-#define KEYNAME char keyName[BUFSIZE]; \
- snprintf (keyName, BUFSIZE, "allscreens");
-
-#define PATHNAME char pathName[BUFSIZE]; \
- if (!setting->parent->name || \
- strcmp (setting->parent->name, "core") == 0) \
- snprintf (pathName, BUFSIZE, \
- "%s/general/%s/options/%s", COMPIZ, \
- keyName, setting->name); \
- else \
- snprintf(pathName, BUFSIZE, \
- "%s/plugins/%s/%s/options/%s", COMPIZ, \
- setting->parent->name, keyName, setting->name);
-
-static const char* watchedGnomeDirectories[] = {
- METACITY,
- "/desktop/gnome/applications/terminal",
- "/apps/panel/applets/window_list/prefs"
-};
-#define NUM_WATCHED_DIRS 3
-
-static GConfClient *client = NULL;
-static GConfEngine *conf = NULL;
-static guint compizNotifyId;
-static guint gnomeNotifyIds[NUM_WATCHED_DIRS];
-static char *currentProfile = NULL;
-
-/* some forward declarations */
-static Bool readInit (CCSContext * context);
-static void readSetting (CCSContext * context, CCSSetting * setting);
-static Bool readOption (CCSSetting * setting);
-static Bool writeInit (CCSContext * context);
-static void writeIntegratedOption (CCSContext *context, CCSSetting *setting,
- int index);
-
-typedef enum {
- OptionInt,
- OptionBool,
- OptionKey,
- OptionString,
- OptionSpecial,
-} SpecialOptionType;
-
-typedef struct _SpecialOption {
- const char* settingName;
- const char* pluginName;
- Bool screen;
- const char* gnomeName;
- SpecialOptionType type;
-} SpecialOption;
-
-const SpecialOption specialOptions[] = {
- {"run_key", "gnomecompat", FALSE,
- METACITY "/global_keybindings/panel_run_dialog", OptionKey},
- {"main_menu_key", "gnomecompat", FALSE,
- METACITY "/global_keybindings/panel_main_menu", OptionKey},
- {"run_command_screenshot_key", "gnomecompat", FALSE,
- METACITY "/global_keybindings/run_command_screenshot", OptionKey},
- {"run_command_window_screenshot_key", "gnomecompat", FALSE,
- METACITY "/global_keybindings/run_command_window_screenshot", OptionKey},
- {"run_command_terminal_key", "gnomecompat", FALSE,
- METACITY "/global_keybindings/run_command_terminal", OptionKey},
-
- {"toggle_window_maximized_key", "core", FALSE,
- METACITY "/window_keybindings/toggle_maximized", OptionKey},
- {"minimize_window_key", "core", FALSE,
- METACITY "/window_keybindings/minimize", OptionKey},
- {"maximize_window_key", "core", FALSE,
- METACITY "/window_keybindings/maximize", OptionKey},
- {"unmaximize_window_key", "core", FALSE,
- METACITY "/window_keybindings/unmaximize", OptionKey},
- {"maximize_window_horizontally_key", "core", FALSE,
- METACITY "/window_keybindings/maximize_horizontally", OptionKey},
- {"maximize_window_vertically_key", "core", FALSE,
- METACITY "/window_keybindings/maximize_vertically", OptionKey},
- {"raise_window_key", "core", FALSE,
- METACITY "/window_keybindings/raise", OptionKey},
- {"lower_window_key", "core", FALSE,
- METACITY "/window_keybindings/lower", OptionKey},
- {"close_window_key", "core", FALSE,
- METACITY "/window_keybindings/close", OptionKey},
- {"toggle_window_shaded_key", "core", FALSE,
- METACITY "/window_keybindings/toggle_shaded", OptionKey},
-
- {"show_desktop_key", "core", FALSE,
- METACITY "/global_keybindings/show_desktop", OptionKey},
-
- {"initiate_key", "move", FALSE,
- METACITY "/window_keybindings/begin_move", OptionKey},
- {"initiate_key", "resize", FALSE,
- METACITY "/window_keybindings/begin_resize", OptionKey},
- {"window_menu_key", "core", FALSE,
- METACITY "/window_keybindings/activate_window_menu", OptionKey},
-
- /* integration of Metacity's mouse_button_modifier option */
- {"initiate_button", "move", FALSE,
- METACITY "/window_keybindings/begin_move", OptionSpecial},
- {"initiate_button", "resize", FALSE,
- METACITY "/window_keybindings/begin_resize", OptionSpecial},
- {"window_menu_button", "core", FALSE,
- METACITY "/window_keybindings/activate_window_menu", OptionSpecial},
- {"mouse_button_modifier", NULL, FALSE,
- METACITY "/general/mouse_button_modifier", OptionSpecial},
- /* integration of the Metacity's option to swap mouse buttons */
- {"resize_with_right_button", NULL, FALSE,
- METACITY "/general/resize_with_right_button", OptionSpecial},
-
- {"visual_bell", "fade", TRUE,
- METACITY "/general/visual_bell", OptionBool},
- {"fullscreen_visual_bell", "fade", TRUE,
- METACITY "/general/visual_bell_type", OptionSpecial},
-
- {"next_key", "staticswitcher", FALSE,
- METACITY "/global_keybindings/switch_windows", OptionKey},
- {"prev_key", "staticswitcher", FALSE,
- METACITY "/global_keybindings/switch_windows_backward", OptionKey},
-
- {"toggle_sticky_key", "extrawm", FALSE,
- METACITY "/window_keybindings/toggle_on_all_workspaces", OptionKey},
- {"toggle_fullscreen_key", "extrawm", FALSE,
- METACITY "/window_keybindings/toggle_fullscreen", OptionKey},
-
- {"command0", "commands", FALSE,
- METACITY "/keybinding_commands/command_1", OptionString},
- {"command1", "commands", FALSE,
- METACITY "/keybinding_commands/command_2", OptionString},
- {"command2", "commands", FALSE,
- METACITY "/keybinding_commands/command_3", OptionString},
- {"command3", "commands", FALSE,
- METACITY "/keybinding_commands/command_4", OptionString},
- {"command4", "commands", FALSE,
Reply to: