Merge lp:~3v1n0/compiz/drop-gconf into lp:compiz/0.9.12
- drop-gconf
- Merge into 0.9.12
Proposed by
Marco Trevisan (Treviño)
on 2015-12-10
| Status: | Merged |
|---|---|
| Approved by: | Sebastien Bacher on 2015-12-10 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 3991 |
| Proposed branch: | lp:~3v1n0/compiz/drop-gconf |
| Merge into: | lp:compiz/0.9.12 |
| Prerequisite: | lp:~3v1n0/compiz/scale-multimonitor-workarea |
| Diff against target: |
4909 lines (+16/-4479) 43 files modified
cmake/CMakeLists.txt (+0/-5) cmake/CompizDefaults.cmake (+0/-2) cmake/CompizDefaults.cmake.in (+1/-5) cmake/CompizGconf.cmake (+0/-52) cmake/CompizPlugin.cmake (+0/-3) cmake/base.cmake (+0/-23) cmake/plugin_extensions/CompizGenGconf.cmake (+0/-81) compizconfig/CMakeLists.txt (+0/-6) compizconfig/gconf/CMakeLists.txt (+0/-16) compizconfig/gconf/COPYING (+0/-340) compizconfig/gconf/INSTALL (+0/-236) compizconfig/gconf/src/gconf.c (+0/-1270) compizconfig/gsettings/CMakeLists.txt (+0/-6) compizconfig/gsettings/gsettings_backend_shared/CMakeLists.txt (+0/-9) compizconfig/integration/gnome/CMakeLists.txt (+0/-1) compizconfig/integration/gnome/gconf/CMakeLists.txt (+0/-46) compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting.h (+0/-30) compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting_factory.h (+0/-30) compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting.c (+0/-290) compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting_factory.c (+0/-247) compizconfig/integration/gnome/gsettings/CMakeLists.txt (+0/-2) compizconfig/integration/gnome/include/ccs_gnome_integration.h (+2/-2) compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h (+0/-2) compizconfig/integration/gnome/src/ccs_gnome_integration_constants.c (+0/-6) compizconfig/integration/mate/CMakeLists.txt (+0/-1) compizconfig/integration/mate/gconf/CMakeLists.txt (+0/-46) compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting.h (+0/-30) compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting_factory.h (+0/-30) compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting.c (+0/-290) compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting_factory.c (+0/-247) compizconfig/integration/mate/gsettings/CMakeLists.txt (+0/-2) compizconfig/integration/mate/include/ccs_mate_integration.h (+2/-2) compizconfig/libcompizconfig/include/ccs-backend.h (+2/-2) compizconfig/libcompizconfig/src/compiz.cpp (+6/-6) debian/compiz-gnome.install (+0/-1) debian/control (+0/-11) debian/rules (+2/-5) gtk/CMakeLists.txt (+1/-1) metadata/CMakeLists.txt (+0/-11) plugins/addhelper/Makefile (+0/-533) tests/migration-scripts/test_migration.py (+0/-137) xslt/CMakeLists.txt (+0/-4) xslt/compiz_gconf_schemas.xslt (+0/-410) |
| To merge this branch: | bzr merge lp:~3v1n0/compiz/drop-gconf |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Needs Fixing on 2015-12-10 | |
| Sebastien Bacher | 2015-12-10 | Approve on 2015-12-10 | |
|
Review via email:
|
|||
Commit Message
backends: drop gconf support
Description of the Change
To post a comment you must log in.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3990
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
review:
Needs Fixing
(continuous-integration)
lp:~3v1n0/compiz/drop-gconf
updated
on 2015-12-10
- 3990. By Marco Trevisan (Treviño) on 2015-12-10
-
backends: drop gconf support
| Alberts Muktupāvels (muktupavels) wrote : | # |
Why focus_mode was changed to focumode?
lp:~3v1n0/compiz/drop-gconf
updated
on 2015-12-11
- 3991. By Marco Trevisan (Treviño) on 2015-12-11
-
Gnome integration constants, fix typo in focus_mode
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Good catch, fixed.
Thanks
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file 'cmake/CMakeLists.txt' |
| 2 | --- cmake/CMakeLists.txt 2012-07-30 06:17:35 +0000 |
| 3 | +++ cmake/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 4 | @@ -20,11 +20,6 @@ |
| 5 | list (APPEND _PluginExtensionFiles |
| 6 | plugin_extensions/CompizOpenGLFixups.cmake) |
| 7 | |
| 8 | -if (USE_GCONF) |
| 9 | - list (APPEND _files CompizGconf.cmake) |
| 10 | - list (APPEND _PluginExtensionFiles plugin_extensions/CompizGenGconf.cmake) |
| 11 | -endif (USE_GCONF) |
| 12 | - |
| 13 | if (USE_GSETTINGS) |
| 14 | list (APPEND _files CompizGSettings.cmake) |
| 15 | list (APPEND _PluginExtensionFiles plugin_extensions/CompizGenGSettings.cmake) |
| 16 | |
| 17 | === modified file 'cmake/CompizDefaults.cmake' |
| 18 | --- cmake/CompizDefaults.cmake 2012-01-23 10:38:32 +0000 |
| 19 | +++ cmake/CompizDefaults.cmake 2015-12-11 09:51:42 +0000 |
| 20 | @@ -8,8 +8,6 @@ |
| 21 | |
| 22 | set (COMPIZ_BCOP_XSLT ${CMAKE_SOURCE_DIR}/xslt/bcop.xslt) |
| 23 | |
| 24 | -set (COMPIZ_GCONF_SCHEMAS_SUPPORT ${USE_GCONF}) |
| 25 | -set (COMPIZ_GCONF_SCHEMAS_XSLT ${CMAKE_SOURCE_DIR}/xslt/compiz_gconf_schemas.xslt) |
| 26 | set (COMPIZ_GSETTINGS_SCHEMAS_XSLT ${CMAKE_BINARY_DIR}/xslt/compiz_gsettings_schemas.xslt) |
| 27 | |
| 28 | set (COMPIZ_PLUGIN_INSTALL_TYPE "package") |
| 29 | |
| 30 | === modified file 'cmake/CompizDefaults.cmake.in' |
| 31 | --- cmake/CompizDefaults.cmake.in 2011-07-27 16:13:28 +0000 |
| 32 | +++ cmake/CompizDefaults.cmake.in 2015-12-11 09:51:42 +0000 |
| 33 | @@ -1,6 +1,2 @@ |
| 34 | - |
| 35 | set (COMPIZ_BCOP_XSLT @CMAKE_INSTALL_PREFIX@/share/compiz/xslt/bcop.xslt) |
| 36 | - |
| 37 | -set (COMPIZ_GCONF_SCHEMAS_SUPPORT @USE_GCONF@) |
| 38 | -set (COMPIZ_GCONF_SCHEMAS_XSLT @CMAKE_INSTALL_PREFIX@/share/compiz/xslt/compiz_gconf_schemas.xslt) |
| 39 | -set (COMPIZ_GSETTINGS_SCHEMAS_XSLT @CMAKE_INSTALL_PREFIX@/share/compiz/xslt/compiz_gsettings_schemas.xslt) |
| 40 | \ No newline at end of file |
| 41 | +set (COMPIZ_GSETTINGS_SCHEMAS_XSLT @CMAKE_INSTALL_PREFIX@/share/compiz/xslt/compiz_gsettings_schemas.xslt) |
| 42 | |
| 43 | === removed file 'cmake/CompizGconf.cmake' |
| 44 | --- cmake/CompizGconf.cmake 2012-05-24 00:55:17 +0000 |
| 45 | +++ cmake/CompizGconf.cmake 1970-01-01 00:00:00 +0000 |
| 46 | @@ -1,52 +0,0 @@ |
| 47 | -option ( |
| 48 | - COMPIZ_DISABLE_SCHEMAS_INSTALL |
| 49 | - "Disables gconf schema installation with gconftool" |
| 50 | - OFF |
| 51 | -) |
| 52 | - |
| 53 | -set ( |
| 54 | - COMPIZ_INSTALL_GCONF_SCHEMA_DIR ${COMPIZ_INSTALL_GCONF_SCHEMA_DIR} CACHE PATH |
| 55 | - "Installation path of the gconf schema file" |
| 56 | -) |
| 57 | - |
| 58 | -function (compiz_install_gconf_schema _src _dst) |
| 59 | - find_program (GCONFTOOL_EXECUTABLE gconftool-2) |
| 60 | - mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE) |
| 61 | - |
| 62 | - if (GCONFTOOL_EXECUTABLE AND NOT COMPIZ_DISABLE_SCHEMAS_INSTALL) |
| 63 | - install (CODE " |
| 64 | - if (\"\$ENV{USER}\" STREQUAL \"root\") |
| 65 | - exec_program (${GCONFTOOL_EXECUTABLE} |
| 66 | - ARGS \"--get-default-source\" |
| 67 | - OUTPUT_VARIABLE ENV{GCONF_CONFIG_SOURCE}) |
| 68 | - exec_program (${GCONFTOOL_EXECUTABLE} |
| 69 | - ARGS \"--makefile-install-rule ${_src} > /dev/null\") |
| 70 | - else (\"\$ENV{USER}\" STREQUAL \"root\") |
| 71 | - exec_program (${GCONFTOOL_EXECUTABLE} |
| 72 | - ARGS \"--install-schema-file=${_src} > /dev/null\") |
| 73 | - endif (\"\$ENV{USER}\" STREQUAL \"root\") |
| 74 | - ") |
| 75 | - endif () |
| 76 | - install ( |
| 77 | - FILES "${_src}" |
| 78 | - DESTINATION "${_dst}" |
| 79 | - ) |
| 80 | -endfunction () |
| 81 | - |
| 82 | -# generate gconf schema |
| 83 | -function (compiz_gconf_schema _src _dst _inst) |
| 84 | - find_program (XSLTPROC_EXECUTABLE xsltproc) |
| 85 | - mark_as_advanced (FORCE XSLTPROC_EXECUTABLE) |
| 86 | - |
| 87 | - if (XSLTPROC_EXECUTABLE) |
| 88 | - add_custom_command ( |
| 89 | - OUTPUT ${_dst} |
| 90 | - COMMAND ${XSLTPROC_EXECUTABLE} |
| 91 | - -o ${_dst} |
| 92 | - ${COMPIZ_GCONF_SCHEMAS_XSLT} |
| 93 | - ${_src} |
| 94 | - DEPENDS ${_src} |
| 95 | - ) |
| 96 | - compiz_install_gconf_schema (${_dst} ${_inst}) |
| 97 | - endif () |
| 98 | -endfunction () |
| 99 | |
| 100 | === modified file 'cmake/CompizPlugin.cmake' |
| 101 | --- cmake/CompizPlugin.cmake 2013-02-20 10:53:57 +0000 |
| 102 | +++ cmake/CompizPlugin.cmake 2015-12-11 09:51:42 +0000 |
| 103 | @@ -50,9 +50,6 @@ |
| 104 | # |
| 105 | # COMPIZ_I18N_DIR = Translation file directory |
| 106 | # |
| 107 | -# COMPIZ_DISABLE_SCHEMAS_INSTALL = Disables gconf schema installation with gconftool |
| 108 | -# COMPIZ_INSTALL_GCONF_SCHEMA_DIR = Installation path of the gconf schema file |
| 109 | -# |
| 110 | # VERSION = package version that is added to a plugin pkg-version file |
| 111 | # |
| 112 | ####################################################################### |
| 113 | |
| 114 | === modified file 'cmake/base.cmake' |
| 115 | --- cmake/base.cmake 2012-12-06 02:44:21 +0000 |
| 116 | +++ cmake/base.cmake 2015-12-11 09:51:42 +0000 |
| 117 | @@ -1,25 +1,3 @@ |
| 118 | -set (USE_GCONF 1 CACHE BOOL "Install core GConf schemas") |
| 119 | - |
| 120 | -if (USE_GCONF) |
| 121 | - pkg_check_modules (GCONF gconf-2.0) |
| 122 | - |
| 123 | - find_program (GCONFTOOL_EXECUTABLE gconftool-2) |
| 124 | - mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE) |
| 125 | - |
| 126 | - if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 127 | - set (SCHEMADIR "${CMAKE_INSTALL_PREFIX}/share/gconf/schemas") |
| 128 | - else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 129 | - set (SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}") |
| 130 | - endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 131 | - |
| 132 | - if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE) |
| 133 | - set (USE_GCONF 0) |
| 134 | - else () |
| 135 | - include (CompizGconf) |
| 136 | - include (CompizGSettings) |
| 137 | - endif () |
| 138 | -endif () |
| 139 | - |
| 140 | function (_print_configure_results) |
| 141 | compiz_print_configure_header ("Compiz") |
| 142 | compiz_color_message ("\n${_escape}[4mOptional features:${_escape}[0m\n") |
| 143 | @@ -27,7 +5,6 @@ |
| 144 | compiz_print_result_message ("GLESv2" USE_GLES) |
| 145 | compiz_print_result_message ("gtk window decorator" USE_GTK) |
| 146 | compiz_print_result_message ("metacity theme support" USE_METACITY) |
| 147 | - compiz_print_result_message ("gconf schemas" USE_GCONF) |
| 148 | compiz_print_result_message ("gnome" USE_GNOME) |
| 149 | compiz_print_result_message ("kde4 window decorator" USE_KDE4) |
| 150 | |
| 151 | |
| 152 | === removed file 'cmake/plugin_extensions/CompizGenGconf.cmake' |
| 153 | --- cmake/plugin_extensions/CompizGenGconf.cmake 2013-02-20 13:55:12 +0000 |
| 154 | +++ cmake/plugin_extensions/CompizGenGconf.cmake 1970-01-01 00:00:00 +0000 |
| 155 | @@ -1,81 +0,0 @@ |
| 156 | -option ( |
| 157 | - COMPIZ_DISABLE_SCHEMAS_INSTALL |
| 158 | - "Disables gconf schema installation with gconftool" |
| 159 | - OFF |
| 160 | -) |
| 161 | - |
| 162 | -set ( |
| 163 | - COMPIZ_INSTALL_GCONF_SCHEMA_DIR ${COMPIZ_INSTALL_GCONF_SCHEMA_DIR} CACHE PATH |
| 164 | - "Installation path of the gconf schema file" |
| 165 | -) |
| 166 | - |
| 167 | -macro (compiz_gconf_prepare_install_dirs) |
| 168 | - if ("${COMPIZ_PLUGIN_INSTALL_TYPE}" STREQUAL "package") |
| 169 | - if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 170 | - set (PLUGIN_SCHEMADIR "${datadir}/gconf/schemas") |
| 171 | - else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 172 | - set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}") |
| 173 | - endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 174 | - elseif ("${COMPIZ_PLUGIN_INSTALL_TYPE}" STREQUAL "compiz" OR |
| 175 | - "$ENV{BUILD_GLOBAL}" STREQUAL "true") |
| 176 | - if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 177 | - set (PLUGIN_SCHEMADIR "${COMPIZ_PREFIX}/share/gconf/schemas") |
| 178 | - else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 179 | - set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}") |
| 180 | - endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 181 | - else ("${COMPIZ_PLUGIN_INSTALL_TYPE}" STREQUAL "compiz" OR |
| 182 | - "$ENV{BUILD_GLOBAL}" STREQUAL "true") |
| 183 | - |
| 184 | - if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 185 | - set (PLUGIN_SCHEMADIR "$ENV{HOME}/.gconf/schemas") |
| 186 | - else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 187 | - set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}") |
| 188 | - endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR) |
| 189 | - |
| 190 | - endif ("${COMPIZ_PLUGIN_INSTALL_TYPE}" STREQUAL "package") |
| 191 | -endmacro (compiz_gconf_prepare_install_dirs) |
| 192 | - |
| 193 | -function (compiz_install_gconf_schema _src _dst) |
| 194 | - find_program (GCONFTOOL_EXECUTABLE gconftool-2) |
| 195 | - mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE) |
| 196 | - |
| 197 | - if (GCONFTOOL_EXECUTABLE AND NOT COMPIZ_DISABLE_SCHEMAS_INSTALL) |
| 198 | - install (CODE " |
| 199 | - if (\"\$ENV{USER}\" STREQUAL \"root\") |
| 200 | - exec_program (${GCONFTOOL_EXECUTABLE} |
| 201 | - ARGS \"--get-default-source\" |
| 202 | - OUTPUT_VARIABLE ENV{GCONF_CONFIG_SOURCE}) |
| 203 | - exec_program (${GCONFTOOL_EXECUTABLE} |
| 204 | - ARGS \"--makefile-install-rule ${_src} > /dev/null\") |
| 205 | - else (\"\$ENV{USER}\" STREQUAL \"root\") |
| 206 | - exec_program (${GCONFTOOL_EXECUTABLE} |
| 207 | - ARGS \"--install-schema-file=${_src} > /dev/null\") |
| 208 | - endif (\"\$ENV{USER}\" STREQUAL \"root\") |
| 209 | - ") |
| 210 | - endif () |
| 211 | - install ( |
| 212 | - FILES "${_src}" |
| 213 | - DESTINATION "${_dst}" |
| 214 | - ) |
| 215 | -endfunction () |
| 216 | - |
| 217 | -# generate gconf schema |
| 218 | -find_program (XSLTPROC_EXECUTABLE xsltproc) |
| 219 | -mark_as_advanced (FORCE XSLTPROC_EXECUTABLE) |
| 220 | - |
| 221 | -if (XSLTPROC_EXECUTABLE) |
| 222 | - compiz_gconf_prepare_install_dirs () |
| 223 | - add_custom_command ( |
| 224 | - OUTPUT "${CMAKE_BINARY_DIR}/generated/compiz-${COMPIZ_CURRENT_PLUGIN}.schemas" |
| 225 | - COMMAND ${XSLTPROC_EXECUTABLE} |
| 226 | - -o "${CMAKE_BINARY_DIR}/generated/compiz-${COMPIZ_CURRENT_PLUGIN}.schemas" |
| 227 | - ${COMPIZ_GCONF_SCHEMAS_XSLT} |
| 228 | - ${COMPIZ_CURRENT_XML_FILE} |
| 229 | - DEPENDS ${COMPIZ_CURRENT_XML_FILE} |
| 230 | - ) |
| 231 | - |
| 232 | - if (_install_plugin_${COMPIZ_CURRENT_PLUGIN}) |
| 233 | - compiz_install_gconf_schema ("${CMAKE_BINARY_DIR}/generated/compiz-${COMPIZ_CURRENT_PLUGIN}.schemas" ${PLUGIN_SCHEMADIR}) |
| 234 | - endif (_install_plugin_${COMPIZ_CURRENT_PLUGIN}) |
| 235 | - list (APPEND COMPIZ_CURRENT_SOURCES_ADDS ${CMAKE_BINARY_DIR}/generated/compiz-${COMPIZ_CURRENT_PLUGIN}.schemas) |
| 236 | -endif () |
| 237 | |
| 238 | === modified file 'compizconfig/CMakeLists.txt' |
| 239 | --- compizconfig/CMakeLists.txt 2015-07-30 19:36:21 +0000 |
| 240 | +++ compizconfig/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 241 | @@ -16,17 +16,11 @@ |
| 242 | set (libcompizconfig_exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) |
| 243 | endif (COMPIZ_PACKAGING_ENABLED) |
| 244 | |
| 245 | -option (USE_GCONF "Enable legacy GNOME 2.x option integration with GConf" ON) |
| 246 | - |
| 247 | add_subdirectory (libcompizconfig) |
| 248 | add_subdirectory (compizconfig-python) |
| 249 | add_subdirectory (integration) |
| 250 | add_subdirectory (ccsm) |
| 251 | |
| 252 | -if (USE_GCONF) |
| 253 | - add_subdirectory (gconf) |
| 254 | -endif (USE_GCONF) |
| 255 | - |
| 256 | if (USE_GSETTINGS) |
| 257 | add_subdirectory (gsettings) |
| 258 | endif (USE_GSETTINGS) |
| 259 | |
| 260 | === removed directory 'compizconfig/gconf' |
| 261 | === removed file 'compizconfig/gconf/CMakeLists.txt' |
| 262 | --- compizconfig/gconf/CMakeLists.txt 2012-08-18 12:45:21 +0000 |
| 263 | +++ compizconfig/gconf/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
| 264 | @@ -1,16 +0,0 @@ |
| 265 | -if (USE_GCONF) |
| 266 | - |
| 267 | - find_package (CompizConfig REQUIRED) |
| 268 | - |
| 269 | - include (LibCompizConfigCommon) |
| 270 | - |
| 271 | - include_directories (${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/include |
| 272 | - ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/gconf/include) |
| 273 | - link_directories (${CMAKE_BINARY_DIR}/compizconfig/integration/gnome |
| 274 | - ${CMAKE_BINARY_DIR}/compizconfig/integration/gnome/gconf) |
| 275 | - |
| 276 | - compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0 LIBRARIES |
| 277 | - compizconfig_gnome_integration |
| 278 | - compizconfig_gnome_integration_gconf_setting_factory |
| 279 | - compizconfig_gnome_integration_gconf_integrated_setting) |
| 280 | -endif (USE_GCONF) |
| 281 | |
| 282 | === removed file 'compizconfig/gconf/COPYING' |
| 283 | --- compizconfig/gconf/COPYING 2012-05-16 17:41:22 +0000 |
| 284 | +++ compizconfig/gconf/COPYING 1970-01-01 00:00:00 +0000 |
| 285 | @@ -1,340 +0,0 @@ |
| 286 | - GNU GENERAL PUBLIC LICENSE |
| 287 | - Version 2, June 1991 |
| 288 | - |
| 289 | - Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
| 290 | - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 291 | - Everyone is permitted to copy and distribute verbatim copies |
| 292 | - of this license document, but changing it is not allowed. |
| 293 | - |
| 294 | - Preamble |
| 295 | - |
| 296 | - The licenses for most software are designed to take away your |
| 297 | -freedom to share and change it. By contrast, the GNU General Public |
| 298 | -License is intended to guarantee your freedom to share and change free |
| 299 | -software--to make sure the software is free for all its users. This |
| 300 | -General Public License applies to most of the Free Software |
| 301 | -Foundation's software and to any other program whose authors commit to |
| 302 | -using it. (Some other Free Software Foundation software is covered by |
| 303 | -the GNU Library General Public License instead.) You can apply it to |
| 304 | -your programs, too. |
| 305 | - |
| 306 | - When we speak of free software, we are referring to freedom, not |
| 307 | -price. Our General Public Licenses are designed to make sure that you |
| 308 | -have the freedom to distribute copies of free software (and charge for |
| 309 | -this service if you wish), that you receive source code or can get it |
| 310 | -if you want it, that you can change the software or use pieces of it |
| 311 | -in new free programs; and that you know you can do these things. |
| 312 | - |
| 313 | - To protect your rights, we need to make restrictions that forbid |
| 314 | -anyone to deny you these rights or to ask you to surrender the rights. |
| 315 | -These restrictions translate to certain responsibilities for you if you |
| 316 | -distribute copies of the software, or if you modify it. |
| 317 | - |
| 318 | - For example, if you distribute copies of such a program, whether |
| 319 | -gratis or for a fee, you must give the recipients all the rights that |
| 320 | -you have. You must make sure that they, too, receive or can get the |
| 321 | -source code. And you must show them these terms so they know their |
| 322 | -rights. |
| 323 | - |
| 324 | - We protect your rights with two steps: (1) copyright the software, and |
| 325 | -(2) offer you this license which gives you legal permission to copy, |
| 326 | -distribute and/or modify the software. |
| 327 | - |
| 328 | - Also, for each author's protection and ours, we want to make certain |
| 329 | -that everyone understands that there is no warranty for this free |
| 330 | -software. If the software is modified by someone else and passed on, we |
| 331 | -want its recipients to know that what they have is not the original, so |
| 332 | -that any problems introduced by others will not reflect on the original |
| 333 | -authors' reputations. |
| 334 | - |
| 335 | - Finally, any free program is threatened constantly by software |
| 336 | -patents. We wish to avoid the danger that redistributors of a free |
| 337 | -program will individually obtain patent licenses, in effect making the |
| 338 | -program proprietary. To prevent this, we have made it clear that any |
| 339 | -patent must be licensed for everyone's free use or not licensed at all. |
| 340 | - |
| 341 | - The precise terms and conditions for copying, distribution and |
| 342 | -modification follow. |
| 343 | - |
| 344 | |
| 345 | - GNU GENERAL PUBLIC LICENSE |
| 346 | - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 347 | - |
| 348 | - 0. This License applies to any program or other work which contains |
| 349 | -a notice placed by the copyright holder saying it may be distributed |
| 350 | -under the terms of this General Public License. The "Program", below, |
| 351 | -refers to any such program or work, and a "work based on the Program" |
| 352 | -means either the Program or any derivative work under copyright law: |
| 353 | -that is to say, a work containing the Program or a portion of it, |
| 354 | -either verbatim or with modifications and/or translated into another |
| 355 | -language. (Hereinafter, translation is included without limitation in |
| 356 | -the term "modification".) Each licensee is addressed as "you". |
| 357 | - |
| 358 | -Activities other than copying, distribution and modification are not |
| 359 | -covered by this License; they are outside its scope. The act of |
| 360 | -running the Program is not restricted, and the output from the Program |
| 361 | -is covered only if its contents constitute a work based on the |
| 362 | -Program (independent of having been made by running the Program). |
| 363 | -Whether that is true depends on what the Program does. |
| 364 | - |
| 365 | - 1. You may copy and distribute verbatim copies of the Program's |
| 366 | -source code as you receive it, in any medium, provided that you |
| 367 | -conspicuously and appropriately publish on each copy an appropriate |
| 368 | -copyright notice and disclaimer of warranty; keep intact all the |
| 369 | -notices that refer to this License and to the absence of any warranty; |
| 370 | -and give any other recipients of the Program a copy of this License |
| 371 | -along with the Program. |
| 372 | - |
| 373 | -You may charge a fee for the physical act of transferring a copy, and |
| 374 | -you may at your option offer warranty protection in exchange for a fee. |
| 375 | - |
| 376 | - 2. You may modify your copy or copies of the Program or any portion |
| 377 | -of it, thus forming a work based on the Program, and copy and |
| 378 | -distribute such modifications or work under the terms of Section 1 |
| 379 | -above, provided that you also meet all of these conditions: |
| 380 | - |
| 381 | - a) You must cause the modified files to carry prominent notices |
| 382 | - stating that you changed the files and the date of any change. |
| 383 | - |
| 384 | - b) You must cause any work that you distribute or publish, that in |
| 385 | - whole or in part contains or is derived from the Program or any |
| 386 | - part thereof, to be licensed as a whole at no charge to all third |
| 387 | - parties under the terms of this License. |
| 388 | - |
| 389 | - c) If the modified program normally reads commands interactively |
| 390 | - when run, you must cause it, when started running for such |
| 391 | - interactive use in the most ordinary way, to print or display an |
| 392 | - announcement including an appropriate copyright notice and a |
| 393 | - notice that there is no warranty (or else, saying that you provide |
| 394 | - a warranty) and that users may redistribute the program under |
| 395 | - these conditions, and telling the user how to view a copy of this |
| 396 | - License. (Exception: if the Program itself is interactive but |
| 397 | - does not normally print such an announcement, your work based on |
| 398 | - the Program is not required to print an announcement.) |
| 399 | - |
| 400 | |
| 401 | -These requirements apply to the modified work as a whole. If |
| 402 | -identifiable sections of that work are not derived from the Program, |
| 403 | -and can be reasonably considered independent and separate works in |
| 404 | -themselves, then this License, and its terms, do not apply to those |
| 405 | -sections when you distribute them as separate works. But when you |
| 406 | -distribute the same sections as part of a whole which is a work based |
| 407 | -on the Program, the distribution of the whole must be on the terms of |
| 408 | -this License, whose permissions for other licensees extend to the |
| 409 | -entire whole, and thus to each and every part regardless of who wrote it. |
| 410 | - |
| 411 | -Thus, it is not the intent of this section to claim rights or contest |
| 412 | -your rights to work written entirely by you; rather, the intent is to |
| 413 | -exercise the right to control the distribution of derivative or |
| 414 | -collective works based on the Program. |
| 415 | - |
| 416 | -In addition, mere aggregation of another work not based on the Program |
| 417 | -with the Program (or with a work based on the Program) on a volume of |
| 418 | -a storage or distribution medium does not bring the other work under |
| 419 | -the scope of this License. |
| 420 | - |
| 421 | - 3. You may copy and distribute the Program (or a work based on it, |
| 422 | -under Section 2) in object code or executable form under the terms of |
| 423 | -Sections 1 and 2 above provided that you also do one of the following: |
| 424 | - |
| 425 | - a) Accompany it with the complete corresponding machine-readable |
| 426 | - source code, which must be distributed under the terms of Sections |
| 427 | - 1 and 2 above on a medium customarily used for software interchange; or, |
| 428 | - |
| 429 | - b) Accompany it with a written offer, valid for at least three |
| 430 | - years, to give any third party, for a charge no more than your |
| 431 | - cost of physically performing source distribution, a complete |
| 432 | - machine-readable copy of the corresponding source code, to be |
| 433 | - distributed under the terms of Sections 1 and 2 above on a medium |
| 434 | - customarily used for software interchange; or, |
| 435 | - |
| 436 | - c) Accompany it with the information you received as to the offer |
| 437 | - to distribute corresponding source code. (This alternative is |
| 438 | - allowed only for noncommercial distribution and only if you |
| 439 | - received the program in object code or executable form with such |
| 440 | - an offer, in accord with Subsection b above.) |
| 441 | - |
| 442 | -The source code for a work means the preferred form of the work for |
| 443 | -making modifications to it. For an executable work, complete source |
| 444 | -code means all the source code for all modules it contains, plus any |
| 445 | -associated interface definition files, plus the scripts used to |
| 446 | -control compilation and installation of the executable. However, as a |
| 447 | -special exception, the source code distributed need not include |
| 448 | -anything that is normally distributed (in either source or binary |
| 449 | -form) with the major components (compiler, kernel, and so on) of the |
| 450 | -operating system on which the executable runs, unless that component |
| 451 | -itself accompanies the executable. |
| 452 | - |
| 453 | -If distribution of executable or object code is made by offering |
| 454 | -access to copy from a designated place, then offering equivalent |
| 455 | -access to copy the source code from the same place counts as |
| 456 | -distribution of the source code, even though third parties are not |
| 457 | -compelled to copy the source along with the object code. |
| 458 | - |
| 459 | |
| 460 | - 4. You may not copy, modify, sublicense, or distribute the Program |
| 461 | -except as expressly provided under this License. Any attempt |
| 462 | -otherwise to copy, modify, sublicense or distribute the Program is |
| 463 | -void, and will automatically terminate your rights under this License. |
| 464 | -However, parties who have received copies, or rights, from you under |
| 465 | -this License will not have their licenses terminated so long as such |
| 466 | -parties remain in full compliance. |
| 467 | - |
| 468 | - 5. You are not required to accept this License, since you have not |
| 469 | -signed it. However, nothing else grants you permission to modify or |
| 470 | -distribute the Program or its derivative works. These actions are |
| 471 | -prohibited by law if you do not accept this License. Therefore, by |
| 472 | -modifying or distributing the Program (or any work based on the |
| 473 | -Program), you indicate your acceptance of this License to do so, and |
| 474 | -all its terms and conditions for copying, distributing or modifying |
| 475 | -the Program or works based on it. |
| 476 | - |
| 477 | - 6. Each time you redistribute the Program (or any work based on the |
| 478 | -Program), the recipient automatically receives a license from the |
| 479 | -original licensor to copy, distribute or modify the Program subject to |
| 480 | -these terms and conditions. You may not impose any further |
| 481 | -restrictions on the recipients' exercise of the rights granted herein. |
| 482 | -You are not responsible for enforcing compliance by third parties to |
| 483 | -this License. |
| 484 | - |
| 485 | - 7. If, as a consequence of a court judgment or allegation of patent |
| 486 | -infringement or for any other reason (not limited to patent issues), |
| 487 | -conditions are imposed on you (whether by court order, agreement or |
| 488 | -otherwise) that contradict the conditions of this License, they do not |
| 489 | -excuse you from the conditions of this License. If you cannot |
| 490 | -distribute so as to satisfy simultaneously your obligations under this |
| 491 | -License and any other pertinent obligations, then as a consequence you |
| 492 | -may not distribute the Program at all. For example, if a patent |
| 493 | -license would not permit royalty-free redistribution of the Program by |
| 494 | -all those who receive copies directly or indirectly through you, then |
| 495 | -the only way you could satisfy both it and this License would be to |
| 496 | -refrain entirely from distribution of the Program. |
| 497 | - |
| 498 | -If any portion of this section is held invalid or unenforceable under |
| 499 | -any particular circumstance, the balance of the section is intended to |
| 500 | -apply and the section as a whole is intended to apply in other |
| 501 | -circumstances. |
| 502 | - |
| 503 | -It is not the purpose of this section to induce you to infringe any |
| 504 | -patents or other property right claims or to contest validity of any |
| 505 | -such claims; this section has the sole purpose of protecting the |
| 506 | -integrity of the free software distribution system, which is |
| 507 | -implemented by public license practices. Many people have made |
| 508 | -generous contributions to the wide range of software distributed |
| 509 | -through that system in reliance on consistent application of that |
| 510 | -system; it is up to the author/donor to decide if he or she is willing |
| 511 | -to distribute software through any other system and a licensee cannot |
| 512 | -impose that choice. |
| 513 | - |
| 514 | -This section is intended to make thoroughly clear what is believed to |
| 515 | -be a consequence of the rest of this License. |
| 516 | - |
| 517 | |
| 518 | - 8. If the distribution and/or use of the Program is restricted in |
| 519 | -certain countries either by patents or by copyrighted interfaces, the |
| 520 | -original copyright holder who places the Program under this License |
| 521 | -may add an explicit geographical distribution limitation excluding |
| 522 | -those countries, so that distribution is permitted only in or among |
| 523 | -countries not thus excluded. In such case, this License incorporates |
| 524 | -the limitation as if written in the body of this License. |
| 525 | - |
| 526 | - 9. The Free Software Foundation may publish revised and/or new versions |
| 527 | -of the General Public License from time to time. Such new versions will |
| 528 | -be similar in spirit to the present version, but may differ in detail to |
| 529 | -address new problems or concerns. |
| 530 | - |
| 531 | -Each version is given a distinguishing version number. If the Program |
| 532 | -specifies a version number of this License which applies to it and "any |
| 533 | -later version", you have the option of following the terms and conditions |
| 534 | -either of that version or of any later version published by the Free |
| 535 | -Software Foundation. If the Program does not specify a version number of |
| 536 | -this License, you may choose any version ever published by the Free Software |
| 537 | -Foundation. |
| 538 | - |
| 539 | - 10. If you wish to incorporate parts of the Program into other free |
| 540 | -programs whose distribution conditions are different, write to the author |
| 541 | -to ask for permission. For software which is copyrighted by the Free |
| 542 | -Software Foundation, write to the Free Software Foundation; we sometimes |
| 543 | -make exceptions for this. Our decision will be guided by the two goals |
| 544 | -of preserving the free status of all derivatives of our free software and |
| 545 | -of promoting the sharing and reuse of software generally. |
| 546 | - |
| 547 | - NO WARRANTY |
| 548 | - |
| 549 | - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
| 550 | -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
| 551 | -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
| 552 | -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
| 553 | -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 554 | -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
| 555 | -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
| 556 | -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
| 557 | -REPAIR OR CORRECTION. |
| 558 | - |
| 559 | - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| 560 | -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
| 561 | -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
| 562 | -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
| 563 | -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
| 564 | -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
| 565 | -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
| 566 | -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
| 567 | -POSSIBILITY OF SUCH DAMAGES. |
| 568 | - |
| 569 | - END OF TERMS AND CONDITIONS |
| 570 | - |
| 571 | |
| 572 | - How to Apply These Terms to Your New Programs |
| 573 | - |
| 574 | - If you develop a new program, and you want it to be of the greatest |
| 575 | -possible use to the public, the best way to achieve this is to make it |
| 576 | -free software which everyone can redistribute and change under these terms. |
| 577 | - |
| 578 | - To do so, attach the following notices to the program. It is safest |
| 579 | -to attach them to the start of each source file to most effectively |
| 580 | -convey the exclusion of warranty; and each file should have at least |
| 581 | -the "copyright" line and a pointer to where the full notice is found. |
| 582 | - |
| 583 | - <one line to give the program's name and a brief idea of what it does.> |
| 584 | - Copyright (C) <year> <name of author> |
| 585 | - |
| 586 | - This program is free software; you can redistribute it and/or modify |
| 587 | - it under the terms of the GNU General Public License as published by |
| 588 | - the Free Software Foundation; either version 2 of the License, or |
| 589 | - (at your option) any later version. |
| 590 | - |
| 591 | - This program is distributed in the hope that it will be useful, |
| 592 | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 593 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 594 | - GNU General Public License for more details. |
| 595 | - |
| 596 | - You should have received a copy of the GNU General Public License |
| 597 | - along with this program; if not, write to the Free Software |
| 598 | - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 599 | - |
| 600 | - |
| 601 | -Also add information on how to contact you by electronic and paper mail. |
| 602 | - |
| 603 | -If the program is interactive, make it output a short notice like this |
| 604 | -when it starts in an interactive mode: |
| 605 | - |
| 606 | - Gnomovision version 69, Copyright (C) year name of author |
| 607 | - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| 608 | - This is free software, and you are welcome to redistribute it |
| 609 | - under certain conditions; type `show c' for details. |
| 610 | - |
| 611 | -The hypothetical commands `show w' and `show c' should show the appropriate |
| 612 | -parts of the General Public License. Of course, the commands you use may |
| 613 | -be called something other than `show w' and `show c'; they could even be |
| 614 | -mouse-clicks or menu items--whatever suits your program. |
| 615 | - |
| 616 | -You should also get your employer (if you work as a programmer) or your |
| 617 | -school, if any, to sign a "copyright disclaimer" for the program, if |
| 618 | -necessary. Here is a sample; alter the names: |
| 619 | - |
| 620 | - Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
| 621 | - `Gnomovision' (which makes passes at compilers) written by James Hacker. |
| 622 | - |
| 623 | - <signature of Ty Coon>, 1 April 1989 |
| 624 | - Ty Coon, President of Vice |
| 625 | - |
| 626 | -This General Public License does not permit incorporating your program into |
| 627 | -proprietary programs. If your program is a subroutine library, you may |
| 628 | -consider it more useful to permit linking proprietary applications with the |
| 629 | -library. If this is what you want to do, use the GNU Library General |
| 630 | -Public License instead of this License. |
| 631 | |
| 632 | === removed file 'compizconfig/gconf/INSTALL' |
| 633 | --- compizconfig/gconf/INSTALL 2012-05-16 17:41:22 +0000 |
| 634 | +++ compizconfig/gconf/INSTALL 1970-01-01 00:00:00 +0000 |
| 635 | @@ -1,236 +0,0 @@ |
| 636 | -Installation Instructions |
| 637 | -************************* |
| 638 | - |
| 639 | -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free |
| 640 | -Software Foundation, Inc. |
| 641 | - |
| 642 | -This file is free documentation; the Free Software Foundation gives |
| 643 | -unlimited permission to copy, distribute and modify it. |
| 644 | - |
| 645 | -Basic Installation |
| 646 | -================== |
| 647 | - |
| 648 | -These are generic installation instructions. |
| 649 | - |
| 650 | - The `configure' shell script attempts to guess correct values for |
| 651 | -various system-dependent variables used during compilation. It uses |
| 652 | -those values to create a `Makefile' in each directory of the package. |
| 653 | -It may also create one or more `.h' files containing system-dependent |
| 654 | -definitions. Finally, it creates a shell script `config.status' that |
| 655 | -you can run in the future to recreate the current configuration, and a |
| 656 | -file `config.log' containing compiler output (useful mainly for |
| 657 | -debugging `configure'). |
| 658 | - |
| 659 | - It can also use an optional file (typically called `config.cache' |
| 660 | -and enabled with `--cache-file=config.cache' or simply `-C') that saves |
| 661 | -the results of its tests to speed up reconfiguring. (Caching is |
| 662 | -disabled by default to prevent problems with accidental use of stale |
| 663 | -cache files.) |
| 664 | - |
| 665 | - If you need to do unusual things to compile the package, please try |
| 666 | -to figure out how `configure' could check whether to do them, and mail |
| 667 | -diffs or instructions to the address given in the `README' so they can |
| 668 | -be considered for the next release. If you are using the cache, and at |
| 669 | -some point `config.cache' contains results you don't want to keep, you |
| 670 | -may remove or edit it. |
| 671 | - |
| 672 | - The file `configure.ac' (or `configure.in') is used to create |
| 673 | -`configure' by a program called `autoconf'. You only need |
| 674 | -`configure.ac' if you want to change it or regenerate `configure' using |
| 675 | -a newer version of `autoconf'. |
| 676 | - |
| 677 | -The simplest way to compile this package is: |
| 678 | - |
| 679 | - 1. `cd' to the directory containing the package's source code and type |
| 680 | - `./configure' to configure the package for your system. If you're |
| 681 | - using `csh' on an old version of System V, you might need to type |
| 682 | - `sh ./configure' instead to prevent `csh' from trying to execute |
| 683 | - `configure' itself. |
| 684 | - |
| 685 | - Running `configure' takes awhile. While running, it prints some |
| 686 | - messages telling which features it is checking for. |
| 687 | - |
| 688 | - 2. Type `make' to compile the package. |
| 689 | - |
| 690 | - 3. Optionally, type `make check' to run any self-tests that come with |
| 691 | - the package. |
| 692 | - |
| 693 | - 4. Type `make install' to install the programs and any data files and |
| 694 | - documentation. |
| 695 | - |
| 696 | - 5. You can remove the program binaries and object files from the |
| 697 | - source code directory by typing `make clean'. To also remove the |
| 698 | - files that `configure' created (so you can compile the package for |
| 699 | - a different kind of computer), type `make distclean'. There is |
| 700 | - also a `make maintainer-clean' target, but that is intended mainly |
| 701 | - for the package's developers. If you use it, you may have to get |
| 702 | - all sorts of other programs in order to regenerate files that came |
| 703 | - with the distribution. |
| 704 | - |
| 705 | -Compilers and Options |
| 706 | -===================== |
| 707 | - |
| 708 | -Some systems require unusual options for compilation or linking that the |
| 709 | -`configure' script does not know about. Run `./configure --help' for |
| 710 | -details on some of the pertinent environment variables. |
| 711 | - |
| 712 | - You can give `configure' initial values for configuration parameters |
| 713 | -by setting variables in the command line or in the environment. Here |
| 714 | -is an example: |
| 715 | - |
| 716 | - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix |
| 717 | - |
| 718 | - *Note Defining Variables::, for more details. |
| 719 | - |
| 720 | -Compiling For Multiple Architectures |
| 721 | -==================================== |
| 722 | - |
| 723 | -You can compile the package for more than one kind of computer at the |
| 724 | -same time, by placing the object files for each architecture in their |
| 725 | -own directory. To do this, you must use a version of `make' that |
| 726 | -supports the `VPATH' variable, such as GNU `make'. `cd' to the |
| 727 | -directory where you want the object files and executables to go and run |
| 728 | -the `configure' script. `configure' automatically checks for the |
| 729 | -source code in the directory that `configure' is in and in `..'. |
| 730 | - |
| 731 | - If you have to use a `make' that does not support the `VPATH' |
| 732 | -variable, you have to compile the package for one architecture at a |
| 733 | -time in the source code directory. After you have installed the |
| 734 | -package for one architecture, use `make distclean' before reconfiguring |
| 735 | -for another architecture. |
| 736 | - |
| 737 | -Installation Names |
| 738 | -================== |
| 739 | - |
| 740 | -By default, `make install' installs the package's commands under |
| 741 | -`/usr/local/bin', include files under `/usr/local/include', etc. You |
| 742 | -can specify an installation prefix other than `/usr/local' by giving |
| 743 | -`configure' the option `--prefix=PREFIX'. |
| 744 | - |
| 745 | - You can specify separate installation prefixes for |
| 746 | -architecture-specific files and architecture-independent files. If you |
| 747 | -pass the option `--exec-prefix=PREFIX' to `configure', the package uses |
| 748 | -PREFIX as the prefix for installing programs and libraries. |
| 749 | -Documentation and other data files still use the regular prefix. |
| 750 | - |
| 751 | - In addition, if you use an unusual directory layout you can give |
| 752 | -options like `--bindir=DIR' to specify different values for particular |
| 753 | -kinds of files. Run `configure --help' for a list of the directories |
| 754 | -you can set and what kinds of files go in them. |
| 755 | - |
| 756 | - If the package supports it, you can cause programs to be installed |
| 757 | -with an extra prefix or suffix on their names by giving `configure' the |
| 758 | -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
| 759 | - |
| 760 | -Optional Features |
| 761 | -================= |
| 762 | - |
| 763 | -Some packages pay attention to `--enable-FEATURE' options to |
| 764 | -`configure', where FEATURE indicates an optional part of the package. |
| 765 | -They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
| 766 | -is something like `gnu-as' or `x' (for the X Window System). The |
| 767 | -`README' should mention any `--enable-' and `--with-' options that the |
| 768 | -package recognizes. |
| 769 | - |
| 770 | - For packages that use the X Window System, `configure' can usually |
| 771 | -find the X include and library files automatically, but if it doesn't, |
| 772 | -you can use the `configure' options `--x-includes=DIR' and |
| 773 | -`--x-libraries=DIR' to specify their locations. |
| 774 | - |
| 775 | -Specifying the System Type |
| 776 | -========================== |
| 777 | - |
| 778 | -There may be some features `configure' cannot figure out automatically, |
| 779 | -but needs to determine by the type of machine the package will run on. |
| 780 | -Usually, assuming the package is built to be run on the _same_ |
| 781 | -architectures, `configure' can figure that out, but if it prints a |
| 782 | -message saying it cannot guess the machine type, give it the |
| 783 | -`--build=TYPE' option. TYPE can either be a short name for the system |
| 784 | -type, such as `sun4', or a canonical name which has the form: |
| 785 | - |
| 786 | - CPU-COMPANY-SYSTEM |
| 787 | - |
| 788 | -where SYSTEM can have one of these forms: |
| 789 | - |
| 790 | - OS KERNEL-OS |
| 791 | - |
| 792 | - See the file `config.sub' for the possible values of each field. If |
| 793 | -`config.sub' isn't included in this package, then this package doesn't |
| 794 | -need to know the machine type. |
| 795 | - |
| 796 | - If you are _building_ compiler tools for cross-compiling, you should |
| 797 | -use the option `--target=TYPE' to select the type of system they will |
| 798 | -produce code for. |
| 799 | - |
| 800 | - If you want to _use_ a cross compiler, that generates code for a |
| 801 | -platform different from the build platform, you should specify the |
| 802 | -"host" platform (i.e., that on which the generated programs will |
| 803 | -eventually be run) with `--host=TYPE'. |
| 804 | - |
| 805 | -Sharing Defaults |
| 806 | -================ |
| 807 | - |
| 808 | -If you want to set default values for `configure' scripts to share, you |
| 809 | -can create a site shell script called `config.site' that gives default |
| 810 | -values for variables like `CC', `cache_file', and `prefix'. |
| 811 | -`configure' looks for `PREFIX/share/config.site' if it exists, then |
| 812 | -`PREFIX/etc/config.site' if it exists. Or, you can set the |
| 813 | -`CONFIG_SITE' environment variable to the location of the site script. |
| 814 | -A warning: not all `configure' scripts look for a site script. |
| 815 | - |
| 816 | -Defining Variables |
| 817 | -================== |
| 818 | - |
| 819 | -Variables not defined in a site shell script can be set in the |
| 820 | -environment passed to `configure'. However, some packages may run |
| 821 | -configure again during the build, and the customized values of these |
| 822 | -variables may be lost. In order to avoid this problem, you should set |
| 823 | -them in the `configure' command line, using `VAR=value'. For example: |
| 824 | - |
| 825 | - ./configure CC=/usr/local2/bin/gcc |
| 826 | - |
| 827 | -causes the specified `gcc' to be used as the C compiler (unless it is |
| 828 | -overridden in the site shell script). Here is a another example: |
| 829 | - |
| 830 | - /bin/bash ./configure CONFIG_SHELL=/bin/bash |
| 831 | - |
| 832 | -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent |
| 833 | -configuration-related scripts to be executed by `/bin/bash'. |
| 834 | - |
| 835 | -`configure' Invocation |
| 836 | -====================== |
| 837 | - |
| 838 | -`configure' recognizes the following options to control how it operates. |
| 839 | - |
| 840 | -`--help' |
| 841 | -`-h' |
| 842 | - Print a summary of the options to `configure', and exit. |
| 843 | - |
| 844 | -`--version' |
| 845 | -`-V' |
| 846 | - Print the version of Autoconf used to generate the `configure' |
| 847 | - script, and exit. |
| 848 | - |
| 849 | -`--cache-file=FILE' |
| 850 | - Enable the cache: use and save the results of the tests in FILE, |
| 851 | - traditionally `config.cache'. FILE defaults to `/dev/null' to |
| 852 | - disable caching. |
| 853 | - |
| 854 | -`--config-cache' |
| 855 | -`-C' |
| 856 | - Alias for `--cache-file=config.cache'. |
| 857 | - |
| 858 | -`--quiet' |
| 859 | -`--silent' |
| 860 | -`-q' |
| 861 | - Do not print messages saying which checks are being made. To |
| 862 | - suppress all normal output, redirect it to `/dev/null' (any error |
| 863 | - messages will still be shown). |
| 864 | - |
| 865 | -`--srcdir=DIR' |
| 866 | - Look for the package's source code in directory DIR. Usually |
| 867 | - `configure' can determine that directory automatically. |
| 868 | - |
| 869 | -`configure' also accepts some other, not widely useful, options. Run |
| 870 | -`configure --help' for more details. |
| 871 | - |
| 872 | |
| 873 | === removed file 'compizconfig/gconf/README' |
| 874 | === removed directory 'compizconfig/gconf/src' |
| 875 | === removed file 'compizconfig/gconf/src/gconf.c' |
| 876 | --- compizconfig/gconf/src/gconf.c 2013-05-13 13:23:20 +0000 |
| 877 | +++ compizconfig/gconf/src/gconf.c 1970-01-01 00:00:00 +0000 |
| 878 | @@ -1,1270 +0,0 @@ |
| 879 | -/** |
| 880 | - * |
| 881 | - * GConf libccs backend |
| 882 | - * |
| 883 | - * gconf.c |
| 884 | - * |
| 885 | - * Copyright (c) 2007 Danny Baumann <maniac@opencompositing.org> |
| 886 | - * |
| 887 | - * Parts of this code are taken from libberylsettings |
| 888 | - * gconf backend, written by: |
| 889 | - * |
| 890 | - * Copyright (c) 2006 Robert Carr <racarr@opencompositing.org> |
| 891 | - * Copyright (c) 2007 Dennis Kasprzyk <onestone@opencompositing.org> |
| 892 | - * |
| 893 | - * This program is free software; you can redistribute it and/or |
| 894 | - * modify it under the terms of the GNU General Public License |
| 895 | - * as published by the Free Software Foundation; either version 2 |
| 896 | - * of the License, or (at your option) any later version. |
| 897 | - * |
| 898 | - * This program is distributed in the hope that it will be useful, |
| 899 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 900 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 901 | - * GNU General Public License for more details. |
| 902 | - * |
| 903 | - **/ |
| 904 | - |
| 905 | -#define CCS_LOG_DOMAIN "gconf" |
| 906 | - |
| 907 | -#define _GNU_SOURCE |
| 908 | -#include <stdio.h> |
| 909 | -#include <stdlib.h> |
| 910 | -#include <string.h> |
| 911 | -#include <malloc.h> |
| 912 | -#include <string.h> |
| 913 | -#include <dirent.h> |
| 914 | - |
| 915 | -#include <ccs.h> |
| 916 | -#include <ccs-backend.h> |
| 917 | - |
| 918 | -#include <X11/X.h> |
| 919 | -#include <X11/Xlib.h> |
| 920 | - |
| 921 | -#include <gconf/gconf.h> |
| 922 | -#include <gconf/gconf-client.h> |
| 923 | -#include <gconf/gconf-value.h> |
| 924 | - |
| 925 | -#include "ccs_gnome_integration.h" |
| 926 | -#include "ccs_gnome_integration_gconf_integrated_setting_factory.h" |
| 927 | - |
| 928 | -#define COMPIZ "/apps/compiz-1" |
| 929 | -#define COMPIZCONFIG "/apps/compizconfig-1" |
| 930 | -#define PROFILEPATH COMPIZCONFIG "/profiles" |
| 931 | -#define DEFAULTPROF "Default" |
| 932 | -#define CORE_NAME "core" |
| 933 | - |
| 934 | -#define BUFSIZE 512 |
| 935 | - |
| 936 | -#define KEYNAME(sn) char keyName[BUFSIZE]; \ |
| 937 | - snprintf (keyName, BUFSIZE, "screen%i", sn); |
| 938 | - |
| 939 | -#define PATHNAME char pathName[BUFSIZE]; \ |
| 940 | - if (!ccsPluginGetName (ccsSettingGetParent (setting)) || \ |
| 941 | - strcmp (ccsPluginGetName (ccsSettingGetParent (setting)), "core") == 0) \ |
| 942 | - snprintf (pathName, BUFSIZE, \ |
| 943 | - "%s/general/%s/options/%s", COMPIZ, \ |
| 944 | - keyName, ccsSettingGetName (setting)); \ |
| 945 | - else \ |
| 946 | - snprintf(pathName, BUFSIZE, \ |
| 947 | - "%s/plugins/%s/%s/options/%s", COMPIZ, \ |
| 948 | - ccsPluginGetName (ccsSettingGetParent (setting)), keyName, ccsSettingGetName (setting)); |
| 949 | - |
| 950 | -static GConfClient *client = NULL; |
| 951 | -static GConfEngine *conf = NULL; |
| 952 | -static guint compizNotifyId; |
| 953 | -static char *currentProfile = NULL; |
| 954 | -static CCSGNOMEValueChangeData valueChangeData = |
| 955 | -{ |
| 956 | - NULL, |
| 957 | - NULL, |
| 958 | - NULL, |
| 959 | - NULL |
| 960 | -}; |
| 961 | - |
| 962 | -/* some forward declarations */ |
| 963 | -static Bool readInit (CCSBackend *backend, CCSContext * context); |
| 964 | -static void readSetting (CCSBackend *backend, CCSContext * context, CCSSetting * setting); |
| 965 | -static Bool readOption (CCSSetting * setting); |
| 966 | -static Bool writeInit (CCSBackend *backend, CCSContext * context); |
| 967 | -static void writeIntegratedOption (CCSContext *context, CCSSetting *setting, CCSIntegratedSetting *integrated); |
| 968 | - |
| 969 | -static Bool |
| 970 | -isIntegratedOption (CCSSetting *setting, |
| 971 | - CCSIntegratedSetting **integrated) |
| 972 | -{ |
| 973 | - CCSPlugin *plugin = ccsSettingGetParent (setting); |
| 974 | - const char *pluginName = ccsPluginGetName (plugin); |
| 975 | - const char *settingName = ccsSettingGetName (setting); |
| 976 | - CCSIntegratedSetting *tmp = ccsIntegrationGetIntegratedSetting (valueChangeData.integration, pluginName, settingName); |
| 977 | - |
| 978 | - if (integrated) |
| 979 | - *integrated = tmp; |
| 980 | - |
| 981 | - return tmp != NULL; |
| 982 | -} |
| 983 | - |
| 984 | -static void |
| 985 | -updateSetting (CCSBackend *backend, CCSContext *context, CCSPlugin *plugin, CCSSetting *setting) |
| 986 | -{ |
| 987 | - CCSIntegratedSetting *integrated; |
| 988 | - readInit (backend, context); |
| 989 | - if (!readOption (setting)) |
| 990 | - ccsResetToDefault (setting, TRUE); |
| 991 | - |
| 992 | - if (ccsGetIntegrationEnabled (context) && |
| 993 | - isIntegratedOption (setting, &integrated)) |
| 994 | - { |
| 995 | - writeInit (backend, context); |
| 996 | - writeIntegratedOption (context, setting, integrated); |
| 997 | - } |
| 998 | -} |
| 999 | - |
| 1000 | -static void |
| 1001 | -valueChanged (GConfClient *client, |
| 1002 | - guint cnxn_id, |
| 1003 | - GConfEntry *entry, |
| 1004 | - gpointer user_data) |
| 1005 | -{ |
| 1006 | - CCSContext *context = (CCSContext *)user_data; |
| 1007 | - char *keyName = (char*) gconf_entry_get_key (entry); |
| 1008 | - char *pluginName; |
| 1009 | - char *token; |
| 1010 | - unsigned int screenNum; |
| 1011 | - CCSPlugin *plugin; |
| 1012 | - CCSSetting *setting; |
| 1013 | - |
| 1014 | - keyName += strlen (COMPIZ) + 1; |
| 1015 | - |
| 1016 | - token = strsep (&keyName, "/"); /* plugin */ |
| 1017 | - if (!token) |
| 1018 | - return; |
| 1019 | - |
| 1020 | - if (strcmp (token, "general") == 0) |
| 1021 | - { |
| 1022 | - pluginName = "core"; |
| 1023 | - } |
| 1024 | - else |
| 1025 | - { |
| 1026 | - token = strsep (&keyName, "/"); |
| 1027 | - if (!token) |
| 1028 | - return; |
| 1029 | - pluginName = token; |
| 1030 | - } |
| 1031 | - |
| 1032 | - plugin = ccsFindPlugin (context, pluginName); |
| 1033 | - if (!plugin) |
| 1034 | - return; |
| 1035 | - |
| 1036 | - token = strsep (&keyName, "/"); |
| 1037 | - if (!token) |
| 1038 | - return; |
| 1039 | - |
| 1040 | - sscanf (token, "screen%d", &screenNum); |
| 1041 | - |
| 1042 | - token = strsep (&keyName, "/"); /* 'options' */ |
| 1043 | - if (!token) |
| 1044 | - return; |
| 1045 | - |
| 1046 | - token = strsep (&keyName, "/"); |
| 1047 | - if (!token) |
| 1048 | - return; |
| 1049 | - |
| 1050 | - setting = ccsFindSetting (plugin, token); |
| 1051 | - if (!setting) |
| 1052 | - return; |
| 1053 | - |
| 1054 | - /* Passing null here is not optimal, but we are not |
| 1055 | - * maintaining gconf actively here */ |
| 1056 | - updateSetting (NULL, context, plugin, setting); |
| 1057 | -} |
| 1058 | - |
| 1059 | -static void |
| 1060 | -initClient (CCSBackend *backend, CCSContext *context) |
| 1061 | -{ |
| 1062 | - client = gconf_client_get_for_engine (conf); |
| 1063 | - |
| 1064 | - valueChangeData.context = context; |
| 1065 | - valueChangeData.storage = ccsIntegratedSettingsStorageDefaultImplNew (&ccsDefaultObjectAllocator); |
| 1066 | - valueChangeData.factory = ccsGConfIntegratedSettingFactoryNew (client, &valueChangeData, &ccsDefaultObjectAllocator); |
| 1067 | - |
| 1068 | - valueChangeData.integration = ccsGNOMEIntegrationBackendNew (backend, |
| 1069 | - context, |
| 1070 | - valueChangeData.factory, |
| 1071 | - valueChangeData.storage, |
| 1072 | - &ccsDefaultObjectAllocator); |
| 1073 | - |
| 1074 | - compizNotifyId = gconf_client_notify_add (client, COMPIZ, valueChanged, |
| 1075 | - context, NULL, NULL); |
| 1076 | - gconf_client_add_dir (client, COMPIZ, GCONF_CLIENT_PRELOAD_NONE, NULL); |
| 1077 | -} |
| 1078 | - |
| 1079 | -static void |
| 1080 | -finiClient (void) |
| 1081 | -{ |
| 1082 | - ccsIntegrationUnref (valueChangeData.integration); |
| 1083 | - |
| 1084 | - if (compizNotifyId) |
| 1085 | - { |
| 1086 | - gconf_client_notify_remove (client, compizNotifyId); |
| 1087 | - compizNotifyId = 0; |
| 1088 | - } |
| 1089 | - gconf_client_remove_dir (client, COMPIZ, NULL); |
| 1090 | - gconf_client_suggest_sync (client, NULL); |
| 1091 | - |
| 1092 | - g_object_unref (client); |
| 1093 | - client = NULL; |
| 1094 | - |
| 1095 | - memset (&valueChangeData, 0, sizeof (CCSGNOMEValueChangeData)); |
| 1096 | -} |
| 1097 | - |
| 1098 | -static void |
| 1099 | -copyGconfValues (GConfEngine *conf, |
| 1100 | - const gchar *from, |
| 1101 | - const gchar *to, |
| 1102 | - Bool associate, |
| 1103 | - const gchar *schemaPath) |
| 1104 | -{ |
| 1105 | - GSList *values, *tmp; |
| 1106 | - GError *err = NULL; |
| 1107 | - |
| 1108 | - values = gconf_engine_all_entries (conf, from, &err); |
| 1109 | - tmp = values; |
| 1110 | - |
| 1111 | - while (tmp) |
| 1112 | - { |
| 1113 | - GConfEntry *entry = tmp->data; |
| 1114 | - const char *key = gconf_entry_get_key (entry); |
| 1115 | - char *name, *newKey, *newSchema = NULL; |
| 1116 | - |
| 1117 | - name = strrchr (key, '/'); |
| 1118 | - if (!name) |
| 1119 | - continue; |
| 1120 | - |
| 1121 | - if (to) |
| 1122 | - { |
| 1123 | - GConfValue *value; |
| 1124 | - |
| 1125 | - if (asprintf (&newKey, "%s/%s", to, name + 1) == -1) |
| 1126 | - newKey = NULL; |
| 1127 | - |
| 1128 | - if (associate && schemaPath) |
| 1129 | - if (asprintf (&newSchema, "%s/%s", schemaPath, name + 1) == -1) |
| 1130 | - newSchema = NULL; |
| 1131 | - |
| 1132 | - if (newKey && newSchema) |
| 1133 | - gconf_engine_associate_schema (conf, newKey, newSchema, NULL); |
| 1134 | - |
| 1135 | - if (newKey) |
| 1136 | - { |
| 1137 | - value = gconf_engine_get_without_default (conf, key, NULL); |
| 1138 | - if (value) |
| 1139 | - { |
| 1140 | - gconf_engine_set (conf, newKey, value, NULL); |
| 1141 | - gconf_value_free (value); |
| 1142 | - } |
| 1143 | - } |
| 1144 | - |
| 1145 | - if (newSchema) |
| 1146 | - free (newSchema); |
| 1147 | - if (newKey) |
| 1148 | - free (newKey); |
| 1149 | - } |
| 1150 | - else |
| 1151 | - { |
| 1152 | - if (associate) |
| 1153 | - gconf_engine_associate_schema (conf, key, NULL, NULL); |
| 1154 | - gconf_engine_unset (conf, key, NULL); |
| 1155 | - } |
| 1156 | - |
| 1157 | - gconf_entry_unref (entry); |
| 1158 | - tmp = g_slist_next (tmp); |
| 1159 | - } |
| 1160 | - |
| 1161 | - if (values) |
| 1162 | - g_slist_free (values); |
| 1163 | -} |
| 1164 | - |
| 1165 | -static void |
| 1166 | -copyGconfRecursively (GConfEngine *conf, |
| 1167 | - GSList *subdirs, |
| 1168 | - const gchar *to, |
| 1169 | - Bool associate, |
| 1170 | - const gchar *schemaPath) |
| 1171 | -{ |
| 1172 | - GSList* tmp; |
| 1173 | - |
| 1174 | - tmp = subdirs; |
| 1175 | - |
| 1176 | - while (tmp) |
| 1177 | - { |
| 1178 | - gchar *path = tmp->data; |
| 1179 | - char *newKey, *newSchema = NULL, *name; |
| 1180 | - |
| 1181 | - name = strrchr (path, '/'); |
| 1182 | - if (name) |
| 1183 | - { |
| 1184 | - if (!(to && asprintf (&newKey, "%s/%s", to, name + 1) != -1)) |
| 1185 | - newKey = NULL; |
| 1186 | - |
| 1187 | - if (associate && schemaPath) |
| 1188 | - if (asprintf (&newSchema, "%s/%s", schemaPath, name + 1) == -1) |
| 1189 | - newSchema = NULL; |
| 1190 | - |
| 1191 | - copyGconfValues (conf, path, newKey, associate, newSchema); |
| 1192 | - copyGconfRecursively (conf, |
| 1193 | - gconf_engine_all_dirs (conf, path, NULL), |
| 1194 | - newKey, associate, newSchema); |
| 1195 | - |
| 1196 | - if (newSchema) |
| 1197 | - free (newSchema); |
| 1198 | - |
| 1199 | - if (newKey) |
| 1200 | - free (newKey); |
| 1201 | - |
| 1202 | - if (!to) |
| 1203 | - gconf_engine_remove_dir (conf, path, NULL); |
| 1204 | - } |
| 1205 | - |
| 1206 | - g_free (path); |
| 1207 | - tmp = g_slist_next (tmp); |
| 1208 | - } |
| 1209 | - |
| 1210 | - if (subdirs) |
| 1211 | - g_slist_free (subdirs); |
| 1212 | -} |
| 1213 | - |
| 1214 | -static void |
| 1215 | -copyGconfTree (CCSBackend *backend, |
| 1216 | - CCSContext *context, |
| 1217 | - const gchar *from, |
| 1218 | - const gchar *to, |
| 1219 | - Bool associate, |
| 1220 | - const gchar *schemaPath) |
| 1221 | -{ |
| 1222 | - GSList* subdirs; |
| 1223 | - |
| 1224 | - /* we aren't allowed to have an open GConfClient object while |
| 1225 | - using GConfEngine, so shut it down and open it again afterwards */ |
| 1226 | - finiClient (); |
| 1227 | - |
| 1228 | - subdirs = gconf_engine_all_dirs (conf, from, NULL); |
| 1229 | - gconf_engine_suggest_sync (conf, NULL); |
| 1230 | - |
| 1231 | - copyGconfRecursively (conf, subdirs, to, associate, schemaPath); |
| 1232 | - |
| 1233 | - gconf_engine_suggest_sync (conf, NULL); |
| 1234 | - |
| 1235 | - initClient (backend, context); |
| 1236 | -} |
| 1237 | - |
| 1238 | -static Bool |
| 1239 | -readListValue (CCSSetting *setting, |
| 1240 | - GConfValue *gconfValue) |
| 1241 | -{ |
| 1242 | - GConfValueType valueType; |
| 1243 | - unsigned int nItems, i = 0; |
| 1244 | - CCSSettingValueList list = NULL; |
| 1245 | - GSList *valueList = NULL; |
| 1246 | - |
| 1247 | - switch (ccsSettingGetInfo (setting)->forList.listType) |
| 1248 | - { |
| 1249 | - case TypeString: |
| 1250 | - case TypeMatch: |
| 1251 | - case TypeColor: |
| 1252 | - valueType = GCONF_VALUE_STRING; |
| 1253 | - break; |
| 1254 | - case TypeBool: |
| 1255 | - valueType = GCONF_VALUE_BOOL; |
| 1256 | - break; |
| 1257 | - case TypeInt: |
| 1258 | - valueType = GCONF_VALUE_INT; |
| 1259 | - break; |
| 1260 | - case TypeFloat: |
| 1261 | - valueType = GCONF_VALUE_FLOAT; |
| 1262 | - break; |
| 1263 | - default: |
| 1264 | - valueType = GCONF_VALUE_INVALID; |
| 1265 | - break; |
| 1266 | - } |
| 1267 | - |
| 1268 | - if (valueType == GCONF_VALUE_INVALID) |
| 1269 | - return FALSE; |
| 1270 | - |
| 1271 | - if (valueType != gconf_value_get_list_type (gconfValue)) |
| 1272 | - return FALSE; |
| 1273 | - |
| 1274 | - valueList = gconf_value_get_list (gconfValue); |
| 1275 | - if (!valueList) |
| 1276 | - { |
| 1277 | - ccsSetList (setting, NULL, TRUE); |
| 1278 | - return TRUE; |
| 1279 | - } |
| 1280 | - |
| 1281 | - nItems = g_slist_length (valueList); |
| 1282 | - |
| 1283 | - switch (ccsSettingGetInfo (setting)->forList.listType) |
| 1284 | - { |
| 1285 | - case TypeBool: |
| 1286 | - { |
| 1287 | - Bool *array = malloc (nItems * sizeof (Bool)); |
| 1288 | - if (!array) |
| 1289 | - break; |
| 1290 | - |
| 1291 | - for (; valueList; valueList = valueList->next, ++i) |
| 1292 | - array[i] = |
| 1293 | - gconf_value_get_bool (valueList->data) ? TRUE : FALSE; |
| 1294 | - list = ccsGetValueListFromBoolArray (array, nItems, setting); |
| 1295 | - free (array); |
| 1296 | - } |
| 1297 | - break; |
| 1298 | - case TypeInt: |
| 1299 | - { |
| 1300 | - int *array = malloc (nItems * sizeof (int)); |
| 1301 | - if (!array) |
| 1302 | - break; |
| 1303 | - |
| 1304 | - for (; valueList; valueList = valueList->next, ++i) |
| 1305 | - array[i] = gconf_value_get_int (valueList->data); |
| 1306 | - list = ccsGetValueListFromIntArray (array, nItems, setting); |
| 1307 | - free (array); |
| 1308 | - } |
| 1309 | - break; |
| 1310 | - case TypeFloat: |
| 1311 | - { |
| 1312 | - float *array = malloc (nItems * sizeof (float)); |
| 1313 | - if (!array) |
| 1314 | - break; |
| 1315 | - |
| 1316 | - for (; valueList; valueList = valueList->next, ++i) |
| 1317 | - array[i] = gconf_value_get_float (valueList->data); |
| 1318 | - list = ccsGetValueListFromFloatArray (array, nItems, setting); |
| 1319 | - free (array); |
| 1320 | - } |
| 1321 | - break; |
| 1322 | - case TypeString: |
| 1323 | - case TypeMatch: |
| 1324 | - { |
| 1325 | - gchar **array = malloc ((nItems + 1) * sizeof (char*)); |
| 1326 | - if (!array) |
| 1327 | - break; |
| 1328 | - |
| 1329 | - for (; valueList; valueList = valueList->next, ++i) |
| 1330 | - array[i] = strdup (gconf_value_get_string (valueList->data)); |
| 1331 | - |
| 1332 | - array[nItems] = NULL; |
| 1333 | - |
| 1334 | - list = ccsGetValueListFromStringArray ((const char **) array, nItems, setting); |
| 1335 | - g_strfreev (array); |
| 1336 | - } |
| 1337 | - break; |
| 1338 | - case TypeColor: |
| 1339 | - { |
| 1340 | - CCSSettingColorValue *array; |
| 1341 | - array = malloc (nItems * sizeof (CCSSettingColorValue)); |
| 1342 | - if (!array) |
| 1343 | - break; |
| 1344 | - |
| 1345 | - for (; valueList; valueList = valueList->next, ++i) |
| 1346 | - { |
| 1347 | - memset (&array[i], 0, sizeof (CCSSettingColorValue)); |
| 1348 | - ccsStringToColor (gconf_value_get_string (valueList->data), |
| 1349 | - &array[i]); |
| 1350 | - } |
| 1351 | - list = ccsGetValueListFromColorArray (array, nItems, setting); |
| 1352 | - free (array); |
| 1353 | - } |
| 1354 | - break; |
| 1355 | - default: |
| 1356 | - break; |
| 1357 | - } |
| 1358 | - |
| 1359 | - if (list) |
| 1360 | - { |
| 1361 | - ccsSetList (setting, list, TRUE); |
| 1362 | - ccsSettingValueListFree (list, TRUE); |
| 1363 | - return TRUE; |
| 1364 | - } |
| 1365 | - |
| 1366 | - return FALSE; |
| 1367 | -} |
| 1368 | - |
| 1369 | - |
| 1370 | -static Bool |
| 1371 | -readIntegratedOption (CCSContext *context, |
| 1372 | - CCSSetting *setting, |
| 1373 | - CCSIntegratedSetting *integrated) |
| 1374 | -{ |
| 1375 | - return ccsIntegrationReadOptionIntoSetting (valueChangeData.integration, context, setting, integrated); |
| 1376 | -} |
| 1377 | - |
| 1378 | -static Bool |
| 1379 | -readOption (CCSSetting * setting) |
| 1380 | -{ |
| 1381 | - GConfValue *gconfValue = NULL; |
| 1382 | - GError *err = NULL; |
| 1383 | - Bool ret = FALSE; |
| 1384 | - Bool valid = TRUE; |
| 1385 | - |
| 1386 | - KEYNAME (ccsContextGetScreenNum (ccsPluginGetContext (ccsSettingGetParent (setting)))); |
| 1387 | - PATHNAME; |
| 1388 | - |
| 1389 | - /* first check if the key is set */ |
| 1390 | - gconfValue = gconf_client_get_without_default (client, pathName, &err); |
| 1391 | - if (err) |
| 1392 | - { |
| 1393 | - g_error_free (err); |
| 1394 | - return FALSE; |
| 1395 | - } |
| 1396 | - if (!gconfValue) |
| 1397 | - /* value is not set */ |
| 1398 | - return FALSE; |
| 1399 | - |
| 1400 | - /* setting type sanity check */ |
| 1401 | - switch (ccsSettingGetType (setting)) |
| 1402 | - { |
| 1403 | - case TypeString: |
| 1404 | - case TypeMatch: |
| 1405 | - case TypeColor: |
| 1406 | - case TypeKey: |
| 1407 | - case TypeButton: |
| 1408 | - case TypeEdge: |
| 1409 | - valid = (gconfValue->type == GCONF_VALUE_STRING); |
| 1410 | - break; |
| 1411 | - case TypeInt: |
| 1412 | - valid = (gconfValue->type == GCONF_VALUE_INT); |
| 1413 | - break; |
| 1414 | - case TypeBool: |
| 1415 | - case TypeBell: |
| 1416 | - valid = (gconfValue->type == GCONF_VALUE_BOOL); |
| 1417 | - break; |
| 1418 | - case TypeFloat: |
| 1419 | - valid = (gconfValue->type == GCONF_VALUE_FLOAT); |
| 1420 | - break; |
| 1421 | - case TypeList: |
| 1422 | - valid = (gconfValue->type == GCONF_VALUE_LIST); |
| 1423 | - break; |
| 1424 | - default: |
| 1425 | - break; |
| 1426 | - } |
| 1427 | - if (!valid) |
| 1428 | - { |
| 1429 | - ccsWarning ("There is an unsupported value at path %s. " |
| 1430 | - "Settings from this path won't be read. Try to remove " |
| 1431 | - "that value so that operation can continue properly.", |
| 1432 | - pathName); |
| 1433 | - return FALSE; |
| 1434 | - } |
| 1435 | - |
| 1436 | - switch (ccsSettingGetType (setting)) |
| 1437 | - { |
| 1438 | - case TypeString: |
| 1439 | - { |
| 1440 | - const char *value; |
| 1441 | - value = gconf_value_get_string (gconfValue); |
| 1442 | - if (value) |
| 1443 | - { |
| 1444 | - ccsSetString (setting, value, TRUE); |
| 1445 | - ret = TRUE; |
| 1446 | - } |
| 1447 | - } |
| 1448 | - break; |
| 1449 | - case TypeMatch: |
| 1450 | - { |
| 1451 | - const char * value; |
| 1452 | - value = gconf_value_get_string (gconfValue); |
| 1453 | - if (value) |
| 1454 | - { |
| 1455 | - ccsSetMatch (setting, value, TRUE); |
| 1456 | - ret = TRUE; |
| 1457 | - } |
| 1458 | - } |
| 1459 | - break; |
| 1460 | - case TypeInt: |
| 1461 | - { |
| 1462 | - int value; |
| 1463 | - value = gconf_value_get_int (gconfValue); |
| 1464 | - |
| 1465 | - ccsSetInt (setting, value, TRUE); |
| 1466 | - ret = TRUE; |
| 1467 | - } |
| 1468 | - break; |
| 1469 | - case TypeBool: |
| 1470 | - { |
| 1471 | - gboolean value; |
| 1472 | - value = gconf_value_get_bool (gconfValue); |
| 1473 | - |
| 1474 | - ccsSetBool (setting, value ? TRUE : FALSE, TRUE); |
| 1475 | - ret = TRUE; |
| 1476 | - } |
| 1477 | - break; |
| 1478 | - case TypeFloat: |
| 1479 | - { |
| 1480 | - double value; |
| 1481 | - value = gconf_value_get_float (gconfValue); |
| 1482 | - |
| 1483 | - ccsSetFloat (setting, (float)value, TRUE); |
| 1484 | - ret = TRUE; |
| 1485 | - } |
| 1486 | - break; |
| 1487 | - case TypeColor: |
| 1488 | - { |
| 1489 | - const char *value; |
| 1490 | - CCSSettingColorValue color; |
| 1491 | - value = gconf_value_get_string (gconfValue); |
| 1492 | - |
| 1493 | - if (value && ccsStringToColor (value, &color)) |
| 1494 | - { |
| 1495 | - ccsSetColor (setting, color, TRUE); |
| 1496 | - ret = TRUE; |
| 1497 | - } |
| 1498 | - } |
| 1499 | - break; |
| 1500 | - case TypeKey: |
| 1501 | - { |
| 1502 | - const char *value; |
| 1503 | - CCSSettingKeyValue key; |
| 1504 | - value = gconf_value_get_string (gconfValue); |
| 1505 | - |
| 1506 | - if (value && ccsStringToKeyBinding (value, &key)) |
| 1507 | - { |
| 1508 | - ccsSetKey (setting, key, TRUE); |
| 1509 | - ret = TRUE; |
| 1510 | - } |
| 1511 | - } |
| 1512 | - break; |
| 1513 | - case TypeButton: |
| 1514 | - { |
| 1515 | - const char *value; |
| 1516 | - CCSSettingButtonValue button; |
| 1517 | - value = gconf_value_get_string (gconfValue); |
| 1518 | - |
| 1519 | - if (value && ccsStringToButtonBinding (value, &button)) |
| 1520 | - { |
| 1521 | - ccsSetButton (setting, button, TRUE); |
| 1522 | - ret = TRUE; |
| 1523 | - } |
| 1524 | - } |
| 1525 | - break; |
| 1526 | - case TypeEdge: |
| 1527 | - { |
| 1528 | - const char *value; |
| 1529 | - value = gconf_value_get_string (gconfValue); |
| 1530 | - |
| 1531 | - if (value) |
| 1532 | - { |
| 1533 | - unsigned int edges; |
| 1534 | - edges = ccsStringToEdges (value); |
| 1535 | - ccsSetEdge (setting, edges, TRUE); |
| 1536 | - ret = TRUE; |
| 1537 | - } |
| 1538 | - } |
| 1539 | - break; |
| 1540 | - case TypeBell: |
| 1541 | - { |
| 1542 | - gboolean value; |
| 1543 | - value = gconf_value_get_bool (gconfValue); |
| 1544 | - |
| 1545 | - ccsSetBell (setting, value ? TRUE : FALSE, TRUE); |
| 1546 | - ret = TRUE; |
| 1547 | - } |
| 1548 | - break; |
| 1549 | - case TypeList: |
| 1550 | - ret = readListValue (setting, gconfValue); |
| 1551 | - break; |
| 1552 | - default: |
| 1553 | - ccsWarning ("Attempt to read unsupported setting type %d from path %s!", |
| 1554 | - ccsSettingGetType (setting), pathName); |
| 1555 | - break; |
| 1556 | - } |
| 1557 | - |
| 1558 | - if (gconfValue) |
| 1559 | - gconf_value_free (gconfValue); |
| 1560 | - |
| 1561 | - return ret; |
| 1562 | -} |
| 1563 | - |
| 1564 | -static void |
| 1565 | -writeListValue (CCSSetting *setting, |
| 1566 | - char *pathName) |
| 1567 | -{ |
| 1568 | - GSList *valueList = NULL; |
| 1569 | - GConfValueType valueType; |
| 1570 | - Bool freeItems = FALSE; |
| 1571 | - CCSSettingValueList list; |
| 1572 | - gpointer data; |
| 1573 | - |
| 1574 | - if (!ccsGetList (setting, &list)) |
| 1575 | - return; |
| 1576 | - |
| 1577 | - switch (ccsSettingGetInfo (setting)->forList.listType) |
| 1578 | - { |
| 1579 | - case TypeBool: |
| 1580 | - { |
| 1581 | - while (list) |
| 1582 | - { |
| 1583 | - data = GINT_TO_POINTER (list->data->value.asBool); |
| 1584 | - valueList = g_slist_append (valueList, data); |
| 1585 | - list = list->next; |
| 1586 | - } |
| 1587 | - valueType = GCONF_VALUE_BOOL; |
| 1588 | - } |
| 1589 | - break; |
| 1590 | - case TypeInt: |
| 1591 | - { |
| 1592 | - while (list) |
| 1593 | - { |
| 1594 | - data = GINT_TO_POINTER (list->data->value.asInt); |
| 1595 | - valueList = g_slist_append(valueList, data); |
| 1596 | - list = list->next; |
| 1597 | - } |
| 1598 | - valueType = GCONF_VALUE_INT; |
| 1599 | - } |
| 1600 | - break; |
| 1601 | - case TypeFloat: |
| 1602 | - { |
| 1603 | - gdouble *item; |
| 1604 | - while (list) |
| 1605 | - { |
| 1606 | - item = malloc (sizeof (gdouble)); |
| 1607 | - if (item) |
| 1608 | - { |
| 1609 | - *item = list->data->value.asFloat; |
| 1610 | - valueList = g_slist_append (valueList, item); |
| 1611 | - } |
| 1612 | - list = list->next; |
| 1613 | - } |
| 1614 | - freeItems = TRUE; |
| 1615 | - valueType = GCONF_VALUE_FLOAT; |
| 1616 | - } |
| 1617 | - break; |
| 1618 | - case TypeString: |
| 1619 | - { |
| 1620 | - while (list) |
| 1621 | - { |
| 1622 | - valueList = g_slist_append(valueList, |
| 1623 | - list->data->value.asString); |
| 1624 | - list = list->next; |
| 1625 | - } |
| 1626 | - valueType = GCONF_VALUE_STRING; |
| 1627 | - } |
| 1628 | - break; |
| 1629 | - case TypeMatch: |
| 1630 | - { |
| 1631 | - while (list) |
| 1632 | - { |
| 1633 | - valueList = g_slist_append(valueList, |
| 1634 | - list->data->value.asMatch); |
| 1635 | - list = list->next; |
| 1636 | - } |
| 1637 | - valueType = GCONF_VALUE_STRING; |
| 1638 | - } |
| 1639 | - break; |
| 1640 | - case TypeColor: |
| 1641 | - { |
| 1642 | - char *item; |
| 1643 | - while (list) |
| 1644 | - { |
| 1645 | - item = ccsColorToString (&list->data->value.asColor); |
| 1646 | - valueList = g_slist_append (valueList, item); |
| 1647 | - list = list->next; |
| 1648 | - } |
| 1649 | - freeItems = TRUE; |
| 1650 | - valueType = GCONF_VALUE_STRING; |
| 1651 | - } |
| 1652 | - break; |
| 1653 | - default: |
| 1654 | - ccsWarning ("Attempt to write unsupported list type %d at path %s!", |
| 1655 | - ccsSettingGetInfo (setting)->forList.listType, pathName); |
| 1656 | - valueType = GCONF_VALUE_INVALID; |
| 1657 | - break; |
| 1658 | - } |
| 1659 | - |
| 1660 | - if (valueType != GCONF_VALUE_INVALID) |
| 1661 | - { |
| 1662 | - gconf_client_set_list (client, pathName, valueType, valueList, NULL); |
| 1663 | - |
| 1664 | - if (freeItems) |
| 1665 | - { |
| 1666 | - GSList *tmpList = valueList; |
| 1667 | - for (; tmpList; tmpList = tmpList->next) |
| 1668 | - if (tmpList->data) |
| 1669 | - free (tmpList->data); |
| 1670 | - } |
| 1671 | - } |
| 1672 | - if (valueList) |
| 1673 | - g_slist_free (valueList); |
| 1674 | -} |
| 1675 | - |
| 1676 | -static void |
| 1677 | -writeIntegratedOption (CCSContext *context, |
| 1678 | - CCSSetting *setting, |
| 1679 | - CCSIntegratedSetting *integrated) |
| 1680 | -{ |
| 1681 | - ccsIntegrationWriteSettingIntoOption (valueChangeData.integration, context, setting, integrated); |
| 1682 | -} |
| 1683 | - |
| 1684 | -static void |
| 1685 | -resetOptionToDefault (CCSSetting * setting) |
| 1686 | -{ |
| 1687 | - KEYNAME (ccsContextGetScreenNum (ccsPluginGetContext (ccsSettingGetParent (setting)))); |
| 1688 | - PATHNAME; |
| 1689 | - |
| 1690 | - gconf_client_recursive_unset (client, pathName, 0, NULL); |
| 1691 | - gconf_client_suggest_sync (client, NULL); |
| 1692 | -} |
| 1693 | - |
| 1694 | -static void |
| 1695 | -writeOption (CCSSetting * setting) |
| 1696 | -{ |
| 1697 | - KEYNAME (ccsContextGetScreenNum (ccsPluginGetContext (ccsSettingGetParent (setting)))); |
| 1698 | - PATHNAME; |
| 1699 | - |
| 1700 | - switch (ccsSettingGetType (setting)) |
| 1701 | - { |
| 1702 | - case TypeString: |
| 1703 | - { |
| 1704 | - const char *value; |
| 1705 | - if (ccsGetString (setting, &value)) |
| 1706 | - gconf_client_set_string (client, pathName, value, NULL); |
| 1707 | - } |
| 1708 | - break; |
| 1709 | - case TypeMatch: |
| 1710 | - { |
| 1711 | - const char *value; |
| 1712 | - if (ccsGetMatch (setting, &value)) |
| 1713 | - gconf_client_set_string (client, pathName, value, NULL); |
| 1714 | - } |
| 1715 | - case TypeFloat: |
| 1716 | - { |
| 1717 | - float value; |
| 1718 | - if (ccsGetFloat (setting, &value)) |
| 1719 | - gconf_client_set_float (client, pathName, value, NULL); |
| 1720 | - } |
| 1721 | - break; |
| 1722 | - case TypeInt: |
| 1723 | - { |
| 1724 | - int value; |
| 1725 | - if (ccsGetInt (setting, &value)) |
| 1726 | - gconf_client_set_int (client, pathName, value, NULL); |
| 1727 | - } |
| 1728 | - break; |
| 1729 | - case TypeBool: |
| 1730 | - { |
| 1731 | - Bool value; |
| 1732 | - if (ccsGetBool (setting, &value)) |
| 1733 | - gconf_client_set_bool (client, pathName, value, NULL); |
| 1734 | - } |
| 1735 | - break; |
| 1736 | - case TypeColor: |
| 1737 | - { |
| 1738 | - CCSSettingColorValue value; |
| 1739 | - char *colString; |
| 1740 | - |
| 1741 | - if (!ccsGetColor (setting, &value)) |
| 1742 | - break; |
| 1743 | - |
| 1744 | - colString = ccsColorToString (&value); |
| 1745 | - if (!colString) |
| 1746 | - break; |
| 1747 | - |
| 1748 | - gconf_client_set_string (client, pathName, colString, NULL); |
| 1749 | - free (colString); |
| 1750 | - } |
| 1751 | - break; |
| 1752 | - case TypeKey: |
| 1753 | - { |
| 1754 | - CCSSettingKeyValue key; |
| 1755 | - char *keyString; |
| 1756 | - |
| 1757 | - if (!ccsGetKey (setting, &key)) |
| 1758 | - break; |
| 1759 | - |
| 1760 | - keyString = ccsKeyBindingToString (&key); |
| 1761 | - if (!keyString) |
| 1762 | - break; |
| 1763 | - |
| 1764 | - gconf_client_set_string (client, pathName, keyString, NULL); |
| 1765 | - free (keyString); |
| 1766 | - } |
| 1767 | - break; |
| 1768 | - case TypeButton: |
| 1769 | - { |
| 1770 | - CCSSettingButtonValue button; |
| 1771 | - char *buttonString; |
| 1772 | - |
| 1773 | - if (!ccsGetButton (setting, &button)) |
| 1774 | - break; |
| 1775 | - |
| 1776 | - buttonString = ccsButtonBindingToString (&button); |
| 1777 | - if (!buttonString) |
| 1778 | - break; |
| 1779 | - |
| 1780 | - gconf_client_set_string (client, pathName, buttonString, NULL); |
| 1781 | - free (buttonString); |
| 1782 | - } |
| 1783 | - break; |
| 1784 | - case TypeEdge: |
| 1785 | - { |
| 1786 | - unsigned int edges; |
| 1787 | - char *edgeString; |
| 1788 | - |
| 1789 | - if (!ccsGetEdge (setting, &edges)) |
| 1790 | - break; |
| 1791 | - |
| 1792 | - edgeString = ccsEdgesToString (edges); |
| 1793 | - if (!edgeString) |
| 1794 | - break; |
| 1795 | - |
| 1796 | - gconf_client_set_string (client, pathName, edgeString, NULL); |
| 1797 | - free (edgeString); |
| 1798 | - } |
| 1799 | - break; |
| 1800 | - case TypeBell: |
| 1801 | - { |
| 1802 | - Bool value; |
| 1803 | - if (ccsGetBell (setting, &value)) |
| 1804 | - gconf_client_set_bool (client, pathName, value, NULL); |
| 1805 | - } |
| 1806 | - break; |
| 1807 | - case TypeList: |
| 1808 | - writeListValue (setting, pathName); |
| 1809 | - break; |
| 1810 | - default: |
| 1811 | - ccsWarning ("Attempt to write unsupported setting type %d", |
| 1812 | - ccsSettingGetType (setting)); |
| 1813 | - break; |
| 1814 | - } |
| 1815 | -} |
| 1816 | - |
| 1817 | -static void |
| 1818 | -updateCurrentProfileName (char *profile) |
| 1819 | -{ |
| 1820 | - GConfSchema *schema; |
| 1821 | - GConfValue *value; |
| 1822 | - |
| 1823 | - schema = gconf_schema_new (); |
| 1824 | - if (!schema) |
| 1825 | - return; |
| 1826 | - |
| 1827 | - value = gconf_value_new (GCONF_VALUE_STRING); |
| 1828 | - if (!value) |
| 1829 | - { |
| 1830 | - gconf_schema_free (schema); |
| 1831 | - return; |
| 1832 | - } |
| 1833 | - |
| 1834 | - gconf_schema_set_type (schema, GCONF_VALUE_STRING); |
| 1835 | - gconf_schema_set_locale (schema, "C"); |
| 1836 | - gconf_schema_set_short_desc (schema, "Current profile"); |
| 1837 | - gconf_schema_set_long_desc (schema, "Current profile of gconf backend"); |
| 1838 | - gconf_schema_set_owner (schema, "compizconfig-1"); |
| 1839 | - gconf_value_set_string (value, profile); |
| 1840 | - gconf_schema_set_default_value (schema, value); |
| 1841 | - |
| 1842 | - gconf_client_set_schema (client, COMPIZCONFIG "/current_profile", |
| 1843 | - schema, NULL); |
| 1844 | - |
| 1845 | - gconf_schema_free (schema); |
| 1846 | - gconf_value_free (value); |
| 1847 | -} |
| 1848 | - |
| 1849 | -static char* |
| 1850 | -getCurrentProfileName (void) |
| 1851 | -{ |
| 1852 | - GConfSchema *schema = NULL; |
| 1853 | - |
| 1854 | - schema = gconf_client_get_schema (client, |
| 1855 | - COMPIZCONFIG "/current_profile", NULL); |
| 1856 | - |
| 1857 | - if (schema) |
| 1858 | - { |
| 1859 | - GConfValue *value; |
| 1860 | - char *ret = NULL; |
| 1861 | - |
| 1862 | - value = gconf_schema_get_default_value (schema); |
| 1863 | - if (value) |
| 1864 | - ret = strdup (gconf_value_get_string (value)); |
| 1865 | - gconf_schema_free (schema); |
| 1866 | - |
| 1867 | - return ret; |
| 1868 | - } |
| 1869 | - |
| 1870 | - return NULL; |
| 1871 | -} |
| 1872 | - |
| 1873 | -static Bool |
| 1874 | -checkProfile (CCSBackend *backend, |
| 1875 | - CCSContext *context) |
| 1876 | -{ |
| 1877 | - const char *profileCCS; |
| 1878 | - char *lastProfile; |
| 1879 | - |
| 1880 | - lastProfile = currentProfile; |
| 1881 | - |
| 1882 | - profileCCS = ccsGetProfile (context); |
| 1883 | - if (!profileCCS || !strlen (profileCCS)) |
| 1884 | - currentProfile = strdup (DEFAULTPROF); |
| 1885 | - else |
| 1886 | - currentProfile = strdup (profileCCS); |
| 1887 | - |
| 1888 | - if (!lastProfile || strcmp (lastProfile, currentProfile) != 0) |
| 1889 | - { |
| 1890 | - char *pathName; |
| 1891 | - |
| 1892 | - if (lastProfile) |
| 1893 | - { |
| 1894 | - /* copy /apps/compiz-1 tree to profile path */ |
| 1895 | - if (asprintf (&pathName, "%s/%s", PROFILEPATH, lastProfile) == -1) |
| 1896 | - pathName = NULL; |
| 1897 | - |
| 1898 | - if (pathName) |
| 1899 | - { |
| 1900 | - copyGconfTree (backend, |
| 1901 | - context, COMPIZ, pathName, |
| 1902 | - TRUE, "/schemas" COMPIZ); |
| 1903 | - free (pathName); |
| 1904 | - } |
| 1905 | - } |
| 1906 | - |
| 1907 | - /* reset /apps/compiz-1 tree */ |
| 1908 | - gconf_client_recursive_unset (client, COMPIZ, 0, NULL); |
| 1909 | - |
| 1910 | - /* copy new profile tree to /apps/compiz-1 */ |
| 1911 | - if (asprintf (&pathName, "%s/%s", PROFILEPATH, currentProfile) == -1) |
| 1912 | - pathName = NULL; |
| 1913 | - |
| 1914 | - if (pathName) |
| 1915 | - { |
| 1916 | - copyGconfTree (backend, context, pathName, COMPIZ, FALSE, NULL); |
| 1917 | - |
| 1918 | - /* delete the new profile tree in /apps/compizconfig-1 |
| 1919 | - to avoid user modification in the wrong tree */ |
| 1920 | - copyGconfTree (backend, context, pathName, NULL, TRUE, NULL); |
| 1921 | - free (pathName); |
| 1922 | - } |
| 1923 | - |
| 1924 | - /* update current profile name */ |
| 1925 | - updateCurrentProfileName (currentProfile); |
| 1926 | - } |
| 1927 | - |
| 1928 | - if (lastProfile) |
| 1929 | - free (lastProfile); |
| 1930 | - |
| 1931 | - return TRUE; |
| 1932 | -} |
| 1933 | - |
| 1934 | -static void |
| 1935 | -processEvents (CCSBackend *backend, unsigned int flags) |
| 1936 | -{ |
| 1937 | - if (!(flags & ProcessEventsNoGlibMainLoopMask)) |
| 1938 | - { |
| 1939 | - while (g_main_context_pending(NULL)) |
| 1940 | - g_main_context_iteration(NULL, FALSE); |
| 1941 | - } |
| 1942 | -} |
| 1943 | - |
| 1944 | -static Bool |
| 1945 | -initBackend (CCSBackend *backend, CCSContext * context) |
| 1946 | -{ |
| 1947 | - g_type_init (); |
| 1948 | - |
| 1949 | - conf = gconf_engine_get_default (); |
| 1950 | - initClient (backend, context); |
| 1951 | - |
| 1952 | - currentProfile = getCurrentProfileName (); |
| 1953 | - |
| 1954 | - return TRUE; |
| 1955 | -} |
| 1956 | - |
| 1957 | -static Bool |
| 1958 | -finiBackend (CCSBackend *backend) |
| 1959 | -{ |
| 1960 | - gconf_client_clear_cache (client); |
| 1961 | - finiClient (); |
| 1962 | - |
| 1963 | - if (currentProfile) |
| 1964 | - { |
| 1965 | - free (currentProfile); |
| 1966 | - currentProfile = NULL; |
| 1967 | - } |
| 1968 | - |
| 1969 | - gconf_engine_unref (conf); |
| 1970 | - conf = NULL; |
| 1971 | - |
| 1972 | - return TRUE; |
| 1973 | -} |
| 1974 | - |
| 1975 | -static Bool |
| 1976 | -readInit (CCSBackend *backend, CCSContext * context) |
| 1977 | -{ |
| 1978 | - return checkProfile (backend, context); |
| 1979 | -} |
| 1980 | - |
| 1981 | -static void |
| 1982 | -readSetting (CCSBackend *backend, |
| 1983 | - CCSContext *context, |
| 1984 | - CCSSetting *setting) |
| 1985 | -{ |
| 1986 | - Bool status; |
| 1987 | - CCSIntegratedSetting *integrated; |
| 1988 | - |
| 1989 | - if (ccsGetIntegrationEnabled (context) && |
| 1990 | - isIntegratedOption (setting, &integrated)) |
| 1991 | - { |
| 1992 | - status = readIntegratedOption (context, setting, integrated); |
| 1993 | - } |
| 1994 | - else |
| 1995 | - status = readOption (setting); |
| 1996 | - |
| 1997 | - if (!status) |
| 1998 | - ccsResetToDefault (setting, TRUE); |
| 1999 | -} |
| 2000 | - |
| 2001 | -static Bool |
| 2002 | -writeInit (CCSBackend *backend, CCSContext * context) |
| 2003 | -{ |
| 2004 | - return checkProfile (backend, context); |
| 2005 | -} |
| 2006 | - |
| 2007 | -static void |
| 2008 | -writeSetting (CCSBackend *backend, |
| 2009 | - CCSContext *context, |
| 2010 | - CCSSetting *setting) |
| 2011 | -{ |
| 2012 | - CCSIntegratedSetting *integrated; |
| 2013 | - |
| 2014 | - if (ccsGetIntegrationEnabled (context) && |
| 2015 | - isIntegratedOption (setting, &integrated)) |
| 2016 | - { |
| 2017 | - writeIntegratedOption (context, setting, integrated); |
| 2018 | - } |
| 2019 | - else if (ccsSettingGetIsDefault (setting)) |
| 2020 | - { |
| 2021 | - resetOptionToDefault (setting); |
| 2022 | - } |
| 2023 | - else |
| 2024 | - writeOption (setting); |
| 2025 | - |
| 2026 | -} |
| 2027 | - |
| 2028 | -static Bool |
| 2029 | -getSettingIsIntegrated (CCSBackend *backend, CCSSetting * setting) |
| 2030 | -{ |
| 2031 | - if (!ccsGetIntegrationEnabled (ccsPluginGetContext (ccsSettingGetParent (setting)))) |
| 2032 | - return FALSE; |
| 2033 | - |
| 2034 | - if (!isIntegratedOption (setting, NULL)) |
| 2035 | - return FALSE; |
| 2036 | - |
| 2037 | - return TRUE; |
| 2038 | -} |
| 2039 | - |
| 2040 | -static Bool |
| 2041 | -getSettingIsReadOnly (CCSBackend *backend, CCSSetting * setting) |
| 2042 | -{ |
| 2043 | - /* FIXME */ |
| 2044 | - return FALSE; |
| 2045 | -} |
| 2046 | - |
| 2047 | -static CCSStringList |
| 2048 | -getExistingProfiles (CCSBackend *backend, CCSContext *context) |
| 2049 | -{ |
| 2050 | - GSList *data, *tmp; |
| 2051 | - CCSStringList ret = NULL; |
| 2052 | - char *name; |
| 2053 | - |
| 2054 | - gconf_client_suggest_sync (client, NULL); |
| 2055 | - data = gconf_client_all_dirs (client, PROFILEPATH, NULL); |
| 2056 | - |
| 2057 | - for (tmp = data; tmp; tmp = g_slist_next (tmp)) |
| 2058 | - { |
| 2059 | - name = strrchr (tmp->data, '/'); |
| 2060 | - if (name && (strcmp (name + 1, DEFAULTPROF) != 0)) |
| 2061 | - { |
| 2062 | - CCSString *str = calloc (1, sizeof (CCSString)); |
| 2063 | - str->value = strdup (name + 1); |
| 2064 | - ret = ccsStringListAppend (ret, str); |
| 2065 | - } |
| 2066 | - |
| 2067 | - g_free (tmp->data); |
| 2068 | - } |
| 2069 | - |
| 2070 | - g_slist_free (data); |
| 2071 | - |
| 2072 | - name = getCurrentProfileName (); |
| 2073 | - if (name && strcmp (name, DEFAULTPROF) != 0) |
| 2074 | - { |
| 2075 | - CCSString *str = calloc (1, sizeof (CCSString)); |
| 2076 | - str->value = name; |
| 2077 | - ret = ccsStringListAppend (ret, str); |
| 2078 | - } |
| 2079 | - else if (name) |
| 2080 | - free (name); |
| 2081 | - |
| 2082 | - return ret; |
| 2083 | -} |
| 2084 | - |
| 2085 | -static Bool |
| 2086 | -deleteProfile (CCSBackend *backend, |
| 2087 | - CCSContext *context, |
| 2088 | - char *profile) |
| 2089 | -{ |
| 2090 | - char path[BUFSIZE]; |
| 2091 | - gboolean status = FALSE; |
| 2092 | - |
| 2093 | - checkProfile (backend, context); |
| 2094 | - |
| 2095 | - snprintf (path, BUFSIZE, "%s/%s", PROFILEPATH, profile); |
| 2096 | - |
| 2097 | - if (gconf_client_dir_exists (client, path, NULL)) |
| 2098 | - { |
| 2099 | - status = |
| 2100 | - gconf_client_recursive_unset (client, path, |
| 2101 | - GCONF_UNSET_INCLUDING_SCHEMA_NAMES, |
| 2102 | - NULL); |
| 2103 | - gconf_client_suggest_sync (client, NULL); |
| 2104 | - } |
| 2105 | - |
| 2106 | - return status; |
| 2107 | -} |
| 2108 | - |
| 2109 | -const CCSBackendInfo gconfBackendInfo = |
| 2110 | -{ |
| 2111 | - "gconf", |
| 2112 | - "GConf Configuration Backend", |
| 2113 | - "GConf Configuration Backend for libccs", |
| 2114 | - TRUE, |
| 2115 | - TRUE, |
| 2116 | - 1 |
| 2117 | -}; |
| 2118 | - |
| 2119 | -static const CCSBackendInfo * |
| 2120 | -getInfo (CCSBackend *backend) |
| 2121 | -{ |
| 2122 | - return &gconfBackendInfo; |
| 2123 | -} |
| 2124 | - |
| 2125 | -static CCSBackendInterface gconfVTable = { |
| 2126 | - getInfo, |
| 2127 | - processEvents, |
| 2128 | - initBackend, |
| 2129 | - finiBackend, |
| 2130 | - readInit, |
| 2131 | - readSetting, |
| 2132 | - 0, |
| 2133 | - writeInit, |
| 2134 | - writeSetting, |
| 2135 | - 0, |
| 2136 | - updateSetting, |
| 2137 | - getSettingIsIntegrated, |
| 2138 | - getSettingIsReadOnly, |
| 2139 | - getExistingProfiles, |
| 2140 | - deleteProfile |
| 2141 | -}; |
| 2142 | - |
| 2143 | -CCSBackendInterface * |
| 2144 | -getBackendInfo (void) |
| 2145 | -{ |
| 2146 | - return &gconfVTable; |
| 2147 | -} |
| 2148 | - |
| 2149 | |
| 2150 | === modified file 'compizconfig/gsettings/CMakeLists.txt' |
| 2151 | --- compizconfig/gsettings/CMakeLists.txt 2012-10-26 00:31:03 +0000 |
| 2152 | +++ compizconfig/gsettings/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 2153 | @@ -8,12 +8,6 @@ |
| 2154 | set (_deps glib-2.0>=2.20.0 |
| 2155 | gio-2.0>=2.25.0) |
| 2156 | |
| 2157 | -if (USE_GCONF) |
| 2158 | - list (APPEND _deps gconf-2.0>=2.31.1) |
| 2159 | - |
| 2160 | - add_definitions (-DUSE_GCONF) |
| 2161 | -endif (USE_GCONF) |
| 2162 | - |
| 2163 | if (COMPIZ_BUILD_TESTING) |
| 2164 | add_subdirectory (mocks) |
| 2165 | endif (COMPIZ_BUILD_TESTING) |
| 2166 | |
| 2167 | === modified file 'compizconfig/gsettings/gsettings_backend_shared/CMakeLists.txt' |
| 2168 | --- compizconfig/gsettings/gsettings_backend_shared/CMakeLists.txt 2014-11-25 13:15:56 +0000 |
| 2169 | +++ compizconfig/gsettings/gsettings_backend_shared/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 2170 | @@ -7,7 +7,6 @@ |
| 2171 | set (GSETTINGS_UTIL_LIB_INCLUDES |
| 2172 | ${CMAKE_CURRENT_SOURCE_DIR} |
| 2173 | ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/include |
| 2174 | - ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/gconf/include |
| 2175 | ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/gsettings/include |
| 2176 | ${compiz_SOURCE_DIR}/compizconfig/libcompizconfig/include |
| 2177 | ${GSETTINGS_UTIL_INCLUDE_DIRS} |
| 2178 | @@ -18,7 +17,6 @@ |
| 2179 | link_directories (${GSETTINGS_UTIL_LIBRARY_DIRS} |
| 2180 | ${compiz_BINARY_DIR}/compizconfig/libcompizconfig |
| 2181 | ${compiz_BINARY_DIR}/compizconfig/integration/gnome |
| 2182 | - ${CMAKE_BINARY_DIR}/compizconfig/integration/gnome/gconf |
| 2183 | ${CMAKE_BINARY_DIR}/compizconfig/integration/gnome/gsettings) |
| 2184 | |
| 2185 | add_library (compizconfig_gsettings_backend_interface STATIC |
| 2186 | @@ -65,13 +63,6 @@ |
| 2187 | compizconfig_gsettings_wrapper_factory |
| 2188 | compizconfig) |
| 2189 | |
| 2190 | - if (USE_GCONF) |
| 2191 | - list (APPEND GSETTINGS_BACKEND_SHARED_ADDITIONAL_LIBRARIES |
| 2192 | - compizconfig_gnome_integration_gconf_setting_factory) |
| 2193 | - list (APPEND GSETTINGS_BACKEND_SHARED_ADDITIONAL_LIBRARIES |
| 2194 | - compizconfig_gnome_integration_gconf_integrated_setting) |
| 2195 | - endif (USE_GCONF) |
| 2196 | - |
| 2197 | target_link_libraries (compizconfig_gsettings_backend |
| 2198 | ${GSETTINGS_BACKEND_SHARED_ADDITIONAL_LIBRARIES} |
| 2199 | ${GSETTINGS_UTIL_LIBRARIES}) |
| 2200 | |
| 2201 | === modified file 'compizconfig/integration/gnome/CMakeLists.txt' |
| 2202 | --- compizconfig/integration/gnome/CMakeLists.txt 2012-09-25 08:17:14 +0000 |
| 2203 | +++ compizconfig/integration/gnome/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 2204 | @@ -1,6 +1,5 @@ |
| 2205 | include (FindPkgConfig) |
| 2206 | |
| 2207 | -add_subdirectory (gconf) |
| 2208 | add_subdirectory (gsettings) |
| 2209 | |
| 2210 | set (_deps |
| 2211 | |
| 2212 | === removed directory 'compizconfig/integration/gnome/gconf' |
| 2213 | === removed file 'compizconfig/integration/gnome/gconf/CMakeLists.txt' |
| 2214 | --- compizconfig/integration/gnome/gconf/CMakeLists.txt 2012-08-16 03:41:18 +0000 |
| 2215 | +++ compizconfig/integration/gnome/gconf/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
| 2216 | @@ -1,46 +0,0 @@ |
| 2217 | -include (FindPkgConfig) |
| 2218 | - |
| 2219 | -if (USE_GCONF) |
| 2220 | - |
| 2221 | - set (_deps |
| 2222 | - glib-2.0>=2.20.0 |
| 2223 | - gio-2.0>=2.25.0 |
| 2224 | - gconf-2.0>=2.31.1) |
| 2225 | - |
| 2226 | - compiz_pkg_check_modules (COMPIZCONFIG_GNOME_GCONF_INTEGRATION ${_deps}) |
| 2227 | - |
| 2228 | - if (COMPIZCONFIG_GNOME_GCONF_INTEGRATION_FOUND) |
| 2229 | - |
| 2230 | - add_definitions (-DUSE_GCONF) |
| 2231 | - |
| 2232 | - include_directories (${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include |
| 2233 | - ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/include |
| 2234 | - ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/gconf/include |
| 2235 | - ${COMPIZCONFIG_GNOME_GCONF_INTEGRATION_INCLUDE_DIRS}) |
| 2236 | - |
| 2237 | - link_directories (${CMAKE_BINARY_DIR}/compizconfig/libcompizconfig |
| 2238 | - ${CMAKE_BINARY_DIR}/compizconfig/integration/gnome |
| 2239 | - ${COMPIZCONFIG_GNOME_GCONF_INTEGRATION_LIBRARY_DIRS}) |
| 2240 | - |
| 2241 | - add_library (compizconfig_gnome_integration_gconf_integrated_setting STATIC |
| 2242 | - ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_gnome_integration_gconf_integrated_setting.c) |
| 2243 | - |
| 2244 | - target_link_libraries (compizconfig_gnome_integration_gconf_integrated_setting |
| 2245 | - compizconfig_gnome_integrated_setting |
| 2246 | - compizconfig_gnome_integration_constants |
| 2247 | - compizconfig |
| 2248 | - ${COMPIZCONFIG_GNOME_GCONF_INTEGRATION_LIBRARIES}) |
| 2249 | - |
| 2250 | - add_library (compizconfig_gnome_integration_gconf_setting_factory STATIC |
| 2251 | - ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_gnome_integration_gconf_integrated_setting_factory.c) |
| 2252 | - |
| 2253 | - target_link_libraries (compizconfig_gnome_integration_gconf_setting_factory |
| 2254 | - compizconfig_gnome_integration_constants |
| 2255 | - compizconfig_gnome_integrated_setting |
| 2256 | - compizconfig_gnome_integration_gconf_integrated_setting |
| 2257 | - compizconfig |
| 2258 | - ${COMPIZCONFIG_GNOME_GCONF_INTEGRATION_LIBRARIES}) |
| 2259 | - |
| 2260 | - endif (COMPIZCONFIG_GNOME_GCONF_INTEGRATION_FOUND) |
| 2261 | - |
| 2262 | -endif (USE_GCONF) |
| 2263 | |
| 2264 | === removed directory 'compizconfig/integration/gnome/gconf/include' |
| 2265 | === removed file 'compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting.h' |
| 2266 | --- compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting.h 2012-10-06 16:11:05 +0000 |
| 2267 | +++ compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting.h 1970-01-01 00:00:00 +0000 |
| 2268 | @@ -1,30 +0,0 @@ |
| 2269 | -#ifndef _CCS_GNOME_GCONF_INTEGRATED_SETTING_H |
| 2270 | -#define _CCS_GNOME_GCONF_INTEGRATED_SETTING_H |
| 2271 | - |
| 2272 | -#include <ccs-defs.h> |
| 2273 | -#include <ccs-fwd.h> |
| 2274 | -#include <ccs_gnome_fwd.h> |
| 2275 | -#include <gconf/gconf-client.h> |
| 2276 | - |
| 2277 | -COMPIZCONFIG_BEGIN_DECLS |
| 2278 | - |
| 2279 | -/** |
| 2280 | - * @brief ccsGConfIntegratedSettingNew |
| 2281 | - * @param base a CCSGNOMEIntegratedSetting |
| 2282 | - * @param client a GConfClient |
| 2283 | - * @param section the preceeding path to the keyname |
| 2284 | - * @param ai a CCSObjectAllocationInterface |
| 2285 | - * @return |
| 2286 | - * |
| 2287 | - * Creates the GConf implementation of a CCSIntegratedSetting, which will |
| 2288 | - * write to GConf keys when necessary. |
| 2289 | - */ |
| 2290 | -CCSIntegratedSetting * |
| 2291 | -ccsGConfIntegratedSettingNew (CCSGNOMEIntegratedSettingInfo *base, |
| 2292 | - GConfClient *client, |
| 2293 | - const char *section, |
| 2294 | - CCSObjectAllocationInterface *ai); |
| 2295 | - |
| 2296 | -COMPIZCONFIG_END_DECLS |
| 2297 | - |
| 2298 | -#endif |
| 2299 | |
| 2300 | === removed file 'compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting_factory.h' |
| 2301 | --- compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting_factory.h 2012-10-06 16:11:05 +0000 |
| 2302 | +++ compizconfig/integration/gnome/gconf/include/ccs_gnome_integration_gconf_integrated_setting_factory.h 1970-01-01 00:00:00 +0000 |
| 2303 | @@ -1,30 +0,0 @@ |
| 2304 | -#ifndef _CCS_GNOME_GCONF_INTEGRATED_SETTING_FACTORY_H |
| 2305 | -#define _CCS_GNOME_GCONF_INTEGRATED_SETTING_FACTORY_H |
| 2306 | - |
| 2307 | -#include <ccs-defs.h> |
| 2308 | -#include <ccs-object.h> |
| 2309 | -#include <ccs-fwd.h> |
| 2310 | -#include <ccs_gnome_fwd.h> |
| 2311 | -#include <gconf/gconf-client.h> |
| 2312 | - |
| 2313 | -COMPIZCONFIG_BEGIN_DECLS |
| 2314 | - |
| 2315 | -/** |
| 2316 | - * @brief ccsGConfIntegratedSettingFactoryNew |
| 2317 | - * @param client an existing GConfClient or NULL |
| 2318 | - * @param data some data to pass to the change callback |
| 2319 | - * @param ai a CCSObjectAllocationInterface |
| 2320 | - * @return a new CCSIntegratedSettingFactory |
| 2321 | - * |
| 2322 | - * CCSGConfIntegratedSettingFactory implements CCSIntegratedSettingFactory * |
| 2323 | - * and will create CCSGConfIntegratedSetting objects (which implement |
| 2324 | - * CCSIntegratedSetting). |
| 2325 | - */ |
| 2326 | -CCSIntegratedSettingFactory * |
| 2327 | -ccsGConfIntegratedSettingFactoryNew (GConfClient *client, |
| 2328 | - CCSGNOMEValueChangeData *data, |
| 2329 | - CCSObjectAllocationInterface *ai); |
| 2330 | - |
| 2331 | -COMPIZCONFIG_END_DECLS |
| 2332 | - |
| 2333 | -#endif |
| 2334 | |
| 2335 | === removed directory 'compizconfig/integration/gnome/gconf/src' |
| 2336 | === removed file 'compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting.c' |
| 2337 | --- compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting.c 2012-09-24 03:13:01 +0000 |
| 2338 | +++ compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting.c 1970-01-01 00:00:00 +0000 |
| 2339 | @@ -1,290 +0,0 @@ |
| 2340 | -#include <stdlib.h> |
| 2341 | -#include <string.h> |
| 2342 | - |
| 2343 | -#include <gconf/gconf.h> |
| 2344 | -#include <gconf/gconf-client.h> |
| 2345 | -#include <gconf/gconf-value.h> |
| 2346 | - |
| 2347 | -#include <ccs.h> |
| 2348 | -#include <ccs-backend.h> |
| 2349 | -#include <ccs-object.h> |
| 2350 | - |
| 2351 | -#include "ccs_gnome_integration_gconf_integrated_setting.h" |
| 2352 | -#include "ccs_gnome_integrated_setting.h" |
| 2353 | -#include "ccs_gnome_integration_constants.h" |
| 2354 | - |
| 2355 | - |
| 2356 | -/* CCSGConfIntegratedSetting implementation */ |
| 2357 | -typedef struct _CCSGConfIntegratedSettingPrivate CCSGConfIntegratedSettingPrivate; |
| 2358 | - |
| 2359 | -struct _CCSGConfIntegratedSettingPrivate |
| 2360 | -{ |
| 2361 | - CCSGNOMEIntegratedSettingInfo *gnomeIntegratedSettingInfo; |
| 2362 | - GConfClient *client; |
| 2363 | - const char *sectionName; |
| 2364 | -}; |
| 2365 | - |
| 2366 | -SpecialOptionType |
| 2367 | -ccsGConfIntegratedSettingGetSpecialOptionType (CCSGNOMEIntegratedSettingInfo *setting) |
| 2368 | -{ |
| 2369 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 2370 | - |
| 2371 | - return ccsGNOMEIntegratedSettingInfoGetSpecialOptionType (priv->gnomeIntegratedSettingInfo); |
| 2372 | -} |
| 2373 | - |
| 2374 | -const char * |
| 2375 | -ccsGConfIntegratedSettingGetGNOMEName (CCSGNOMEIntegratedSettingInfo *setting) |
| 2376 | -{ |
| 2377 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 2378 | - |
| 2379 | - return ccsGNOMEIntegratedSettingInfoGetGNOMEName (priv->gnomeIntegratedSettingInfo); |
| 2380 | -} |
| 2381 | - |
| 2382 | -CCSSettingValue * |
| 2383 | -ccsGConfIntegratedSettingReadValue (CCSIntegratedSetting *setting, CCSSettingType type) |
| 2384 | -{ |
| 2385 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 2386 | - CCSSettingValue *v = calloc (1, sizeof (CCSSettingValue)); |
| 2387 | - const char *gnomeKeyName = ccsGNOMEIntegratedSettingInfoGetGNOMEName ((CCSGNOMEIntegratedSettingInfo *) setting); |
| 2388 | - char *gnomeKeyPath = g_strconcat (priv->sectionName, gnomeKeyName, NULL); |
| 2389 | - |
| 2390 | - v->isListChild = FALSE; |
| 2391 | - v->parent = NULL; |
| 2392 | - v->refCount = 1; |
| 2393 | - |
| 2394 | - GConfValue *gconfValue; |
| 2395 | - GError *err = NULL; |
| 2396 | - |
| 2397 | - gconfValue = gconf_client_get (priv->client, |
| 2398 | - gnomeKeyPath, |
| 2399 | - &err); |
| 2400 | - |
| 2401 | - if (!gconfValue) |
| 2402 | - { |
| 2403 | - ccsError ("NULL encountered while reading GConf setting"); |
| 2404 | - free (gnomeKeyPath); |
| 2405 | - free (v); |
| 2406 | - return NULL; |
| 2407 | - } |
| 2408 | - |
| 2409 | - if (err) |
| 2410 | - { |
| 2411 | - ccsError ("%s", err->message); |
| 2412 | - g_error_free (err); |
| 2413 | - free (gnomeKeyPath); |
| 2414 | - free (v); |
| 2415 | - return NULL; |
| 2416 | - } |
| 2417 | - |
| 2418 | - switch (type) |
| 2419 | - { |
| 2420 | - case TypeInt: |
| 2421 | - if (gconfValue->type != GCONF_VALUE_INT) |
| 2422 | - { |
| 2423 | - ccsError ("Expected integer value"); |
| 2424 | - free (v); |
| 2425 | - v = NULL; |
| 2426 | - break; |
| 2427 | - } |
| 2428 | - |
| 2429 | - v->value.asInt = gconf_value_get_int (gconfValue); |
| 2430 | - break; |
| 2431 | - case TypeBool: |
| 2432 | - if (gconfValue->type != GCONF_VALUE_BOOL) |
| 2433 | - { |
| 2434 | - ccsError ("Expected boolean value"); |
| 2435 | - free (v); |
| 2436 | - v = NULL; |
| 2437 | - break; |
| 2438 | - } |
| 2439 | - |
| 2440 | - v->value.asBool = gconf_value_get_bool (gconfValue) ? TRUE : FALSE; |
| 2441 | - break; |
| 2442 | - case TypeString: |
| 2443 | - case TypeKey: |
| 2444 | - if (gconfValue->type != GCONF_VALUE_STRING) |
| 2445 | - { |
| 2446 | - ccsError ("Expected string value"); |
| 2447 | - free (v); |
| 2448 | - v = NULL; |
| 2449 | - break; |
| 2450 | - } |
| 2451 | - |
| 2452 | - const char *str = gconf_value_get_string (gconfValue); |
| 2453 | - |
| 2454 | - v->value.asString = strdup (str ? str : ""); |
| 2455 | - break; |
| 2456 | - default: |
| 2457 | - g_assert_not_reached (); |
| 2458 | - } |
| 2459 | - |
| 2460 | - gconf_value_free (gconfValue); |
| 2461 | - free (gnomeKeyPath); |
| 2462 | - |
| 2463 | - return v; |
| 2464 | -} |
| 2465 | - |
| 2466 | -void |
| 2467 | -ccsGConfIntegratedSettingWriteValue (CCSIntegratedSetting *setting, CCSSettingValue *v, CCSSettingType type) |
| 2468 | -{ |
| 2469 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 2470 | - const char *gnomeKeyName = ccsGNOMEIntegratedSettingInfoGetGNOMEName ((CCSGNOMEIntegratedSettingInfo *) setting); |
| 2471 | - char *gnomeKeyPath = g_strconcat (priv->sectionName, gnomeKeyName, NULL); |
| 2472 | - GError *err = NULL; |
| 2473 | - |
| 2474 | - switch (type) |
| 2475 | - { |
| 2476 | - case TypeInt: |
| 2477 | - { |
| 2478 | - int currentValue = gconf_client_get_int (priv->client, gnomeKeyPath, &err); |
| 2479 | - |
| 2480 | - if (!err && (currentValue != v->value.asInt)) |
| 2481 | - gconf_client_set_int(priv->client, gnomeKeyPath, |
| 2482 | - v->value.asInt, NULL); |
| 2483 | - } |
| 2484 | - break; |
| 2485 | - case TypeBool: |
| 2486 | - { |
| 2487 | - Bool newValue = v->value.asBool; |
| 2488 | - gboolean currentValue; |
| 2489 | - |
| 2490 | - currentValue = gconf_client_get_bool (priv->client, gnomeKeyPath, &err); |
| 2491 | - |
| 2492 | - if (!err && ((currentValue && !newValue) || |
| 2493 | - (!currentValue && newValue))) |
| 2494 | - gconf_client_set_bool (priv->client, gnomeKeyPath, |
| 2495 | - newValue, NULL); |
| 2496 | - } |
| 2497 | - break; |
| 2498 | - case TypeString: |
| 2499 | - case TypeKey: |
| 2500 | - { |
| 2501 | - char *newValue = v->value.asString; |
| 2502 | - gchar *currentValue; |
| 2503 | - |
| 2504 | - currentValue = gconf_client_get_string (priv->client, gnomeKeyPath, &err); |
| 2505 | - |
| 2506 | - if (!err && currentValue) |
| 2507 | - { |
| 2508 | - if (strcmp (currentValue, newValue) != 0) |
| 2509 | - gconf_client_set_string (priv->client, gnomeKeyPath, |
| 2510 | - newValue, NULL); |
| 2511 | - g_free (currentValue); |
| 2512 | - } |
| 2513 | - } |
| 2514 | - break; |
| 2515 | - default: |
| 2516 | - g_assert_not_reached (); |
| 2517 | - break; |
| 2518 | - } |
| 2519 | - |
| 2520 | - if (err) |
| 2521 | - { |
| 2522 | - ccsError ("%s", err->message); |
| 2523 | - g_error_free (err); |
| 2524 | - } |
| 2525 | - |
| 2526 | - free (gnomeKeyPath); |
| 2527 | -} |
| 2528 | - |
| 2529 | -const char * |
| 2530 | -ccsGConfIntegratedSettingInfoPluginName (CCSIntegratedSettingInfo *info) |
| 2531 | -{ |
| 2532 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (info); |
| 2533 | - |
| 2534 | - return ccsIntegratedSettingInfoPluginName ((CCSIntegratedSettingInfo *) priv->gnomeIntegratedSettingInfo); |
| 2535 | -} |
| 2536 | - |
| 2537 | -const char * |
| 2538 | -ccsGConfIntegratedSettingInfoSettingName (CCSIntegratedSettingInfo *info) |
| 2539 | -{ |
| 2540 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (info); |
| 2541 | - |
| 2542 | - return ccsIntegratedSettingInfoSettingName ((CCSIntegratedSettingInfo *) priv->gnomeIntegratedSettingInfo); |
| 2543 | -} |
| 2544 | - |
| 2545 | -CCSSettingType |
| 2546 | -ccsGConfIntegratedSettingInfoGetType (CCSIntegratedSettingInfo *info) |
| 2547 | -{ |
| 2548 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (info); |
| 2549 | - |
| 2550 | - return ccsIntegratedSettingInfoGetType ((CCSIntegratedSettingInfo *) priv->gnomeIntegratedSettingInfo); |
| 2551 | -} |
| 2552 | - |
| 2553 | -void |
| 2554 | -ccsGConfIntegratedSettingFree (CCSIntegratedSetting *setting) |
| 2555 | -{ |
| 2556 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 2557 | - |
| 2558 | - ccsIntegratedSettingInfoUnref ((CCSIntegratedSettingInfo *) priv->gnomeIntegratedSettingInfo); |
| 2559 | - ccsObjectFinalize (setting); |
| 2560 | - |
| 2561 | - (*setting->object.object_allocation->free_) (setting->object.object_allocation->allocator, setting); |
| 2562 | -} |
| 2563 | - |
| 2564 | -void |
| 2565 | -ccsGConfIntegratedSettingInfoFree (CCSIntegratedSettingInfo *info) |
| 2566 | -{ |
| 2567 | - ccsGConfIntegratedSettingFree ((CCSIntegratedSetting *) info); |
| 2568 | -} |
| 2569 | - |
| 2570 | -void |
| 2571 | -ccsGConfGNOMEIntegratedSettingInfoFree (CCSGNOMEIntegratedSettingInfo *info) |
| 2572 | -{ |
| 2573 | - ccsGConfIntegratedSettingFree ((CCSIntegratedSetting *) info); |
| 2574 | -} |
| 2575 | - |
| 2576 | -const CCSGNOMEIntegratedSettingInfoInterface ccsGConfGNOMEIntegratedSettingInfoInterface = |
| 2577 | -{ |
| 2578 | - ccsGConfIntegratedSettingGetSpecialOptionType, |
| 2579 | - ccsGConfIntegratedSettingGetGNOMEName, |
| 2580 | - ccsGConfGNOMEIntegratedSettingInfoFree |
| 2581 | -}; |
| 2582 | - |
| 2583 | -const CCSIntegratedSettingInterface ccsGConfIntegratedSettingInterface = |
| 2584 | -{ |
| 2585 | - ccsGConfIntegratedSettingReadValue, |
| 2586 | - ccsGConfIntegratedSettingWriteValue, |
| 2587 | - ccsGConfIntegratedSettingFree |
| 2588 | -}; |
| 2589 | - |
| 2590 | -const CCSIntegratedSettingInfoInterface ccsGConfIntegratedSettingInfoInterface = |
| 2591 | -{ |
| 2592 | - ccsGConfIntegratedSettingInfoPluginName, |
| 2593 | - ccsGConfIntegratedSettingInfoSettingName, |
| 2594 | - ccsGConfIntegratedSettingInfoGetType, |
| 2595 | - ccsGConfIntegratedSettingInfoFree |
| 2596 | -}; |
| 2597 | - |
| 2598 | -CCSIntegratedSetting * |
| 2599 | -ccsGConfIntegratedSettingNew (CCSGNOMEIntegratedSettingInfo *base, |
| 2600 | - GConfClient *client, |
| 2601 | - const char *section, |
| 2602 | - CCSObjectAllocationInterface *ai) |
| 2603 | -{ |
| 2604 | - CCSIntegratedSetting *setting = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegratedSetting)); |
| 2605 | - |
| 2606 | - if (!setting) |
| 2607 | - return NULL; |
| 2608 | - |
| 2609 | - CCSGConfIntegratedSettingPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGConfIntegratedSettingPrivate)); |
| 2610 | - |
| 2611 | - if (!priv) |
| 2612 | - { |
| 2613 | - (*ai->free_) (ai->allocator, priv); |
| 2614 | - return NULL; |
| 2615 | - } |
| 2616 | - |
| 2617 | - priv->gnomeIntegratedSettingInfo = base; |
| 2618 | - priv->client = client; |
| 2619 | - priv->sectionName = section; |
| 2620 | - |
| 2621 | - ccsObjectInit (setting, ai); |
| 2622 | - ccsObjectSetPrivate (setting, (CCSPrivate *) priv); |
| 2623 | - ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGConfIntegratedSettingInfoInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInfoInterface)); |
| 2624 | - ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGConfIntegratedSettingInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInterface)); |
| 2625 | - ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGConfGNOMEIntegratedSettingInfoInterface, GET_INTERFACE_TYPE (CCSGNOMEIntegratedSettingInfoInterface)); |
| 2626 | - ccsIntegratedSettingRef (setting); |
| 2627 | - |
| 2628 | - return setting; |
| 2629 | -} |
| 2630 | |
| 2631 | === removed file 'compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting_factory.c' |
| 2632 | --- compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting_factory.c 2013-05-13 13:23:20 +0000 |
| 2633 | +++ compizconfig/integration/gnome/gconf/src/ccs_gnome_integration_gconf_integrated_setting_factory.c 1970-01-01 00:00:00 +0000 |
| 2634 | @@ -1,247 +0,0 @@ |
| 2635 | -#include <stdlib.h> |
| 2636 | -#include <string.h> |
| 2637 | - |
| 2638 | -#include <gconf/gconf.h> |
| 2639 | -#include <gconf/gconf-client.h> |
| 2640 | -#include <gconf/gconf-value.h> |
| 2641 | - |
| 2642 | -#include <ccs.h> |
| 2643 | -#include <ccs-backend.h> |
| 2644 | -#include <ccs-object.h> |
| 2645 | - |
| 2646 | -#include "ccs_gnome_integration.h" |
| 2647 | -#include "ccs_gnome_integrated_setting.h" |
| 2648 | -#include "ccs_gnome_integration_constants.h" |
| 2649 | -#include "ccs_gnome_integration_gconf_integrated_setting.h" |
| 2650 | - |
| 2651 | -typedef struct _CCSGConfIntegratedSettingFactoryPrivate CCSGConfIntegratedSettingFactoryPrivate; |
| 2652 | - |
| 2653 | -struct _CCSGConfIntegratedSettingFactoryPrivate |
| 2654 | -{ |
| 2655 | - GConfClient *client; |
| 2656 | - guint gnomeGConfNotifyIds[NUM_WATCHED_DIRS]; |
| 2657 | - GHashTable *pluginsToSettingsSectionsHashTable; |
| 2658 | - GHashTable *pluginsToSettingsSpecialTypesHashTable; |
| 2659 | - GHashTable *pluginsToSettingNameGNOMENameHashTable; |
| 2660 | - CCSGNOMEValueChangeData *valueChangedData; |
| 2661 | -}; |
| 2662 | - |
| 2663 | -static void |
| 2664 | -gnomeGConfValueChanged (GConfClient *client, |
| 2665 | - guint cnxn_id, |
| 2666 | - GConfEntry *entry, |
| 2667 | - gpointer user_data) |
| 2668 | -{ |
| 2669 | - CCSGNOMEValueChangeData *data = (CCSGNOMEValueChangeData *) user_data; |
| 2670 | - const gchar *keyName = gconf_entry_get_key (entry); |
| 2671 | - gchar *baseName = g_path_get_basename (keyName); |
| 2672 | - |
| 2673 | - /* We don't care if integration is not enabled */ |
| 2674 | - if (!ccsGetIntegrationEnabled (data->context)) |
| 2675 | - return; |
| 2676 | - |
| 2677 | - CCSIntegratedSettingList settingList = ccsIntegratedSettingsStorageFindMatchingSettingsByPredicate (data->storage, |
| 2678 | - ccsGNOMEIntegrationFindSettingsMatchingPredicate, |
| 2679 | - baseName); |
| 2680 | - |
| 2681 | - ccsIntegrationUpdateIntegratedSettings (data->integration, |
| 2682 | - data->context, |
| 2683 | - settingList); |
| 2684 | - |
| 2685 | - g_free (baseName); |
| 2686 | -} |
| 2687 | - |
| 2688 | -static CCSIntegratedSetting * |
| 2689 | -createNewGConfIntegratedSetting (GConfClient *client, |
| 2690 | - const char *sectionName, |
| 2691 | - const char *gnomeName, |
| 2692 | - const char *pluginName, |
| 2693 | - const char *settingName, |
| 2694 | - CCSSettingType type, |
| 2695 | - SpecialOptionType specialOptionType, |
| 2696 | - CCSObjectAllocationInterface *ai) |
| 2697 | -{ |
| 2698 | - CCSIntegratedSettingInfo *sharedIntegratedSettingInfo = ccsSharedIntegratedSettingInfoNew (pluginName, settingName, type, ai); |
| 2699 | - |
| 2700 | - if (!sharedIntegratedSettingInfo) |
| 2701 | - return NULL; |
| 2702 | - |
| 2703 | - CCSGNOMEIntegratedSettingInfo *gnomeIntegratedSettingInfo = ccsGNOMEIntegratedSettingInfoNew (sharedIntegratedSettingInfo, specialOptionType, gnomeName, ai); |
| 2704 | - |
| 2705 | - if (!gnomeIntegratedSettingInfo) |
| 2706 | - { |
| 2707 | - ccsIntegratedSettingInfoUnref (sharedIntegratedSettingInfo); |
| 2708 | - return NULL; |
| 2709 | - } |
| 2710 | - |
| 2711 | - CCSIntegratedSetting *gconfIntegratedSetting = ccsGConfIntegratedSettingNew (gnomeIntegratedSettingInfo, client, sectionName, ai); |
| 2712 | - |
| 2713 | - if (!gconfIntegratedSetting) |
| 2714 | - { |
| 2715 | - ccsIntegratedSettingInfoUnref ((CCSIntegratedSettingInfo *) gnomeIntegratedSettingInfo); |
| 2716 | - return NULL; |
| 2717 | - } |
| 2718 | - |
| 2719 | - return gconfIntegratedSetting; |
| 2720 | -} |
| 2721 | - |
| 2722 | -static void |
| 2723 | -finiGConfClient (GConfClient *client, |
| 2724 | - guint *gnomeGConfNotifyIds) |
| 2725 | -{ |
| 2726 | - int i; |
| 2727 | - |
| 2728 | - gconf_client_clear_cache (client); |
| 2729 | - |
| 2730 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 2731 | - { |
| 2732 | - if (gnomeGConfNotifyIds[i]) |
| 2733 | - { |
| 2734 | - gconf_client_notify_remove (client, gnomeGConfNotifyIds[0]); |
| 2735 | - gnomeGConfNotifyIds[i] = 0; |
| 2736 | - } |
| 2737 | - gconf_client_remove_dir (client, watchedGConfGnomeDirectories[i], NULL); |
| 2738 | - } |
| 2739 | - gconf_client_suggest_sync (client, NULL); |
| 2740 | - |
| 2741 | - g_object_unref (client); |
| 2742 | -} |
| 2743 | - |
| 2744 | -static void |
| 2745 | -registerGConfClient (GConfClient *client, |
| 2746 | - guint *gnomeGConfNotifyIds, |
| 2747 | - CCSGNOMEValueChangeData *data, |
| 2748 | - GConfClientNotifyFunc func) |
| 2749 | -{ |
| 2750 | - int i; |
| 2751 | - |
| 2752 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 2753 | - gnomeGConfNotifyIds[i] = gconf_client_notify_add (client, |
| 2754 | - watchedGConfGnomeDirectories[i], |
| 2755 | - func, (gpointer) data, |
| 2756 | - NULL, NULL); |
| 2757 | -} |
| 2758 | - |
| 2759 | -static void |
| 2760 | -initGConfClient (CCSIntegratedSettingFactory *factory) |
| 2761 | -{ |
| 2762 | - int i; |
| 2763 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (CCSGConfIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory); |
| 2764 | - priv->client = gconf_client_get_default (); |
| 2765 | - |
| 2766 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 2767 | - gconf_client_add_dir (priv->client, watchedGConfGnomeDirectories[i], |
| 2768 | - GCONF_CLIENT_PRELOAD_NONE, NULL); |
| 2769 | -} |
| 2770 | - |
| 2771 | -CCSIntegratedSetting * |
| 2772 | -ccsGConfIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType (CCSIntegratedSettingFactory *factory, |
| 2773 | - CCSIntegration *integration, |
| 2774 | - const char *pluginName, |
| 2775 | - const char *settingName, |
| 2776 | - CCSSettingType type) |
| 2777 | -{ |
| 2778 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (CCSGConfIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory); |
| 2779 | - GHashTable *settingsSectionsHashTable = g_hash_table_lookup (priv->pluginsToSettingsSectionsHashTable, pluginName); |
| 2780 | - GHashTable *settingsSpecialTypesHashTable = g_hash_table_lookup (priv->pluginsToSettingsSpecialTypesHashTable, pluginName); |
| 2781 | - GHashTable *settingsSettingNameGNOMENameHashTable = g_hash_table_lookup (priv->pluginsToSettingNameGNOMENameHashTable, pluginName); |
| 2782 | - |
| 2783 | - if (!priv->client) |
| 2784 | - initGConfClient (factory); |
| 2785 | - |
| 2786 | - if (!priv->gnomeGConfNotifyIds[0]) |
| 2787 | - registerGConfClient (priv->client, priv->gnomeGConfNotifyIds, priv->valueChangedData, gnomeGConfValueChanged); |
| 2788 | - |
| 2789 | - if (settingsSectionsHashTable && |
| 2790 | - settingsSpecialTypesHashTable && |
| 2791 | - settingsSettingNameGNOMENameHashTable) |
| 2792 | - { |
| 2793 | - const gchar *sectionName = g_hash_table_lookup (settingsSectionsHashTable, settingName); |
| 2794 | - SpecialOptionType specialType = (SpecialOptionType) GPOINTER_TO_INT (g_hash_table_lookup (settingsSpecialTypesHashTable, settingName)); |
| 2795 | - const gchar *integratedName = g_hash_table_lookup (settingsSettingNameGNOMENameHashTable, settingName); |
| 2796 | - |
| 2797 | - return createNewGConfIntegratedSetting (priv->client, |
| 2798 | - sectionName, |
| 2799 | - integratedName, |
| 2800 | - pluginName, |
| 2801 | - settingName, |
| 2802 | - type, |
| 2803 | - specialType, |
| 2804 | - factory->object.object_allocation); |
| 2805 | - } |
| 2806 | - |
| 2807 | - |
| 2808 | - return NULL; |
| 2809 | -} |
| 2810 | - |
| 2811 | -void |
| 2812 | -ccsGConfIntegratedSettingFactoryFree (CCSIntegratedSettingFactory *factory) |
| 2813 | -{ |
| 2814 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (CCSGConfIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory); |
| 2815 | - |
| 2816 | - if (priv->client) |
| 2817 | - finiGConfClient (priv->client, priv->gnomeGConfNotifyIds); |
| 2818 | - |
| 2819 | - if (priv->pluginsToSettingsSectionsHashTable) |
| 2820 | - g_hash_table_unref (priv->pluginsToSettingsSectionsHashTable); |
| 2821 | - |
| 2822 | - if (priv->pluginsToSettingsSpecialTypesHashTable) |
| 2823 | - g_hash_table_unref (priv->pluginsToSettingsSpecialTypesHashTable); |
| 2824 | - |
| 2825 | - if (priv->pluginsToSettingNameGNOMENameHashTable) |
| 2826 | - g_hash_table_unref (priv->pluginsToSettingNameGNOMENameHashTable); |
| 2827 | - |
| 2828 | - ccsObjectFinalize (factory); |
| 2829 | - (*factory->object.object_allocation->free_) (factory->object.object_allocation->allocator, factory); |
| 2830 | -} |
| 2831 | - |
| 2832 | - |
| 2833 | -const CCSIntegratedSettingFactoryInterface ccsGConfIntegratedSettingFactoryInterface = |
| 2834 | -{ |
| 2835 | - ccsGConfIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType, |
| 2836 | - ccsGConfIntegratedSettingFactoryFree |
| 2837 | -}; |
| 2838 | - |
| 2839 | -CCSIntegratedSettingFactory * |
| 2840 | -ccsGConfIntegratedSettingFactoryNew (GConfClient *client, |
| 2841 | - CCSGNOMEValueChangeData *valueChangedData, |
| 2842 | - CCSObjectAllocationInterface *ai) |
| 2843 | -{ |
| 2844 | - CCSIntegratedSettingFactory *factory = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegratedSettingFactory)); |
| 2845 | - |
| 2846 | - if (!factory) |
| 2847 | - return NULL; |
| 2848 | - |
| 2849 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGConfIntegratedSettingFactoryPrivate)); |
| 2850 | - |
| 2851 | - if (!priv) |
| 2852 | - { |
| 2853 | - (*ai->free_) (ai->allocator, factory); |
| 2854 | - return NULL; |
| 2855 | - } |
| 2856 | - |
| 2857 | - if (client) |
| 2858 | - { |
| 2859 | - int i; |
| 2860 | - priv->client = (GConfClient *) g_object_ref (client); |
| 2861 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 2862 | - gconf_client_add_dir (priv->client, watchedGConfGnomeDirectories[i], |
| 2863 | - GCONF_CLIENT_PRELOAD_NONE, NULL); |
| 2864 | - } |
| 2865 | - else |
| 2866 | - priv->client = NULL; |
| 2867 | - |
| 2868 | - priv->pluginsToSettingsSectionsHashTable = ccsGNOMEIntegrationPopulateCategoriesHashTables (); |
| 2869 | - priv->pluginsToSettingsSpecialTypesHashTable = ccsGNOMEIntegrationPopulateSpecialTypesHashTables (); |
| 2870 | - priv->pluginsToSettingNameGNOMENameHashTable = ccsGNOMEIntegrationPopulateSettingNameToGNOMENameHashTables (); |
| 2871 | - priv->valueChangedData = valueChangedData; |
| 2872 | - |
| 2873 | - ccsObjectInit (factory, ai); |
| 2874 | - ccsObjectSetPrivate (factory, (CCSPrivate *) priv); |
| 2875 | - ccsObjectAddInterface (factory, (const CCSInterface *) &ccsGConfIntegratedSettingFactoryInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingFactoryInterface)); |
| 2876 | - |
| 2877 | - ccsIntegratedSettingFactoryRef (factory); |
| 2878 | - |
| 2879 | - return factory; |
| 2880 | -} |
| 2881 | - |
| 2882 | |
| 2883 | === modified file 'compizconfig/integration/gnome/gsettings/CMakeLists.txt' |
| 2884 | --- compizconfig/integration/gnome/gsettings/CMakeLists.txt 2012-10-08 13:50:56 +0000 |
| 2885 | +++ compizconfig/integration/gnome/gsettings/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 2886 | @@ -10,8 +10,6 @@ |
| 2887 | |
| 2888 | if (COMPIZCONFIG_GNOME_GSETTINGS_INTEGRATION_FOUND) |
| 2889 | |
| 2890 | - add_definitions (-DUSE_GCONF) |
| 2891 | - |
| 2892 | include_directories (${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include |
| 2893 | ${CMAKE_SOURCE_DIR}/compizconfig/gsettings/gsettings_backend_shared |
| 2894 | ${CMAKE_SOURCE_DIR}/compizconfig/integration/gnome/include |
| 2895 | |
| 2896 | === modified file 'compizconfig/integration/gnome/include/ccs_gnome_integration.h' |
| 2897 | --- compizconfig/integration/gnome/include/ccs_gnome_integration.h 2012-10-06 16:11:05 +0000 |
| 2898 | +++ compizconfig/integration/gnome/include/ccs_gnome_integration.h 2015-12-11 09:51:42 +0000 |
| 2899 | @@ -1,5 +1,5 @@ |
| 2900 | -#ifndef _CCS_COMPIZCONFIG_GNOME_GCONF_INTEGRATION |
| 2901 | -#define _CCS_COMPIZCONFIG_GNOME_GCONF_INTEGRATION |
| 2902 | +#ifndef _CCS_COMPIZCONFIG_GNOME_INTEGRATION |
| 2903 | +#define _CCS_COMPIZCONFIG_GNOME_INTEGRATION |
| 2904 | |
| 2905 | #include <ccs-defs.h> |
| 2906 | #include <ccs-fwd.h> |
| 2907 | |
| 2908 | === modified file 'compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h' |
| 2909 | --- compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h 2014-03-04 20:00:28 +0000 |
| 2910 | +++ compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h 2015-12-11 09:51:42 +0000 |
| 2911 | @@ -182,8 +182,6 @@ |
| 2912 | |
| 2913 | extern const CCSGNOMEIntegratedPluginNames ccsGNOMEIntegratedPluginNames; |
| 2914 | |
| 2915 | -extern const char* watchedGConfGnomeDirectories[]; |
| 2916 | - |
| 2917 | typedef struct _CCSGSettingsWrapperIntegratedSchemasQuarks |
| 2918 | { |
| 2919 | GQuark ORG_GNOME_DESKTOP_WM_PREFERENCES; |
| 2920 | |
| 2921 | === modified file 'compizconfig/integration/gnome/src/ccs_gnome_integration_constants.c' |
| 2922 | --- compizconfig/integration/gnome/src/ccs_gnome_integration_constants.c 2014-03-04 20:00:28 +0000 |
| 2923 | +++ compizconfig/integration/gnome/src/ccs_gnome_integration_constants.c 2015-12-11 09:51:42 +0000 |
| 2924 | @@ -1,12 +1,6 @@ |
| 2925 | #include <glib.h> |
| 2926 | #include "ccs_gnome_integration_constants.h" |
| 2927 | |
| 2928 | -const char * watchedGConfGnomeDirectories[] = { |
| 2929 | - METACITY, |
| 2930 | - "/desktop/gnome/applications/terminal", |
| 2931 | - "/apps/panel/applets/window_list/prefs" |
| 2932 | -}; |
| 2933 | - |
| 2934 | const CCSGNOMEIntegratedSettingNames ccsGNOMEIntegratedSettingNames = |
| 2935 | { |
| 2936 | { "audible_bell", "audible_bell" }, |
| 2937 | |
| 2938 | === modified file 'compizconfig/integration/mate/CMakeLists.txt' |
| 2939 | --- compizconfig/integration/mate/CMakeLists.txt 2015-02-04 22:20:18 +0000 |
| 2940 | +++ compizconfig/integration/mate/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 2941 | @@ -1,6 +1,5 @@ |
| 2942 | include (FindPkgConfig) |
| 2943 | |
| 2944 | -add_subdirectory (gconf) |
| 2945 | add_subdirectory (gsettings) |
| 2946 | |
| 2947 | set (_deps |
| 2948 | |
| 2949 | === removed directory 'compizconfig/integration/mate/gconf' |
| 2950 | === removed file 'compizconfig/integration/mate/gconf/CMakeLists.txt' |
| 2951 | --- compizconfig/integration/mate/gconf/CMakeLists.txt 2015-02-04 22:20:18 +0000 |
| 2952 | +++ compizconfig/integration/mate/gconf/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
| 2953 | @@ -1,46 +0,0 @@ |
| 2954 | -include (FindPkgConfig) |
| 2955 | - |
| 2956 | -if (USE_GCONF) |
| 2957 | - |
| 2958 | - set (_deps |
| 2959 | - glib-2.0>=2.20.0 |
| 2960 | - gio-2.0>=2.25.0 |
| 2961 | - gconf-2.0>=2.31.1) |
| 2962 | - |
| 2963 | - compiz_pkg_check_modules (COMPIZCONFIG_MATE_GCONF_INTEGRATION ${_deps}) |
| 2964 | - |
| 2965 | - if (COMPIZCONFIG_MATE_GCONF_INTEGRATION_FOUND) |
| 2966 | - |
| 2967 | - add_definitions (-DUSE_GCONF) |
| 2968 | - |
| 2969 | - include_directories (${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include |
| 2970 | - ${CMAKE_SOURCE_DIR}/compizconfig/integration/mate/include |
| 2971 | - ${CMAKE_SOURCE_DIR}/compizconfig/integration/mate/gconf/include |
| 2972 | - ${COMPIZCONFIG_MATE_GCONF_INTEGRATION_INCLUDE_DIRS}) |
| 2973 | - |
| 2974 | - link_directories (${CMAKE_BINARY_DIR}/compizconfig/libcompizconfig |
| 2975 | - ${CMAKE_BINARY_DIR}/compizconfig/integration/mate |
| 2976 | - ${COMPIZCONFIG_MATE_GCONF_INTEGRATION_LIBRARY_DIRS}) |
| 2977 | - |
| 2978 | - add_library (compizconfig_mate_integration_gconf_integrated_setting STATIC |
| 2979 | - ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration_gconf_integrated_setting.c) |
| 2980 | - |
| 2981 | - target_link_libraries (compizconfig_mate_integration_gconf_integrated_setting |
| 2982 | - compizconfig_mate_integrated_setting |
| 2983 | - compizconfig_mate_integration_constants |
| 2984 | - compizconfig |
| 2985 | - ${COMPIZCONFIG_MATE_GCONF_INTEGRATION_LIBRARIES}) |
| 2986 | - |
| 2987 | - add_library (compizconfig_mate_integration_gconf_setting_factory STATIC |
| 2988 | - ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration_gconf_integrated_setting_factory.c) |
| 2989 | - |
| 2990 | - target_link_libraries (compizconfig_mate_integration_gconf_setting_factory |
| 2991 | - compizconfig_mate_integration_constants |
| 2992 | - compizconfig_mate_integrated_setting |
| 2993 | - compizconfig_mate_integration_gconf_integrated_setting |
| 2994 | - compizconfig |
| 2995 | - ${COMPIZCONFIG_MATE_GCONF_INTEGRATION_LIBRARIES}) |
| 2996 | - |
| 2997 | - endif (COMPIZCONFIG_MATE_GCONF_INTEGRATION_FOUND) |
| 2998 | - |
| 2999 | -endif (USE_GCONF) |
| 3000 | |
| 3001 | === removed directory 'compizconfig/integration/mate/gconf/include' |
| 3002 | === removed file 'compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting.h' |
| 3003 | --- compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting.h 2015-02-04 22:20:18 +0000 |
| 3004 | +++ compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting.h 1970-01-01 00:00:00 +0000 |
| 3005 | @@ -1,30 +0,0 @@ |
| 3006 | -#ifndef _CCS_MATE_GCONF_INTEGRATED_SETTING_H |
| 3007 | -#define _CCS_MATE_GCONF_INTEGRATED_SETTING_H |
| 3008 | - |
| 3009 | -#include <ccs-defs.h> |
| 3010 | -#include <ccs-fwd.h> |
| 3011 | -#include <ccs_mate_fwd.h> |
| 3012 | -#include <gconf/gconf-client.h> |
| 3013 | - |
| 3014 | -COMPIZCONFIG_BEGIN_DECLS |
| 3015 | - |
| 3016 | -/** |
| 3017 | - * @brief ccsGConfIntegratedSettingNew |
| 3018 | - * @param base a CCSMATEIntegratedSetting |
| 3019 | - * @param client a GConfClient |
| 3020 | - * @param section the preceeding path to the keyname |
| 3021 | - * @param ai a CCSObjectAllocationInterface |
| 3022 | - * @return |
| 3023 | - * |
| 3024 | - * Creates the GConf implementation of a CCSIntegratedSetting, which will |
| 3025 | - * write to GConf keys when necessary. |
| 3026 | - */ |
| 3027 | -CCSIntegratedSetting * |
| 3028 | -ccsGConfIntegratedSettingNew (CCSMATEIntegratedSettingInfo *base, |
| 3029 | - GConfClient *client, |
| 3030 | - const char *section, |
| 3031 | - CCSObjectAllocationInterface *ai); |
| 3032 | - |
| 3033 | -COMPIZCONFIG_END_DECLS |
| 3034 | - |
| 3035 | -#endif |
| 3036 | |
| 3037 | === removed file 'compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting_factory.h' |
| 3038 | --- compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting_factory.h 2015-02-04 22:20:18 +0000 |
| 3039 | +++ compizconfig/integration/mate/gconf/include/ccs_mate_integration_gconf_integrated_setting_factory.h 1970-01-01 00:00:00 +0000 |
| 3040 | @@ -1,30 +0,0 @@ |
| 3041 | -#ifndef _CCS_MATE_GCONF_INTEGRATED_SETTING_FACTORY_H |
| 3042 | -#define _CCS_MATE_GCONF_INTEGRATED_SETTING_FACTORY_H |
| 3043 | - |
| 3044 | -#include <ccs-defs.h> |
| 3045 | -#include <ccs-object.h> |
| 3046 | -#include <ccs-fwd.h> |
| 3047 | -#include <ccs_mate_fwd.h> |
| 3048 | -#include <gconf/gconf-client.h> |
| 3049 | - |
| 3050 | -COMPIZCONFIG_BEGIN_DECLS |
| 3051 | - |
| 3052 | -/** |
| 3053 | - * @brief ccsGConfIntegratedSettingFactoryNew |
| 3054 | - * @param client an existing GConfClient or NULL |
| 3055 | - * @param data some data to pass to the change callback |
| 3056 | - * @param ai a CCSObjectAllocationInterface |
| 3057 | - * @return a new CCSIntegratedSettingFactory |
| 3058 | - * |
| 3059 | - * CCSGConfIntegratedSettingFactory implements CCSIntegratedSettingFactory * |
| 3060 | - * and will create CCSGConfIntegratedSetting objects (which implement |
| 3061 | - * CCSIntegratedSetting). |
| 3062 | - */ |
| 3063 | -CCSIntegratedSettingFactory * |
| 3064 | -ccsGConfIntegratedSettingFactoryNew (GConfClient *client, |
| 3065 | - CCSMATEValueChangeData *data, |
| 3066 | - CCSObjectAllocationInterface *ai); |
| 3067 | - |
| 3068 | -COMPIZCONFIG_END_DECLS |
| 3069 | - |
| 3070 | -#endif |
| 3071 | |
| 3072 | === removed directory 'compizconfig/integration/mate/gconf/src' |
| 3073 | === removed file 'compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting.c' |
| 3074 | --- compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting.c 2015-02-04 22:20:18 +0000 |
| 3075 | +++ compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting.c 1970-01-01 00:00:00 +0000 |
| 3076 | @@ -1,290 +0,0 @@ |
| 3077 | -#include <stdlib.h> |
| 3078 | -#include <string.h> |
| 3079 | - |
| 3080 | -#include <gconf/gconf.h> |
| 3081 | -#include <gconf/gconf-client.h> |
| 3082 | -#include <gconf/gconf-value.h> |
| 3083 | - |
| 3084 | -#include <ccs.h> |
| 3085 | -#include <ccs-backend.h> |
| 3086 | -#include <ccs-object.h> |
| 3087 | - |
| 3088 | -#include "ccs_mate_integration_gconf_integrated_setting.h" |
| 3089 | -#include "ccs_mate_integrated_setting.h" |
| 3090 | -#include "ccs_mate_integration_constants.h" |
| 3091 | - |
| 3092 | - |
| 3093 | -/* CCSGConfIntegratedSetting implementation */ |
| 3094 | -typedef struct _CCSGConfIntegratedSettingPrivate CCSGConfIntegratedSettingPrivate; |
| 3095 | - |
| 3096 | -struct _CCSGConfIntegratedSettingPrivate |
| 3097 | -{ |
| 3098 | - CCSMATEIntegratedSettingInfo *mateIntegratedSettingInfo; |
| 3099 | - GConfClient *client; |
| 3100 | - const char *sectionName; |
| 3101 | -}; |
| 3102 | - |
| 3103 | -SpecialOptionType |
| 3104 | -ccsGConfIntegratedSettingGetSpecialOptionType (CCSMATEIntegratedSettingInfo *setting) |
| 3105 | -{ |
| 3106 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 3107 | - |
| 3108 | - return ccsMATEIntegratedSettingInfoGetSpecialOptionType (priv->mateIntegratedSettingInfo); |
| 3109 | -} |
| 3110 | - |
| 3111 | -const char * |
| 3112 | -ccsGConfIntegratedSettingGetMATEName (CCSMATEIntegratedSettingInfo *setting) |
| 3113 | -{ |
| 3114 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 3115 | - |
| 3116 | - return ccsMATEIntegratedSettingInfoGetMATEName (priv->mateIntegratedSettingInfo); |
| 3117 | -} |
| 3118 | - |
| 3119 | -CCSSettingValue * |
| 3120 | -ccsGConfIntegratedSettingReadValue (CCSIntegratedSetting *setting, CCSSettingType type) |
| 3121 | -{ |
| 3122 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 3123 | - CCSSettingValue *v = calloc (1, sizeof (CCSSettingValue)); |
| 3124 | - const char *mateKeyName = ccsMATEIntegratedSettingInfoGetMATEName ((CCSMATEIntegratedSettingInfo *) setting); |
| 3125 | - char *mateKeyPath = g_strconcat (priv->sectionName, mateKeyName, NULL); |
| 3126 | - |
| 3127 | - v->isListChild = FALSE; |
| 3128 | - v->parent = NULL; |
| 3129 | - v->refCount = 1; |
| 3130 | - |
| 3131 | - GConfValue *gconfValue; |
| 3132 | - GError *err = NULL; |
| 3133 | - |
| 3134 | - gconfValue = gconf_client_get (priv->client, |
| 3135 | - mateKeyPath, |
| 3136 | - &err); |
| 3137 | - |
| 3138 | - if (!gconfValue) |
| 3139 | - { |
| 3140 | - ccsError ("NULL encountered while reading GConf setting"); |
| 3141 | - free (mateKeyPath); |
| 3142 | - free (v); |
| 3143 | - return NULL; |
| 3144 | - } |
| 3145 | - |
| 3146 | - if (err) |
| 3147 | - { |
| 3148 | - ccsError ("%s", err->message); |
| 3149 | - g_error_free (err); |
| 3150 | - free (mateKeyPath); |
| 3151 | - free (v); |
| 3152 | - return NULL; |
| 3153 | - } |
| 3154 | - |
| 3155 | - switch (type) |
| 3156 | - { |
| 3157 | - case TypeInt: |
| 3158 | - if (gconfValue->type != GCONF_VALUE_INT) |
| 3159 | - { |
| 3160 | - ccsError ("Expected integer value"); |
| 3161 | - free (v); |
| 3162 | - v = NULL; |
| 3163 | - break; |
| 3164 | - } |
| 3165 | - |
| 3166 | - v->value.asInt = gconf_value_get_int (gconfValue); |
| 3167 | - break; |
| 3168 | - case TypeBool: |
| 3169 | - if (gconfValue->type != GCONF_VALUE_BOOL) |
| 3170 | - { |
| 3171 | - ccsError ("Expected boolean value"); |
| 3172 | - free (v); |
| 3173 | - v = NULL; |
| 3174 | - break; |
| 3175 | - } |
| 3176 | - |
| 3177 | - v->value.asBool = gconf_value_get_bool (gconfValue) ? TRUE : FALSE; |
| 3178 | - break; |
| 3179 | - case TypeString: |
| 3180 | - case TypeKey: |
| 3181 | - if (gconfValue->type != GCONF_VALUE_STRING) |
| 3182 | - { |
| 3183 | - ccsError ("Expected string value"); |
| 3184 | - free (v); |
| 3185 | - v = NULL; |
| 3186 | - break; |
| 3187 | - } |
| 3188 | - |
| 3189 | - const char *str = gconf_value_get_string (gconfValue); |
| 3190 | - |
| 3191 | - v->value.asString = strdup (str ? str : ""); |
| 3192 | - break; |
| 3193 | - default: |
| 3194 | - g_assert_not_reached (); |
| 3195 | - } |
| 3196 | - |
| 3197 | - gconf_value_free (gconfValue); |
| 3198 | - free (mateKeyPath); |
| 3199 | - |
| 3200 | - return v; |
| 3201 | -} |
| 3202 | - |
| 3203 | -void |
| 3204 | -ccsGConfIntegratedSettingWriteValue (CCSIntegratedSetting *setting, CCSSettingValue *v, CCSSettingType type) |
| 3205 | -{ |
| 3206 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 3207 | - const char *mateKeyName = ccsMATEIntegratedSettingInfoGetMATEName ((CCSMATEIntegratedSettingInfo *) setting); |
| 3208 | - char *mateKeyPath = g_strconcat (priv->sectionName, mateKeyName, NULL); |
| 3209 | - GError *err = NULL; |
| 3210 | - |
| 3211 | - switch (type) |
| 3212 | - { |
| 3213 | - case TypeInt: |
| 3214 | - { |
| 3215 | - int currentValue = gconf_client_get_int (priv->client, mateKeyPath, &err); |
| 3216 | - |
| 3217 | - if (!err && (currentValue != v->value.asInt)) |
| 3218 | - gconf_client_set_int(priv->client, mateKeyPath, |
| 3219 | - v->value.asInt, NULL); |
| 3220 | - } |
| 3221 | - break; |
| 3222 | - case TypeBool: |
| 3223 | - { |
| 3224 | - Bool newValue = v->value.asBool; |
| 3225 | - gboolean currentValue; |
| 3226 | - |
| 3227 | - currentValue = gconf_client_get_bool (priv->client, mateKeyPath, &err); |
| 3228 | - |
| 3229 | - if (!err && ((currentValue && !newValue) || |
| 3230 | - (!currentValue && newValue))) |
| 3231 | - gconf_client_set_bool (priv->client, mateKeyPath, |
| 3232 | - newValue, NULL); |
| 3233 | - } |
| 3234 | - break; |
| 3235 | - case TypeString: |
| 3236 | - case TypeKey: |
| 3237 | - { |
| 3238 | - char *newValue = v->value.asString; |
| 3239 | - gchar *currentValue; |
| 3240 | - |
| 3241 | - currentValue = gconf_client_get_string (priv->client, mateKeyPath, &err); |
| 3242 | - |
| 3243 | - if (!err && currentValue) |
| 3244 | - { |
| 3245 | - if (strcmp (currentValue, newValue) != 0) |
| 3246 | - gconf_client_set_string (priv->client, mateKeyPath, |
| 3247 | - newValue, NULL); |
| 3248 | - g_free (currentValue); |
| 3249 | - } |
| 3250 | - } |
| 3251 | - break; |
| 3252 | - default: |
| 3253 | - g_assert_not_reached (); |
| 3254 | - break; |
| 3255 | - } |
| 3256 | - |
| 3257 | - if (err) |
| 3258 | - { |
| 3259 | - ccsError ("%s", err->message); |
| 3260 | - g_error_free (err); |
| 3261 | - } |
| 3262 | - |
| 3263 | - free (mateKeyPath); |
| 3264 | -} |
| 3265 | - |
| 3266 | -const char * |
| 3267 | -ccsGConfIntegratedSettingInfoPluginName (CCSIntegratedSettingInfo *info) |
| 3268 | -{ |
| 3269 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (info); |
| 3270 | - |
| 3271 | - return ccsIntegratedSettingInfoPluginName ((CCSIntegratedSettingInfo *) priv->mateIntegratedSettingInfo); |
| 3272 | -} |
| 3273 | - |
| 3274 | -const char * |
| 3275 | -ccsGConfIntegratedSettingInfoSettingName (CCSIntegratedSettingInfo *info) |
| 3276 | -{ |
| 3277 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (info); |
| 3278 | - |
| 3279 | - return ccsIntegratedSettingInfoSettingName ((CCSIntegratedSettingInfo *) priv->mateIntegratedSettingInfo); |
| 3280 | -} |
| 3281 | - |
| 3282 | -CCSSettingType |
| 3283 | -ccsGConfIntegratedSettingInfoGetType (CCSIntegratedSettingInfo *info) |
| 3284 | -{ |
| 3285 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (info); |
| 3286 | - |
| 3287 | - return ccsIntegratedSettingInfoGetType ((CCSIntegratedSettingInfo *) priv->mateIntegratedSettingInfo); |
| 3288 | -} |
| 3289 | - |
| 3290 | -void |
| 3291 | -ccsGConfIntegratedSettingFree (CCSIntegratedSetting *setting) |
| 3292 | -{ |
| 3293 | - CCSGConfIntegratedSettingPrivate *priv = (CCSGConfIntegratedSettingPrivate *) ccsObjectGetPrivate (setting); |
| 3294 | - |
| 3295 | - ccsIntegratedSettingInfoUnref ((CCSIntegratedSettingInfo *) priv->mateIntegratedSettingInfo); |
| 3296 | - ccsObjectFinalize (setting); |
| 3297 | - |
| 3298 | - (*setting->object.object_allocation->free_) (setting->object.object_allocation->allocator, setting); |
| 3299 | -} |
| 3300 | - |
| 3301 | -void |
| 3302 | -ccsGConfIntegratedSettingInfoFree (CCSIntegratedSettingInfo *info) |
| 3303 | -{ |
| 3304 | - ccsGConfIntegratedSettingFree ((CCSIntegratedSetting *) info); |
| 3305 | -} |
| 3306 | - |
| 3307 | -void |
| 3308 | -ccsGConfMATEIntegratedSettingInfoFree (CCSMATEIntegratedSettingInfo *info) |
| 3309 | -{ |
| 3310 | - ccsGConfIntegratedSettingFree ((CCSIntegratedSetting *) info); |
| 3311 | -} |
| 3312 | - |
| 3313 | -const CCSMATEIntegratedSettingInfoInterface ccsGConfMATEIntegratedSettingInfoInterface = |
| 3314 | -{ |
| 3315 | - ccsGConfIntegratedSettingGetSpecialOptionType, |
| 3316 | - ccsGConfIntegratedSettingGetMATEName, |
| 3317 | - ccsGConfMATEIntegratedSettingInfoFree |
| 3318 | -}; |
| 3319 | - |
| 3320 | -const CCSIntegratedSettingInterface ccsGConfIntegratedSettingInterface = |
| 3321 | -{ |
| 3322 | - ccsGConfIntegratedSettingReadValue, |
| 3323 | - ccsGConfIntegratedSettingWriteValue, |
| 3324 | - ccsGConfIntegratedSettingFree |
| 3325 | -}; |
| 3326 | - |
| 3327 | -const CCSIntegratedSettingInfoInterface ccsGConfIntegratedSettingInfoInterface = |
| 3328 | -{ |
| 3329 | - ccsGConfIntegratedSettingInfoPluginName, |
| 3330 | - ccsGConfIntegratedSettingInfoSettingName, |
| 3331 | - ccsGConfIntegratedSettingInfoGetType, |
| 3332 | - ccsGConfIntegratedSettingInfoFree |
| 3333 | -}; |
| 3334 | - |
| 3335 | -CCSIntegratedSetting * |
| 3336 | -ccsGConfIntegratedSettingNew (CCSMATEIntegratedSettingInfo *base, |
| 3337 | - GConfClient *client, |
| 3338 | - const char *section, |
| 3339 | - CCSObjectAllocationInterface *ai) |
| 3340 | -{ |
| 3341 | - CCSIntegratedSetting *setting = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegratedSetting)); |
| 3342 | - |
| 3343 | - if (!setting) |
| 3344 | - return NULL; |
| 3345 | - |
| 3346 | - CCSGConfIntegratedSettingPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGConfIntegratedSettingPrivate)); |
| 3347 | - |
| 3348 | - if (!priv) |
| 3349 | - { |
| 3350 | - (*ai->free_) (ai->allocator, priv); |
| 3351 | - return NULL; |
| 3352 | - } |
| 3353 | - |
| 3354 | - priv->mateIntegratedSettingInfo = base; |
| 3355 | - priv->client = client; |
| 3356 | - priv->sectionName = section; |
| 3357 | - |
| 3358 | - ccsObjectInit (setting, ai); |
| 3359 | - ccsObjectSetPrivate (setting, (CCSPrivate *) priv); |
| 3360 | - ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGConfIntegratedSettingInfoInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInfoInterface)); |
| 3361 | - ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGConfIntegratedSettingInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInterface)); |
| 3362 | - ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGConfMATEIntegratedSettingInfoInterface, GET_INTERFACE_TYPE (CCSMATEIntegratedSettingInfoInterface)); |
| 3363 | - ccsIntegratedSettingRef (setting); |
| 3364 | - |
| 3365 | - return setting; |
| 3366 | -} |
| 3367 | |
| 3368 | === removed file 'compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting_factory.c' |
| 3369 | --- compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting_factory.c 2015-02-04 22:20:18 +0000 |
| 3370 | +++ compizconfig/integration/mate/gconf/src/ccs_mate_integration_gconf_integrated_setting_factory.c 1970-01-01 00:00:00 +0000 |
| 3371 | @@ -1,247 +0,0 @@ |
| 3372 | -#include <stdlib.h> |
| 3373 | -#include <string.h> |
| 3374 | - |
| 3375 | -#include <gconf/gconf.h> |
| 3376 | -#include <gconf/gconf-client.h> |
| 3377 | -#include <gconf/gconf-value.h> |
| 3378 | - |
| 3379 | -#include <ccs.h> |
| 3380 | -#include <ccs-backend.h> |
| 3381 | -#include <ccs-object.h> |
| 3382 | - |
| 3383 | -#include "ccs_mate_integration.h" |
| 3384 | -#include "ccs_mate_integrated_setting.h" |
| 3385 | -#include "ccs_mate_integration_constants.h" |
| 3386 | -#include "ccs_mate_integration_gconf_integrated_setting.h" |
| 3387 | - |
| 3388 | -typedef struct _CCSGConfIntegratedSettingFactoryPrivate CCSGConfIntegratedSettingFactoryPrivate; |
| 3389 | - |
| 3390 | -struct _CCSGConfIntegratedSettingFactoryPrivate |
| 3391 | -{ |
| 3392 | - GConfClient *client; |
| 3393 | - guint mateGConfNotifyIds[NUM_WATCHED_DIRS]; |
| 3394 | - GHashTable *pluginsToSettingsSectionsHashTable; |
| 3395 | - GHashTable *pluginsToSettingsSpecialTypesHashTable; |
| 3396 | - GHashTable *pluginsToSettingNameMATENameHashTable; |
| 3397 | - CCSMATEValueChangeData *valueChangedData; |
| 3398 | -}; |
| 3399 | - |
| 3400 | -static void |
| 3401 | -mateGConfValueChanged (GConfClient *client, |
| 3402 | - guint cnxn_id, |
| 3403 | - GConfEntry *entry, |
| 3404 | - gpointer user_data) |
| 3405 | -{ |
| 3406 | - CCSMATEValueChangeData *data = (CCSMATEValueChangeData *) user_data; |
| 3407 | - const gchar *keyName = gconf_entry_get_key (entry); |
| 3408 | - gchar *baseName = g_path_get_basename (keyName); |
| 3409 | - |
| 3410 | - /* We don't care if integration is not enabled */ |
| 3411 | - if (!ccsGetIntegrationEnabled (data->context)) |
| 3412 | - return; |
| 3413 | - |
| 3414 | - CCSIntegratedSettingList settingList = ccsIntegratedSettingsStorageFindMatchingSettingsByPredicate (data->storage, |
| 3415 | - ccsMATEIntegrationFindSettingsMatchingPredicate, |
| 3416 | - baseName); |
| 3417 | - |
| 3418 | - ccsIntegrationUpdateIntegratedSettings (data->integration, |
| 3419 | - data->context, |
| 3420 | - settingList); |
| 3421 | - |
| 3422 | - g_free (baseName); |
| 3423 | -} |
| 3424 | - |
| 3425 | -static CCSIntegratedSetting * |
| 3426 | -createNewGConfIntegratedSetting (GConfClient *client, |
| 3427 | - const char *sectionName, |
| 3428 | - const char *mateName, |
| 3429 | - const char *pluginName, |
| 3430 | - const char *settingName, |
| 3431 | - CCSSettingType type, |
| 3432 | - SpecialOptionType specialOptionType, |
| 3433 | - CCSObjectAllocationInterface *ai) |
| 3434 | -{ |
| 3435 | - CCSIntegratedSettingInfo *sharedIntegratedSettingInfo = ccsSharedIntegratedSettingInfoNew (pluginName, settingName, type, ai); |
| 3436 | - |
| 3437 | - if (!sharedIntegratedSettingInfo) |
| 3438 | - return NULL; |
| 3439 | - |
| 3440 | - CCSMATEIntegratedSettingInfo *mateIntegratedSettingInfo = ccsMATEIntegratedSettingInfoNew (sharedIntegratedSettingInfo, specialOptionType, mateName, ai); |
| 3441 | - |
| 3442 | - if (!mateIntegratedSettingInfo) |
| 3443 | - { |
| 3444 | - ccsIntegratedSettingInfoUnref (sharedIntegratedSettingInfo); |
| 3445 | - return NULL; |
| 3446 | - } |
| 3447 | - |
| 3448 | - CCSIntegratedSetting *gconfIntegratedSetting = ccsGConfIntegratedSettingNew (mateIntegratedSettingInfo, client, sectionName, ai); |
| 3449 | - |
| 3450 | - if (!gconfIntegratedSetting) |
| 3451 | - { |
| 3452 | - ccsIntegratedSettingInfoUnref ((CCSIntegratedSettingInfo *) mateIntegratedSettingInfo); |
| 3453 | - return NULL; |
| 3454 | - } |
| 3455 | - |
| 3456 | - return gconfIntegratedSetting; |
| 3457 | -} |
| 3458 | - |
| 3459 | -static void |
| 3460 | -finiGConfClient (GConfClient *client, |
| 3461 | - guint *mateGConfNotifyIds) |
| 3462 | -{ |
| 3463 | - int i; |
| 3464 | - |
| 3465 | - gconf_client_clear_cache (client); |
| 3466 | - |
| 3467 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 3468 | - { |
| 3469 | - if (mateGConfNotifyIds[i]) |
| 3470 | - { |
| 3471 | - gconf_client_notify_remove (client, mateGConfNotifyIds[0]); |
| 3472 | - mateGConfNotifyIds[i] = 0; |
| 3473 | - } |
| 3474 | - gconf_client_remove_dir (client, watchedGConfMateDirectories[i], NULL); |
| 3475 | - } |
| 3476 | - gconf_client_suggest_sync (client, NULL); |
| 3477 | - |
| 3478 | - g_object_unref (client); |
| 3479 | -} |
| 3480 | - |
| 3481 | -static void |
| 3482 | -registerGConfClient (GConfClient *client, |
| 3483 | - guint *mateGConfNotifyIds, |
| 3484 | - CCSMATEValueChangeData *data, |
| 3485 | - GConfClientNotifyFunc func) |
| 3486 | -{ |
| 3487 | - int i; |
| 3488 | - |
| 3489 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 3490 | - mateGConfNotifyIds[i] = gconf_client_notify_add (client, |
| 3491 | - watchedGConfMateDirectories[i], |
| 3492 | - func, (gpointer) data, |
| 3493 | - NULL, NULL); |
| 3494 | -} |
| 3495 | - |
| 3496 | -static void |
| 3497 | -initGConfClient (CCSIntegratedSettingFactory *factory) |
| 3498 | -{ |
| 3499 | - int i; |
| 3500 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (CCSGConfIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory); |
| 3501 | - priv->client = gconf_client_get_default (); |
| 3502 | - |
| 3503 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 3504 | - gconf_client_add_dir (priv->client, watchedGConfMateDirectories[i], |
| 3505 | - GCONF_CLIENT_PRELOAD_NONE, NULL); |
| 3506 | -} |
| 3507 | - |
| 3508 | -CCSIntegratedSetting * |
| 3509 | -ccsGConfIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType (CCSIntegratedSettingFactory *factory, |
| 3510 | - CCSIntegration *integration, |
| 3511 | - const char *pluginName, |
| 3512 | - const char *settingName, |
| 3513 | - CCSSettingType type) |
| 3514 | -{ |
| 3515 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (CCSGConfIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory); |
| 3516 | - GHashTable *settingsSectionsHashTable = g_hash_table_lookup (priv->pluginsToSettingsSectionsHashTable, pluginName); |
| 3517 | - GHashTable *settingsSpecialTypesHashTable = g_hash_table_lookup (priv->pluginsToSettingsSpecialTypesHashTable, pluginName); |
| 3518 | - GHashTable *settingsSettingNameMATENameHashTable = g_hash_table_lookup (priv->pluginsToSettingNameMATENameHashTable, pluginName); |
| 3519 | - |
| 3520 | - if (!priv->client) |
| 3521 | - initGConfClient (factory); |
| 3522 | - |
| 3523 | - if (!priv->mateGConfNotifyIds[0]) |
| 3524 | - registerGConfClient (priv->client, priv->mateGConfNotifyIds, priv->valueChangedData, mateGConfValueChanged); |
| 3525 | - |
| 3526 | - if (settingsSectionsHashTable && |
| 3527 | - settingsSpecialTypesHashTable && |
| 3528 | - settingsSettingNameMATENameHashTable) |
| 3529 | - { |
| 3530 | - const gchar *sectionName = g_hash_table_lookup (settingsSectionsHashTable, settingName); |
| 3531 | - SpecialOptionType specialType = (SpecialOptionType) GPOINTER_TO_INT (g_hash_table_lookup (settingsSpecialTypesHashTable, settingName)); |
| 3532 | - const gchar *integratedName = g_hash_table_lookup (settingsSettingNameMATENameHashTable, settingName); |
| 3533 | - |
| 3534 | - return createNewGConfIntegratedSetting (priv->client, |
| 3535 | - sectionName, |
| 3536 | - integratedName, |
| 3537 | - pluginName, |
| 3538 | - settingName, |
| 3539 | - type, |
| 3540 | - specialType, |
| 3541 | - factory->object.object_allocation); |
| 3542 | - } |
| 3543 | - |
| 3544 | - |
| 3545 | - return NULL; |
| 3546 | -} |
| 3547 | - |
| 3548 | -void |
| 3549 | -ccsGConfIntegratedSettingFactoryFree (CCSIntegratedSettingFactory *factory) |
| 3550 | -{ |
| 3551 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (CCSGConfIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory); |
| 3552 | - |
| 3553 | - if (priv->client) |
| 3554 | - finiGConfClient (priv->client, priv->mateGConfNotifyIds); |
| 3555 | - |
| 3556 | - if (priv->pluginsToSettingsSectionsHashTable) |
| 3557 | - g_hash_table_unref (priv->pluginsToSettingsSectionsHashTable); |
| 3558 | - |
| 3559 | - if (priv->pluginsToSettingsSpecialTypesHashTable) |
| 3560 | - g_hash_table_unref (priv->pluginsToSettingsSpecialTypesHashTable); |
| 3561 | - |
| 3562 | - if (priv->pluginsToSettingNameMATENameHashTable) |
| 3563 | - g_hash_table_unref (priv->pluginsToSettingNameMATENameHashTable); |
| 3564 | - |
| 3565 | - ccsObjectFinalize (factory); |
| 3566 | - (*factory->object.object_allocation->free_) (factory->object.object_allocation->allocator, factory); |
| 3567 | -} |
| 3568 | - |
| 3569 | - |
| 3570 | -const CCSIntegratedSettingFactoryInterface ccsGConfIntegratedSettingFactoryInterface = |
| 3571 | -{ |
| 3572 | - ccsGConfIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType, |
| 3573 | - ccsGConfIntegratedSettingFactoryFree |
| 3574 | -}; |
| 3575 | - |
| 3576 | -CCSIntegratedSettingFactory * |
| 3577 | -ccsGConfIntegratedSettingFactoryNew (GConfClient *client, |
| 3578 | - CCSMATEValueChangeData *valueChangedData, |
| 3579 | - CCSObjectAllocationInterface *ai) |
| 3580 | -{ |
| 3581 | - CCSIntegratedSettingFactory *factory = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegratedSettingFactory)); |
| 3582 | - |
| 3583 | - if (!factory) |
| 3584 | - return NULL; |
| 3585 | - |
| 3586 | - CCSGConfIntegratedSettingFactoryPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGConfIntegratedSettingFactoryPrivate)); |
| 3587 | - |
| 3588 | - if (!priv) |
| 3589 | - { |
| 3590 | - (*ai->free_) (ai->allocator, factory); |
| 3591 | - return NULL; |
| 3592 | - } |
| 3593 | - |
| 3594 | - if (client) |
| 3595 | - { |
| 3596 | - int i; |
| 3597 | - priv->client = (GConfClient *) g_object_ref (client); |
| 3598 | - for (i = 0; i < NUM_WATCHED_DIRS; ++i) |
| 3599 | - gconf_client_add_dir (priv->client, watchedGConfMateDirectories[i], |
| 3600 | - GCONF_CLIENT_PRELOAD_NONE, NULL); |
| 3601 | - } |
| 3602 | - else |
| 3603 | - priv->client = NULL; |
| 3604 | - |
| 3605 | - priv->pluginsToSettingsSectionsHashTable = ccsMATEIntegrationPopulateCategoriesHashTables (); |
| 3606 | - priv->pluginsToSettingsSpecialTypesHashTable = ccsMATEIntegrationPopulateSpecialTypesHashTables (); |
| 3607 | - priv->pluginsToSettingNameMATENameHashTable = ccsMATEIntegrationPopulateSettingNameToMATENameHashTables (); |
| 3608 | - priv->valueChangedData = valueChangedData; |
| 3609 | - |
| 3610 | - ccsObjectInit (factory, ai); |
| 3611 | - ccsObjectSetPrivate (factory, (CCSPrivate *) priv); |
| 3612 | - ccsObjectAddInterface (factory, (const CCSInterface *) &ccsGConfIntegratedSettingFactoryInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingFactoryInterface)); |
| 3613 | - |
| 3614 | - ccsIntegratedSettingFactoryRef (factory); |
| 3615 | - |
| 3616 | - return factory; |
| 3617 | -} |
| 3618 | - |
| 3619 | |
| 3620 | === modified file 'compizconfig/integration/mate/gsettings/CMakeLists.txt' |
| 3621 | --- compizconfig/integration/mate/gsettings/CMakeLists.txt 2015-02-12 19:22:09 +0000 |
| 3622 | +++ compizconfig/integration/mate/gsettings/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 3623 | @@ -10,8 +10,6 @@ |
| 3624 | |
| 3625 | if (COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_FOUND) |
| 3626 | |
| 3627 | - add_definitions (-DUSE_GCONF) |
| 3628 | - |
| 3629 | include_directories (${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include |
| 3630 | ${CMAKE_SOURCE_DIR}/compizconfig/gsettings/gsettings_backend_shared |
| 3631 | ${CMAKE_SOURCE_DIR}/compizconfig/integration/mate/include |
| 3632 | |
| 3633 | === modified file 'compizconfig/integration/mate/include/ccs_mate_integration.h' |
| 3634 | --- compizconfig/integration/mate/include/ccs_mate_integration.h 2015-02-04 22:20:18 +0000 |
| 3635 | +++ compizconfig/integration/mate/include/ccs_mate_integration.h 2015-12-11 09:51:42 +0000 |
| 3636 | @@ -1,5 +1,5 @@ |
| 3637 | -#ifndef _CCS_COMPIZCONFIG_MATE_GCONF_INTEGRATION |
| 3638 | -#define _CCS_COMPIZCONFIG_MATE_GCONF_INTEGRATION |
| 3639 | +#ifndef _CCS_COMPIZCONFIG_MATE_INTEGRATION |
| 3640 | +#define _CCS_COMPIZCONFIG_MATE_INTEGRATION |
| 3641 | |
| 3642 | #include <ccs-defs.h> |
| 3643 | #include <ccs-fwd.h> |
| 3644 | |
| 3645 | === modified file 'compizconfig/libcompizconfig/include/ccs-backend.h' |
| 3646 | --- compizconfig/libcompizconfig/include/ccs-backend.h 2013-02-21 16:41:49 +0000 |
| 3647 | +++ compizconfig/libcompizconfig/include/ccs-backend.h 2015-12-11 09:51:42 +0000 |
| 3648 | @@ -380,7 +380,7 @@ |
| 3649 | CCSBackendGetInfoFunc backendGetInfo; |
| 3650 | |
| 3651 | /* something like a event loop call for the backend, |
| 3652 | - so it can check for file changes (gconf changes in the gconf backend) |
| 3653 | + so it can check for file changes |
| 3654 | no need for reload settings signals anymore */ |
| 3655 | CCSBackendExecuteEventsFunc executeEvents; |
| 3656 | |
| 3657 | @@ -423,7 +423,7 @@ |
| 3658 | * @param flags ProcessEventsGlibMainLoopMask or 0 |
| 3659 | * |
| 3660 | * something like a event loop call for the backend, |
| 3661 | - * so it can check for file changes (gconf changes in the gconf backend) |
| 3662 | + * so it can check for file changes |
| 3663 | */ |
| 3664 | void ccsBackendExecuteEvents (CCSBackend *backend, unsigned int flags); |
| 3665 | |
| 3666 | |
| 3667 | === modified file 'compizconfig/libcompizconfig/src/compiz.cpp' |
| 3668 | --- compizconfig/libcompizconfig/src/compiz.cpp 2014-12-02 11:35:11 +0000 |
| 3669 | +++ compizconfig/libcompizconfig/src/compiz.cpp 2015-12-11 09:51:42 +0000 |
| 3670 | @@ -872,8 +872,8 @@ |
| 3671 | if (ccsFindPlugin (context, name)) |
| 3672 | return; |
| 3673 | |
| 3674 | - if (!strcmp (name, "ini") || !strcmp (name, "gconf") || |
| 3675 | - !strcmp (name, "ccp") || !strcmp (name, "kconfig")) |
| 3676 | + if (!strcmp (name, "ini") || !strcmp (name, "ccp") || |
| 3677 | + !strcmp (name, "kconfig")) |
| 3678 | return; |
| 3679 | |
| 3680 | plugin = (CCSPlugin *) calloc (1, sizeof (CCSPlugin)); |
| 3681 | @@ -2534,8 +2534,8 @@ |
| 3682 | return FALSE; |
| 3683 | } |
| 3684 | |
| 3685 | - if (!strcmp (name, "ini") || !strcmp (name, "gconf") || |
| 3686 | - !strcmp (name, "ccp") || !strcmp (name, "kconfig")) |
| 3687 | + if (!strcmp (name, "ini") || !strcmp (name, "ccp") || |
| 3688 | + !strcmp (name, "kconfig")) |
| 3689 | { |
| 3690 | free (name); |
| 3691 | return FALSE; |
| 3692 | @@ -2986,8 +2986,8 @@ |
| 3693 | if (ccsFindPlugin (context, name)) |
| 3694 | return; |
| 3695 | |
| 3696 | - if (!strcmp (name, "ini") || !strcmp (name, "gconf") || |
| 3697 | - !strcmp (name, "ccp") || !strcmp (name, "kconfig")) |
| 3698 | + if (!strcmp (name, "ini") || !strcmp (name, "ccp") || |
| 3699 | + !strcmp (name, "kconfig")) |
| 3700 | return; |
| 3701 | |
| 3702 | plugin = (CCSPlugin *) calloc (1, sizeof (CCSPlugin)); |
| 3703 | |
| 3704 | === modified file 'debian/compiz-gnome.install' |
| 3705 | --- debian/compiz-gnome.install 2014-11-24 22:25:07 +0000 |
| 3706 | +++ debian/compiz-gnome.install 2015-12-11 09:51:42 +0000 |
| 3707 | @@ -6,6 +6,5 @@ |
| 3708 | usr/lib/*/compizconfig/backends/libgsettings.so |
| 3709 | usr/lib/*/libcompizconfig_gsettings_backend.so |
| 3710 | usr/share/applications/compiz.desktop usr/share/gnome/wm-properties/ |
| 3711 | -usr/share/gconf/schemas/*.schemas |
| 3712 | usr/share/glib-2.0/schemas/*.xml |
| 3713 | usr/share/gnome-control-center |
| 3714 | |
| 3715 | === modified file 'debian/control' |
| 3716 | --- debian/control 2015-08-13 22:15:37 +0000 |
| 3717 | +++ debian/control 2015-12-11 09:51:42 +0000 |
| 3718 | @@ -155,11 +155,9 @@ |
| 3719 | Recommends: gnome-system-monitor | mate-system-monitor, |
| 3720 | Replaces: compiz-plugins-main (<= 1:0.9.8), |
| 3721 | compiz-plugins-main-default (<= 1:0.9.8), |
| 3722 | - compizconfig-backend-gconf (<= 1:0.9.8), |
| 3723 | libcompizconfig0 (<= 1:0.9.8), |
| 3724 | Breaks: compiz-plugins-main (<= 1:0.9.8), |
| 3725 | compiz-plugins-main-default (<= 1:0.9.8), |
| 3726 | - compizconfig-backend-gconf (<= 1:0.9.8), |
| 3727 | Description: OpenGL window and compositing manager - GNOME window decorator |
| 3728 | Compiz brings to life a variety of visual effects that make the Linux desktop |
| 3729 | easier to use, more powerful and intuitive, and more accessible for users |
| 3730 | @@ -352,12 +350,3 @@ |
| 3731 | Description: transitional dummy package |
| 3732 | This package ensures a clean upgrade path, and can be safely removed |
| 3733 | after the upgrade. |
| 3734 | - |
| 3735 | -Package: compizconfig-backend-gconf |
| 3736 | -Depends: compiz-gnome, gconf2, ${misc:Depends} |
| 3737 | -Architecture: all |
| 3738 | -Section: oldlibs |
| 3739 | -Description: transitional dummy package |
| 3740 | - This package ensures a clean upgrade path, and can be safely removed |
| 3741 | - after the upgrade. |
| 3742 | - |
| 3743 | |
| 3744 | === modified file 'debian/rules' |
| 3745 | --- debian/rules 2015-10-26 17:15:43 +0000 |
| 3746 | +++ debian/rules 2015-12-11 09:51:42 +0000 |
| 3747 | @@ -20,9 +20,9 @@ |
| 3748 | override_dh_auto_configure: |
| 3749 | # right now, xorg-gtest won't compile on arm. |
| 3750 | ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures))) |
| 3751 | - dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE -DUSE_GSETTINGS=ON -DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=OFF -DCOMPIZ_DISABLE_PLUGIN_KDE=ON -DCOMPIZ_BUILD_TESTING=OFF -DUSE_KDE4=OFF -DUSE_GCONF=OFF -DBUILD_GLES=ON -DBUILD_XORG_GTEST=OFF |
| 3752 | + dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE -DUSE_GSETTINGS=ON -DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=OFF -DCOMPIZ_DISABLE_PLUGIN_KDE=ON -DCOMPIZ_BUILD_TESTING=OFF -DUSE_KDE4=OFF -DBUILD_GLES=ON -DBUILD_XORG_GTEST=OFF |
| 3753 | else |
| 3754 | - dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE -DUSE_GSETTINGS=ON -DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=OFF -DCOMPIZ_DISABLE_PLUGIN_KDE=ON -DCOMPIZ_BUILD_TESTING=OFF -DUSE_KDE4=OFF -DUSE_GCONF=OFF |
| 3755 | + dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE -DUSE_GSETTINGS=ON -DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=OFF -DCOMPIZ_DISABLE_PLUGIN_KDE=ON -DCOMPIZ_BUILD_TESTING=OFF -DUSE_KDE4=OFF |
| 3756 | endif |
| 3757 | |
| 3758 | override_dh_install: |
| 3759 | @@ -47,9 +47,6 @@ |
| 3760 | # remove acceptance test binary |
| 3761 | rm -f debian/tmp/usr/bin/compiz_autopilot_acceptance_tests |
| 3762 | |
| 3763 | - # remove gconf schema files |
| 3764 | - #rm -rf debian/tmp/usr/share/gconf/schemas/ |
| 3765 | - |
| 3766 | # ugly hack to install xml files |
| 3767 | mkdir -p debian/tmp/usr/share/gnome-control-center/keybindings |
| 3768 | find */gtk/gnome -name *.xml | xargs cp -at debian/tmp/usr/share/gnome-control-center/keybindings/ |
| 3769 | |
| 3770 | === modified file 'gtk/CMakeLists.txt' |
| 3771 | --- gtk/CMakeLists.txt 2015-08-13 22:15:37 +0000 |
| 3772 | +++ gtk/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 3773 | @@ -28,7 +28,7 @@ |
| 3774 | pkg_check_modules (METACITY libmetacity-private>=3.16.0) |
| 3775 | if (NOT METACITY_FOUND) |
| 3776 | compiz_set (USE_METACITY 0) |
| 3777 | - endif (METACITY_FOUND) |
| 3778 | + endif (NOT METACITY_FOUND) |
| 3779 | endif (USE_METACITY) |
| 3780 | |
| 3781 | if (USE_GNOME) |
| 3782 | |
| 3783 | === modified file 'metadata/CMakeLists.txt' |
| 3784 | --- metadata/CMakeLists.txt 2012-07-10 10:35:16 +0000 |
| 3785 | +++ metadata/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 3786 | @@ -40,17 +40,6 @@ |
| 3787 | DEPENDS ${_core_xml_file} |
| 3788 | ) |
| 3789 | |
| 3790 | -if (USE_GCONF) |
| 3791 | - compiz_gconf_schema ( |
| 3792 | - ${_core_xml_file} |
| 3793 | - ${CMAKE_BINARY_DIR}/generated/compiz-core.schemas |
| 3794 | - ${SCHEMADIR} |
| 3795 | - ) |
| 3796 | - add_custom_target (core-gconf-schema ALL |
| 3797 | - DEPENDS ${CMAKE_BINARY_DIR}/generated/compiz-core.schemas |
| 3798 | - core-xml-file |
| 3799 | - ) |
| 3800 | -endif () |
| 3801 | if (USE_GSETTINGS) |
| 3802 | set (_core_gschema_path ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.core.gschema.xml) |
| 3803 | compiz_gsettings_schema ( |
| 3804 | |
| 3805 | === removed file 'plugins/addhelper/Makefile' |
| 3806 | --- plugins/addhelper/Makefile 2012-05-16 17:44:43 +0000 |
| 3807 | +++ plugins/addhelper/Makefile 1970-01-01 00:00:00 +0000 |
| 3808 | @@ -1,533 +0,0 @@ |
| 3809 | -## |
| 3810 | -# |
| 3811 | -# Compiz plugin Makefile |
| 3812 | -# |
| 3813 | -# Copyright : (C) 2007 by Dennis Kasprzyk |
| 3814 | -# E-mail : onestone@deltatauchi.de |
| 3815 | -# |
| 3816 | -# |
| 3817 | -# This program is free software; you can redistribute it and/or |
| 3818 | -# modify it under the terms of the GNU General Public License |
| 3819 | -# as published by the Free Software Foundation; either version 2 |
| 3820 | -# of the License, or (at your option) any later version. |
| 3821 | -# |
| 3822 | -# This program is distributed in the hope that it will be useful, |
| 3823 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3824 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3825 | -# GNU General Public License for more details. |
| 3826 | -# |
| 3827 | -## |
| 3828 | - |
| 3829 | -# plugin.info file contents |
| 3830 | -# |
| 3831 | -# PLUGIN = foo |
| 3832 | -# PKG_DEP = pango |
| 3833 | -# LDFLAGS_ADD = -lGLU |
| 3834 | -# CFLAGS_ADD = -I/usr/include/foo |
| 3835 | -# CHK_HEADERS = compiz-cube.h |
| 3836 | -# |
| 3837 | - |
| 3838 | -#load config file |
| 3839 | - |
| 3840 | -ECHO = `which echo` |
| 3841 | - |
| 3842 | -# default color settings |
| 3843 | -color := $(shell if [ $$TERM = "dumb" ]; then $(ECHO) "no"; else $(ECHO) "yes"; fi) |
| 3844 | - |
| 3845 | -ifeq ($(shell if [ -f plugin.info ]; then $(ECHO) -n "found"; fi ),found) |
| 3846 | -include plugin.info |
| 3847 | -else |
| 3848 | -$(error $(shell if [ '$(color)' != 'no' ]; then \ |
| 3849 | - $(ECHO) -e "\033[1;31m[ERROR]\033[0m \"plugin.info\" file not found"; \ |
| 3850 | - else \ |
| 3851 | - $(ECHO) "[ERROR] \"plugin.info\" file not found"; \ |
| 3852 | - fi;)) |
| 3853 | -endif |
| 3854 | - |
| 3855 | -ifneq ($(shell if pkg-config --exists compiz; then $(ECHO) -n "found"; fi ),found) |
| 3856 | -$(error $(shell if [ '$(color)' != 'no' ]; then \ |
| 3857 | - $(ECHO) -e -n "\033[1;31m[ERROR]\033[0m Compiz not installed"; \ |
| 3858 | - else \ |
| 3859 | - $(ECHO) -n "[ERROR] Compiz not installed"; \ |
| 3860 | - fi)) |
| 3861 | -endif |
| 3862 | - |
| 3863 | - |
| 3864 | -ifneq ($(shell if [ -n "$(PKG_DEP)" ]; then if pkg-config --exists $(PKG_DEP); then $(ECHO) -n "found"; fi; \ |
| 3865 | - else $(ECHO) -n "found"; fi ),found) |
| 3866 | -$(error $(shell if [ '$(color)' != 'no' ]; then \ |
| 3867 | - $(ECHO) -e -n "\033[1;31m[ERROR]\033[0m "; \ |
| 3868 | - else \ |
| 3869 | - $(ECHO) -n "[ERROR] "; \ |
| 3870 | - fi; \ |
| 3871 | - pkg-config --print-errors --short-errors --errors-to-stdout $(PKG_DEP); )) |
| 3872 | -endif |
| 3873 | - |
| 3874 | - |
| 3875 | -ifeq ($(BUILD_GLOBAL),true) |
| 3876 | - PREFIX = $(shell pkg-config --variable=prefix compiz) |
| 3877 | - CLIBDIR = $(shell pkg-config --variable=libdir compiz) |
| 3878 | - CINCDIR = $(shell pkg-config --variable=includedir compiz) |
| 3879 | - PKGDIR = $(CLIBDIR)/pkgconfig |
| 3880 | - DESTDIR = $(shell pkg-config --variable=libdir compiz)/compiz |
| 3881 | - XMLDIR = $(shell pkg-config --variable=prefix compiz)/share/compiz |
| 3882 | - IMAGEDIR = $(shell pkg-config --variable=prefix compiz)/share/compiz |
| 3883 | - DATADIR = $(shell pkg-config --variable=prefix compiz)/share/compiz |
| 3884 | -else |
| 3885 | - DESTDIR = $(HOME)/.compiz/plugins |
| 3886 | - XMLDIR = $(HOME)/.compiz/metadata |
| 3887 | - IMAGEDIR = $(HOME)/.compiz/images |
| 3888 | - DATADIR = $(HOME)/.compiz/data |
| 3889 | -endif |
| 3890 | - |
| 3891 | -BUILDDIR = build |
| 3892 | - |
| 3893 | -CC = gcc |
| 3894 | -CPP = g++ |
| 3895 | -LIBTOOL = libtool |
| 3896 | -INSTALL = install |
| 3897 | - |
| 3898 | -BCOP = `pkg-config --variable=bin bcop` |
| 3899 | - |
| 3900 | -CFLAGS = -g -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing `pkg-config --cflags $(PKG_DEP) compiz ` $(CFLAGS_ADD) |
| 3901 | -LDFLAGS = `pkg-config --libs $(PKG_DEP) compiz ` $(LDFLAGS_ADD) |
| 3902 | - |
| 3903 | -DEFINES = -DIMAGEDIR=\"$(IMAGEDIR)\" -DDATADIR=\"$(DATADIR)\" |
| 3904 | - |
| 3905 | -POFILEDIR = $(shell if [ -n "$(PODIR)" ]; then $(ECHO) $(PODIR); else $(ECHO) ./po;fi ) |
| 3906 | - |
| 3907 | -COMPIZ_HEADERS = compiz.h compiz-core.h |
| 3908 | -COMPIZ_INC = $(shell pkg-config --variable=includedir compiz)/compiz/ |
| 3909 | - |
| 3910 | -is-bcop-target := $(shell if [ -e $(PLUGIN).xml.in ]; then cat $(PLUGIN).xml.in | grep "useBcop=\"true\""; \ |
| 3911 | - else if [ -e $(PLUGIN).xml ]; then cat $(PLUGIN).xml | grep "useBcop=\"true\""; fi; fi) |
| 3912 | - |
| 3913 | -trans-target := $(shell if [ -e $(PLUGIN).xml.in -o -e $(PLUGIN).xml ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN).xml;fi ) |
| 3914 | - |
| 3915 | -bcop-target := $(shell if [ -n "$(is-bcop-target)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN).xml; fi ) |
| 3916 | -bcop-target-src := $(shell if [ -n "$(is-bcop-target)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN)_options.c; fi ) |
| 3917 | -bcop-target-hdr := $(shell if [ -n "$(is-bcop-target)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN)_options.h; fi ) |
| 3918 | - |
| 3919 | -gen-schemas := $(shell if [ \( -e $(PLUGIN).xml.in -o -e $(PLUGIN).xml \) -a -n "`pkg-config --variable=xsltdir compiz-gconf`" ]; then $(ECHO) true; fi ) |
| 3920 | -schema-target := $(shell if [ -n "$(gen-schemas)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN).xml; fi ) |
| 3921 | -schema-output := $(shell if [ -n "$(gen-schemas)" ]; then $(ECHO) $(BUILDDIR)/compiz-$(PLUGIN).schema; fi ) |
| 3922 | - |
| 3923 | -ifeq ($(BUILD_GLOBAL),true) |
| 3924 | - pkg-target := $(shell if [ -e compiz-$(PLUGIN).pc.in -a -n "$(PREFIX)" -a -d "$(PREFIX)" ]; then $(ECHO) "$(BUILDDIR)/compiz-$(PLUGIN).pc"; fi ) |
| 3925 | - hdr-install-target := $(shell if [ -e compiz-$(PLUGIN).pc.in -a -n "$(PREFIX)" -a -d "$(PREFIX)" -a -e compiz-$(PLUGIN).h ]; then $(ECHO) "compiz-$(PLUGIN).h"; fi ) |
| 3926 | -endif |
| 3927 | - |
| 3928 | -# find all the object files |
| 3929 | - |
| 3930 | -c-objs := $(patsubst %.c,%.lo,$(shell find -name '*.c' 2> /dev/null | grep -v "$(BUILDDIR)/" | sed -e 's/^.\///')) |
| 3931 | -c-objs += $(patsubst %.cpp,%.lo,$(shell find -name '*.cpp' 2> /dev/null | grep -v "$(BUILDDIR)/" | sed -e 's/^.\///')) |
| 3932 | -c-objs += $(patsubst %.cxx,%.lo,$(shell find -name '*.cxx' 2> /dev/null | grep -v "$(BUILDDIR)/" | sed -e 's/^.\///')) |
| 3933 | -c-objs := $(filter-out $(bcop-target-src:.c=.lo),$(c-objs)) |
| 3934 | - |
| 3935 | -h-files := $(shell find -name '*.h' 2> /dev/null | grep -v "$(BUILDDIR)/" | sed -e 's/^.\///') |
| 3936 | -h-files += $(bcop-target-hdr) |
| 3937 | -h-files += $(foreach file,$(COMPIZ_HEADERS) $(CHK_HEADERS),$(shell $(ECHO) -n "$(COMPIZ_INC)$(file)")) |
| 3938 | - |
| 3939 | -all-c-objs := $(addprefix $(BUILDDIR)/,$(c-objs)) |
| 3940 | -all-c-objs += $(bcop-target-src:.c=.lo) |
| 3941 | - |
| 3942 | -# additional files |
| 3943 | - |
| 3944 | -data-files := $(shell find data/ -name '*' -type f 2> /dev/null | sed -e 's/data\///') |
| 3945 | -image-files := $(shell find images/ -name '*' -type f 2> /dev/null | sed -e 's/images\///') |
| 3946 | - |
| 3947 | -# system include path parameter, -isystem doesn't work on old gcc's |
| 3948 | -inc-path-param = $(shell if [ -z "`gcc --version | head -n 1 | grep ' 3'`" ]; then $(ECHO) "-isystem"; else $(ECHO) "-I"; fi) |
| 3949 | - |
| 3950 | -# Tests |
| 3951 | -ifeq ($(shell if [ -n "$(is-bcop-target)" -a -z "$(BCOP)" ]; then $(ECHO) -n "error"; fi ),error) |
| 3952 | -$(error $(shell if [ '$(color)' != 'no' ]; then \ |
| 3953 | - $(ECHO) -e -n "\033[1;31m[ERROR]\033[0m BCOP not installed but is needed to build plugin"; \ |
| 3954 | - else \ |
| 3955 | - $(ECHO) -n "[ERROR] BCOP not installed but is needed to build plugin"; \ |
| 3956 | - fi)) |
| 3957 | -endif |
| 3958 | - |
| 3959 | -ifeq ($(shell if [ "x$(BUILD_GLOBAL)" != "xtrue" -a -e compiz-$(PLUGIN).pc.in ]; then $(ECHO) -n "warn"; fi ),warn) |
| 3960 | -$(warning $(shell if [ '$(color)' != 'no' ]; then \ |
| 3961 | - $(ECHO) -e -n "\033[1;31m[WARNING]\033[0m This plugin might be needed by other plugins. Install it with \"BUILD_GLOBAL=true sudo make install\" "; \ |
| 3962 | - else \ |
| 3963 | - $(ECHO) -n "[WARNING] This plugin might be needed by other plugins. Install it with \"BUILD_GLOBAL=true sudo make install\""; \ |
| 3964 | - fi)) |
| 3965 | -endif |
| 3966 | - |
| 3967 | -# |
| 3968 | -# Do it. |
| 3969 | -# |
| 3970 | - |
| 3971 | -.PHONY: $(BUILDDIR) build-dir trans-target bcop-build pkg-creation schema-creation c-build-objs c-link-plugin |
| 3972 | - |
| 3973 | -all: $(BUILDDIR) build-dir trans-target bcop-build pkg-creation schema-creation c-build-objs c-link-plugin |
| 3974 | - |
| 3975 | -trans-build: $(trans-target) |
| 3976 | - |
| 3977 | -bcop-build: $(bcop-target-hdr) $(bcop-target-src) |
| 3978 | - |
| 3979 | -schema-creation: $(schema-output) |
| 3980 | - |
| 3981 | -c-build-objs: $(all-c-objs) |
| 3982 | - |
| 3983 | -c-link-plugin: $(BUILDDIR)/lib$(PLUGIN).la |
| 3984 | - |
| 3985 | -pkg-creation: $(pkg-target) |
| 3986 | - |
| 3987 | -# |
| 3988 | -# Create build directory |
| 3989 | -# |
| 3990 | - |
| 3991 | -$(BUILDDIR) : |
| 3992 | - @mkdir -p $(BUILDDIR) |
| 3993 | - |
| 3994 | -$(DESTDIR) : |
| 3995 | - @mkdir -p $(DESTDIR) |
| 3996 | - |
| 3997 | -# |
| 3998 | -# fallback if xml.in doesn't exists |
| 3999 | -# |
| 4000 | -$(BUILDDIR)/%.xml: %.xml |
| 4001 | - @cp $< $@ |
| 4002 | - |
| 4003 | -# |
| 4004 | -# Translating |
| 4005 | -# |
| 4006 | -$(BUILDDIR)/%.xml: %.xml.in |
| 4007 | - @if [ -d $(POFILEDIR) ]; then \ |
| 4008 | - if [ '$(color)' != 'no' ]; then \ |
| 4009 | - $(ECHO) -e -n "\033[0;1;5mtranslate \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4010 | - else \ |
| 4011 | - $(ECHO) "translate $< -> $@"; \ |
| 4012 | - fi; \ |
| 4013 | - intltool-merge -x -u $(POFILEDIR) $< $@ > /dev/null; \ |
| 4014 | - if [ '$(color)' != 'no' ]; then \ |
| 4015 | - $(ECHO) -e "\r\033[0mtranslate : \033[34m$< -> $@\033[0m"; \ |
| 4016 | - fi; \ |
| 4017 | - else \ |
| 4018 | - if [ '$(color)' != 'no' ]; then \ |
| 4019 | - $(ECHO) -e -n "\033[0;1;5mconvert \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4020 | - else \ |
| 4021 | - $(ECHO) "convert $< -> $@"; \ |
| 4022 | - fi; \ |
| 4023 | - cat $< | sed -e 's;<_;<;g' -e 's;</_;</;g' > $@; \ |
| 4024 | - if [ '$(color)' != 'no' ]; then \ |
| 4025 | - $(ECHO) -e "\r\033[0mconvert : \033[34m$< -> $@\033[0m"; \ |
| 4026 | - fi; \ |
| 4027 | - fi |
| 4028 | - |
| 4029 | -# |
| 4030 | -# BCOP'ing |
| 4031 | - |
| 4032 | -$(BUILDDIR)/%_options.h: $(BUILDDIR)/%.xml |
| 4033 | - @if [ '$(color)' != 'no' ]; then \ |
| 4034 | - $(ECHO) -e -n "\033[0;1;5mbcop'ing \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4035 | - else \ |
| 4036 | - $(ECHO) "bcop'ing $< -> $@"; \ |
| 4037 | - fi |
| 4038 | - @$(BCOP) --header=$@ $< |
| 4039 | - @if [ '$(color)' != 'no' ]; then \ |
| 4040 | - $(ECHO) -e "\r\033[0mbcop'ing : \033[34m$< -> $@\033[0m"; \ |
| 4041 | - fi |
| 4042 | - |
| 4043 | -$(BUILDDIR)/%_options.c: $(BUILDDIR)/%.xml |
| 4044 | - @if [ '$(color)' != 'no' ]; then \ |
| 4045 | - $(ECHO) -e -n "\033[0;1;5mbcop'ing \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4046 | - else \ |
| 4047 | - $(ECHO) "bcop'ing $< -> $@"; \ |
| 4048 | - fi |
| 4049 | - @$(BCOP) --source=$@ $< |
| 4050 | - @if [ '$(color)' != 'no' ]; then \ |
| 4051 | - $(ECHO) -e "\r\033[0mbcop'ing : \033[34m$< -> $@\033[0m"; \ |
| 4052 | - fi |
| 4053 | - |
| 4054 | -# |
| 4055 | -# Schema generation |
| 4056 | - |
| 4057 | -$(BUILDDIR)/compiz-%.schema: $(BUILDDIR)/%.xml |
| 4058 | - @if [ '$(color)' != 'no' ]; then \ |
| 4059 | - $(ECHO) -e -n "\033[0;1;5mschema'ing\033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4060 | - else \ |
| 4061 | - $(ECHO) "schema'ing $< -> $@"; \ |
| 4062 | - fi |
| 4063 | - @xsltproc `pkg-config --variable=xsltdir compiz-gconf`/schemas.xslt $< > $@ |
| 4064 | - @if [ '$(color)' != 'no' ]; then \ |
| 4065 | - $(ECHO) -e "\r\033[0mschema : \033[34m$< -> $@\033[0m"; \ |
| 4066 | - fi |
| 4067 | - |
| 4068 | -# |
| 4069 | -# pkg config file generation |
| 4070 | - |
| 4071 | -$(BUILDDIR)/compiz-%.pc: compiz-%.pc.in |
| 4072 | - @if [ '$(color)' != 'no' ]; then \ |
| 4073 | - $(ECHO) -e -n "\033[0;1;5mpkgconfig \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4074 | - else \ |
| 4075 | - $(ECHO) "pkgconfig $< -> $@"; \ |
| 4076 | - fi |
| 4077 | - @COMPIZREQUIRES=`cat $(PKGDIR)/compiz.pc | grep Requires | sed -e 's;Requires: ;;g'`; \ |
| 4078 | - COMPIZCFLAGS=`cat $(PKGDIR)/compiz.pc | grep Cflags | sed -e 's;Cflags: ;;g'`; \ |
| 4079 | - sed -e 's;@prefix@;$(PREFIX);g' -e 's;\@libdir@;$(CLIBDIR);g' \ |
| 4080 | - -e 's;@includedir@;$(CINCDIR);g' -e 's;\@VERSION@;0.0.1;g' \ |
| 4081 | - -e "s;@COMPIZ_REQUIRES@;$$COMPIZREQUIRES;g" \ |
| 4082 | - -e "s;@COMPIZ_CFLAGS@;$$COMPIZCFLAGS;g" $< > $@; |
| 4083 | - @if [ '$(color)' != 'no' ]; then \ |
| 4084 | - $(ECHO) -e "\r\033[0mpkgconfig : \033[34m$< -> $@\033[0m"; \ |
| 4085 | - fi |
| 4086 | - |
| 4087 | -# |
| 4088 | -# Compiling |
| 4089 | -# |
| 4090 | - |
| 4091 | -$(BUILDDIR)/%.lo: %.c $(h-files) |
| 4092 | - @if [ '$(color)' != 'no' ]; then \ |
| 4093 | - $(ECHO) -n -e "\033[0;1;5mcompiling \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4094 | - else \ |
| 4095 | - $(ECHO) "compiling $< -> $@"; \ |
| 4096 | - fi |
| 4097 | - @$(LIBTOOL) --quiet --mode=compile $(CC) $(CFLAGS) $(DEFINES) -I$(BUILDDIR) -c -o $@ $< |
| 4098 | - @if [ '$(color)' != 'no' ]; then \ |
| 4099 | - $(ECHO) -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \ |
| 4100 | - fi |
| 4101 | - |
| 4102 | -$(BUILDDIR)/%.lo: $(BUILDDIR)/%.c $(h-files) |
| 4103 | - @if [ '$(color)' != 'no' ]; then \ |
| 4104 | - $(ECHO) -n -e "\033[0;1;5mcompiling \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4105 | - else \ |
| 4106 | - $(ECHO) "compiling $< -> $@"; \ |
| 4107 | - fi |
| 4108 | - @$(LIBTOOL) --quiet --mode=compile $(CC) $(CFLAGS) $(DEFINES) -I$(BUILDDIR) -c -o $@ $< |
| 4109 | - @if [ '$(color)' != 'no' ]; then \ |
| 4110 | - $(ECHO) -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \ |
| 4111 | - fi |
| 4112 | - |
| 4113 | -$(BUILDDIR)/%.lo: %.cpp $(h-files) |
| 4114 | - @if [ '$(color)' != 'no' ]; then \ |
| 4115 | - $(ECHO) -n -e "\033[0;1;5mcompiling \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4116 | - else \ |
| 4117 | - $(ECHO) "compiling $< -> $@"; \ |
| 4118 | - fi |
| 4119 | - @$(LIBTOOL) --quiet --mode=compile $(CPP) $(CFLAGS) $(DEFINES) -I$(BUILDDIR) -c -o $@ $< |
| 4120 | - @if [ '$(color)' != 'no' ]; then \ |
| 4121 | - $(ECHO) -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \ |
| 4122 | - fi |
| 4123 | - |
| 4124 | -$(BUILDDIR)/%.lo: %.cxx $(h-files) |
| 4125 | - @if [ '$(color)' != 'no' ]; then \ |
| 4126 | - $(ECHO) -n -e "\033[0;1;5mcompiling \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \ |
| 4127 | - else \ |
| 4128 | - $(ECHO) "compiling $< -> $@"; \ |
| 4129 | - fi |
| 4130 | - @$(LIBTOOL) --quiet --mode=compile $(CPP) $(CFLAGS) $(DEFINES) -I$(BUILDDIR) -c -o $@ $< |
| 4131 | - @if [ '$(color)' != 'no' ]; then \ |
| 4132 | - $(ECHO) -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \ |
| 4133 | - fi |
| 4134 | - |
| 4135 | -# |
| 4136 | -# Linking |
| 4137 | -# |
| 4138 | - |
| 4139 | -cxx-rpath-prefix := -Wl,-rpath, |
| 4140 | - |
| 4141 | -$(BUILDDIR)/lib$(PLUGIN).la: $(all-c-objs) |
| 4142 | - @if [ '$(color)' != 'no' ]; then \ |
| 4143 | - $(ECHO) -e -n "\033[0;1;5mlinking \033[0m: \033[0;31m$@\033[0m"; \ |
| 4144 | - else \ |
| 4145 | - $(ECHO) "linking : $@"; \ |
| 4146 | - fi |
| 4147 | - @$(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS) -rpath $(DESTDIR) -o $@ $(all-c-objs) |
| 4148 | - @if [ '$(color)' != 'no' ]; then \ |
| 4149 | - $(ECHO) -e "\r\033[0mlinking : \033[34m$@\033[0m"; \ |
| 4150 | - fi |
| 4151 | - |
| 4152 | - |
| 4153 | -clean: |
| 4154 | - @if [ '$(color)' != 'no' ]; then \ |
| 4155 | - $(ECHO) -e -n "\033[0;1;5mremoving \033[0m: \033[0;31m./$(BUILDDIR)\033[0m"; \ |
| 4156 | - else \ |
| 4157 | - $(ECHO) "removing : ./$(BUILDDIR)"; \ |
| 4158 | - fi |
| 4159 | - @rm -rf $(BUILDDIR) |
| 4160 | - @if [ '$(color)' != 'no' ]; then \ |
| 4161 | - $(ECHO) -e "\r\033[0mremoving : \033[34m./$(BUILDDIR)\033[0m"; \ |
| 4162 | - fi |
| 4163 | - |
| 4164 | - |
| 4165 | -install: $(DESTDIR) all |
| 4166 | - @if [ '$(color)' != 'no' ]; then \ |
| 4167 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \ |
| 4168 | - else \ |
| 4169 | - $(ECHO) "install : $(DESTDIR)/lib$(PLUGIN).so"; \ |
| 4170 | - fi |
| 4171 | - @mkdir -p $(DESTDIR) |
| 4172 | - @$(INSTALL) $(BUILDDIR)/.libs/lib$(PLUGIN).so $(DESTDIR)/lib$(PLUGIN).so |
| 4173 | - @if [ '$(color)' != 'no' ]; then \ |
| 4174 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \ |
| 4175 | - fi |
| 4176 | - @if [ -e $(BUILDDIR)/$(PLUGIN).xml ]; then \ |
| 4177 | - if [ '$(color)' != 'no' ]; then \ |
| 4178 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \ |
| 4179 | - else \ |
| 4180 | - $(ECHO) "install : $(XMLDIR)/$(PLUGIN).xml"; \ |
| 4181 | - fi; \ |
| 4182 | - mkdir -p $(XMLDIR); \ |
| 4183 | - $(INSTALL) $(BUILDDIR)/$(PLUGIN).xml $(XMLDIR)/$(PLUGIN).xml; \ |
| 4184 | - if [ '$(color)' != 'no' ]; then \ |
| 4185 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \ |
| 4186 | - fi; \ |
| 4187 | - fi |
| 4188 | - @if [ -n "$(hdr-install-target)" ]; then \ |
| 4189 | - if [ '$(color)' != 'no' ]; then \ |
| 4190 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \ |
| 4191 | - else \ |
| 4192 | - $(ECHO) "install : $(CINCDIR)/compiz/$(hdr-install-target)"; \ |
| 4193 | - fi; \ |
| 4194 | - $(INSTALL) --mode=u=rw,go=r,a-s $(hdr-install-target) $(CINCDIR)/compiz/$(hdr-install-target); \ |
| 4195 | - if [ '$(color)' != 'no' ]; then \ |
| 4196 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \ |
| 4197 | - fi; \ |
| 4198 | - fi |
| 4199 | - @if [ -n "$(pkg-target)" ]; then \ |
| 4200 | - if [ '$(color)' != 'no' ]; then \ |
| 4201 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \ |
| 4202 | - else \ |
| 4203 | - $(ECHO) "install : $(PKGDIR)/compiz-$(PLUGIN).pc"; \ |
| 4204 | - fi; \ |
| 4205 | - $(INSTALL) --mode=u=rw,go=r,a-s $(pkg-target) $(PKGDIR)/compiz-$(PLUGIN).pc; \ |
| 4206 | - if [ '$(color)' != 'no' ]; then \ |
| 4207 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \ |
| 4208 | - fi; \ |
| 4209 | - fi |
| 4210 | - @if [ -n "$(schema-output)" -a -e "$(schema-output)" ]; then \ |
| 4211 | - if [ '$(color)' != 'no' ]; then \ |
| 4212 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(schema-output)\033[0m"; \ |
| 4213 | - else \ |
| 4214 | - $(ECHO) "install : $(schema-output)"; \ |
| 4215 | - fi; \ |
| 4216 | - if [ "x$(USER)" = "xroot" ]; then \ |
| 4217 | - GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ |
| 4218 | - gconftool-2 --makefile-install-rule $(schema-output) > /dev/null; \ |
| 4219 | - else \ |
| 4220 | - gconftool-2 --install-schema-file=$(schema-output) > /dev/null; \ |
| 4221 | - fi; \ |
| 4222 | - if [ '$(color)' != 'no' ]; then \ |
| 4223 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(schema-output)\033[0m"; \ |
| 4224 | - fi; \ |
| 4225 | - fi |
| 4226 | - @if [ -n "$(data-files)" ]; then \ |
| 4227 | - mkdir -p $(DATADIR); \ |
| 4228 | - for FILE in $(data-files); do \ |
| 4229 | - if [ '$(color)' != 'no' ]; then \ |
| 4230 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(DATADIR)/$$FILE\033[0m"; \ |
| 4231 | - else \ |
| 4232 | - $(ECHO) "install : $(DATADIR)/$$FILE"; \ |
| 4233 | - fi; \ |
| 4234 | - FILEDIR="$(DATADIR)/`dirname "$$FILE"`"; \ |
| 4235 | - mkdir -p "$$FILEDIR"; \ |
| 4236 | - $(INSTALL) --mode=u=rw,go=r,a-s data/$$FILE $(DATADIR)/$$FILE; \ |
| 4237 | - if [ '$(color)' != 'no' ]; then \ |
| 4238 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(DATADIR)/$$FILE\033[0m"; \ |
| 4239 | - fi; \ |
| 4240 | - done \ |
| 4241 | - fi |
| 4242 | - @if [ -n "$(image-files)" ]; then \ |
| 4243 | - mkdir -p $(IMAGEDIR); \ |
| 4244 | - for FILE in $(image-files); do \ |
| 4245 | - if [ '$(color)' != 'no' ]; then \ |
| 4246 | - $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(IMAGEDIR)/$$FILE\033[0m"; \ |
| 4247 | - else \ |
| 4248 | - $(ECHO) "install : $(IMAGEDIR)/$$FILE"; \ |
| 4249 | - fi; \ |
| 4250 | - FILEDIR="$(IMAGEDIR)/`dirname "$$FILE"`"; \ |
| 4251 | - mkdir -p "$$FILEDIR"; \ |
| 4252 | - $(INSTALL) --mode=u=rw,go=r,a-s images/$$FILE $(IMAGEDIR)/$$FILE; \ |
| 4253 | - if [ '$(color)' != 'no' ]; then \ |
| 4254 | - $(ECHO) -e "\r\033[0minstall : \033[34m$(IMAGEDIR)/$$FILE\033[0m"; \ |
| 4255 | - fi; \ |
| 4256 | - done \ |
| 4257 | - fi |
| 4258 | - |
| 4259 | -uninstall: |
| 4260 | - @if [ -e $(DESTDIR)/lib$(PLUGIN).so ]; then \ |
| 4261 | - if [ '$(color)' != 'no' ]; then \ |
| 4262 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \ |
| 4263 | - else \ |
| 4264 | - $(ECHO) "uninstall : $(DESTDIR)/lib$(PLUGIN).so"; \ |
| 4265 | - fi; \ |
| 4266 | - rm -f $(DESTDIR)/lib$(PLUGIN).so; \ |
| 4267 | - if [ '$(color)' != 'no' ]; then \ |
| 4268 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \ |
| 4269 | - fi; \ |
| 4270 | - fi |
| 4271 | - @if [ -e $(XMLDIR)/$(PLUGIN).xml ]; then \ |
| 4272 | - if [ '$(color)' != 'no' ]; then \ |
| 4273 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \ |
| 4274 | - else \ |
| 4275 | - $(ECHO) "uninstall : $(XMLDIR)/$(PLUGIN).xml"; \ |
| 4276 | - fi; \ |
| 4277 | - rm -f $(XMLDIR)/$(PLUGIN).xml; \ |
| 4278 | - if [ '$(color)' != 'no' ]; then \ |
| 4279 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \ |
| 4280 | - fi; \ |
| 4281 | - fi |
| 4282 | - @if [ -n "$(hdr-install-target)" -a -e $(CINCDIR)/compiz/$(hdr-install-target) ]; then \ |
| 4283 | - if [ '$(color)' != 'no' ]; then \ |
| 4284 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \ |
| 4285 | - else \ |
| 4286 | - $(ECHO) "uninstall : $(CINCDIR)/compiz/$(hdr-install-target)"; \ |
| 4287 | - fi; \ |
| 4288 | - rm -f $(CINCDIR)/compiz/$(hdr-install-target); \ |
| 4289 | - if [ '$(color)' != 'no' ]; then \ |
| 4290 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \ |
| 4291 | - fi; \ |
| 4292 | - fi |
| 4293 | - @if [ -n "$(pkg-target)" -a -e $(PKGDIR)/compiz-$(PLUGIN).pc ]; then \ |
| 4294 | - if [ '$(color)' != 'no' ]; then \ |
| 4295 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \ |
| 4296 | - else \ |
| 4297 | - $(ECHO) "uninstall : $(PKGDIR)/compiz-$(PLUGIN).pc"; \ |
| 4298 | - fi; \ |
| 4299 | - rm -f $(PKGDIR)/compiz-$(PLUGIN).pc; \ |
| 4300 | - if [ '$(color)' != 'no' ]; then \ |
| 4301 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \ |
| 4302 | - fi; \ |
| 4303 | - fi |
| 4304 | - @if [ -n "$(schema-output)" -a -e "$(schema-output)" -a 'x$(USER)' = 'xroot' ]; then \ |
| 4305 | - if [ '$(color)' != 'no' ]; then \ |
| 4306 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(schema-output)\033[0m"; \ |
| 4307 | - else \ |
| 4308 | - $(ECHO) "uninstall : $(schema-output)"; \ |
| 4309 | - fi; \ |
| 4310 | - GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ |
| 4311 | - gconftool-2 --makefile-uninstall-rule $(schema-output) > /dev/null; \ |
| 4312 | - if [ '$(color)' != 'no' ]; then \ |
| 4313 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(schema-output)\033[0m"; \ |
| 4314 | - fi; \ |
| 4315 | - fi |
| 4316 | - @if [ -n "$(data-files)" ]; then \ |
| 4317 | - for FILE in $(data-files); do \ |
| 4318 | - if [ '$(color)' != 'no' ]; then \ |
| 4319 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(DATADIR)/$$FILE\033[0m"; \ |
| 4320 | - else \ |
| 4321 | - $(ECHO) "uninstall : $(DATADIR)/$$FILE"; \ |
| 4322 | - fi; \ |
| 4323 | - rm -f $(DATADIR)/$$FILE; \ |
| 4324 | - if [ '$(color)' != 'no' ]; then \ |
| 4325 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(DATADIR)/$$FILE\033[0m"; \ |
| 4326 | - fi; \ |
| 4327 | - done \ |
| 4328 | - fi |
| 4329 | - @if [ -n "$(image-files)" ]; then \ |
| 4330 | - for FILE in $(image-files); do \ |
| 4331 | - if [ '$(color)' != 'no' ]; then \ |
| 4332 | - $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(IMAGEDIR)/$$FILE\033[0m"; \ |
| 4333 | - else \ |
| 4334 | - $(ECHO) "uninstall : $(IMAGEDIR)/$$FILE"; \ |
| 4335 | - fi; \ |
| 4336 | - rm -f $(IMAGEDIR)/$$FILE; \ |
| 4337 | - if [ '$(color)' != 'no' ]; then \ |
| 4338 | - $(ECHO) -e "\r\033[0muninstall : \033[34m$(IMAGEDIR)/$$FILE\033[0m"; \ |
| 4339 | - fi; \ |
| 4340 | - done \ |
| 4341 | - fi |
| 4342 | |
| 4343 | === removed directory 'tests/migration-scripts' |
| 4344 | === removed file 'tests/migration-scripts/test_migration.py' |
| 4345 | --- tests/migration-scripts/test_migration.py 2012-07-27 11:33:39 +0000 |
| 4346 | +++ tests/migration-scripts/test_migration.py 1970-01-01 00:00:00 +0000 |
| 4347 | @@ -1,137 +0,0 @@ |
| 4348 | -#!/usr/bin/python |
| 4349 | -# -*- coding: utf-8 -*- |
| 4350 | -# Copyright (C) 2012 Canonical |
| 4351 | -# |
| 4352 | -# Authors: |
| 4353 | -# Francis 'fginther' Ginther <francis.ginther@canonical.com> |
| 4354 | -# Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> |
| 4355 | -# |
| 4356 | -# This program is free software; you can redistribute it and/or modify it under |
| 4357 | -# the terms of the GNU General Public License as published by the Free Software |
| 4358 | -# Foundation; version 3. |
| 4359 | -# |
| 4360 | -# This program is distributed in the hope that it will be useful, but WITHOUTa |
| 4361 | -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 4362 | -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 4363 | -# details. |
| 4364 | -# |
| 4365 | -# You should have received a copy of the GNU General Public License along with |
| 4366 | -# this program; if not, write to the Free Software Foundation, Inc., |
| 4367 | -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 4368 | - |
| 4369 | - |
| 4370 | -import sys |
| 4371 | -import unittest |
| 4372 | -from mock import MagicMock, patch |
| 4373 | -from StringIO import StringIO |
| 4374 | - |
| 4375 | -import gconf |
| 4376 | -import glib |
| 4377 | -import os.path |
| 4378 | -import subprocess |
| 4379 | - |
| 4380 | -# Module Under Test (mut) |
| 4381 | -try: |
| 4382 | - mut = __import__("02_migrate_to_gsettings") |
| 4383 | -except (ImportError): |
| 4384 | - sys.exit("Error! 02_migrate_to_gsettings module-under-test not found - perhaps you missed including it in the PYTHONPATH environment variable? Add the migration module directory and re-run the script again.") |
| 4385 | - |
| 4386 | -class MigrateGconfToGsettingsTests(unittest.TestCase): |
| 4387 | - """Test suite for method migrate_gconf_to_gsettings""" |
| 4388 | - |
| 4389 | - def setUp(self): |
| 4390 | - """Redirects stdout so that tests can assert print statements""" |
| 4391 | - self.stdout = sys.stdout |
| 4392 | - self.out = StringIO() |
| 4393 | - sys.stdout = self.out |
| 4394 | - |
| 4395 | - def tearDown(self): |
| 4396 | - """Restores stdout""" |
| 4397 | - sys.stdout = self.stdout |
| 4398 | - # Dump the content that was sent to stdout |
| 4399 | - # print(self.out.getvalue()) |
| 4400 | - |
| 4401 | - def testClientGetDefaultFalse(self): |
| 4402 | - """Test missing gconf client""" |
| 4403 | - gconf.client_get_default = MagicMock(return_value=False) |
| 4404 | - mut.migrate_gconf_to_gsettings() |
| 4405 | - self.assertEqual(self.out.getvalue().strip(), "WARNING: no gconf client found. No transitionning will be done") |
| 4406 | - |
| 4407 | - def testGetSchemaException(self): |
| 4408 | - """Test exception handling for get_schema""" |
| 4409 | - gconf_mock = MagicMock(name="gconf-Mock") |
| 4410 | - gconf.client_get_default = MagicMock(return_value=gconf_mock) |
| 4411 | - gconf_schema_mock = MagicMock(name="gconf.Schema-Mock") |
| 4412 | - gconf_mock.get_schema = MagicMock(return_value=gconf_schema_mock, |
| 4413 | - side_effect=glib.GError) |
| 4414 | - self.assertRaises(glib.GError, mut.migrate_gconf_to_gsettings()) |
| 4415 | - |
| 4416 | - def testGetSchemaNone(self): |
| 4417 | - """Test missing schema""" |
| 4418 | - gconf_mock = MagicMock(name="gconf-Mock") |
| 4419 | - gconf.client_get_default = MagicMock(return_value=gconf_mock) |
| 4420 | - #gconf_schema_mock = MagicMock(name="gconf.Schema-Mock") |
| 4421 | - gconf_mock.get_schema = MagicMock(return_value=False) |
| 4422 | - mut.migrate_gconf_to_gsettings() |
| 4423 | - self.assertEqual(self.out.getvalue().strip(), "No current profile set, no migration needed") |
| 4424 | - |
| 4425 | - def setupGetSchema(self, profile): |
| 4426 | - """Set up mock objects for testing a valid schema""" |
| 4427 | - # gconf.client_get_default |
| 4428 | - gconf_mock = MagicMock(name="gconf-Mock") |
| 4429 | - gconf.client_get_default = MagicMock(return_value=gconf_mock) |
| 4430 | - # client.get_schema |
| 4431 | - gconf_schema_mock = MagicMock(name="gconf.Schema-Mock") |
| 4432 | - gconf_mock.get_schema = MagicMock(return_value=gconf_schema_mock) |
| 4433 | - # current_profile_schema.get_default_value |
| 4434 | - gconf_gconfvalue_mock = MagicMock(name="gconf.Schema.gconfvalue-Mock") |
| 4435 | - gconf_schema_mock.get_default_value = MagicMock(return_value=gconf_gconfvalue_mock) |
| 4436 | - # current_profile_gconfvalue.get_string |
| 4437 | - gconf_gconfvalue_mock.get_string = MagicMock(return_value=profile) |
| 4438 | - |
| 4439 | - # Popen |
| 4440 | - subprocess_mock = MagicMock(name="subprocess-Mock") |
| 4441 | - popen_mock = MagicMock(name="popen-Mock", return_value=subprocess_mock) |
| 4442 | - subprocess.Popen = popen_mock |
| 4443 | - return popen_mock |
| 4444 | - |
| 4445 | - def testGetSchemaUnity(self): |
| 4446 | - """Test the 'unity' schema""" |
| 4447 | - popen_mock = self.setupGetSchema("unity") |
| 4448 | - mut.migrate_gconf_to_gsettings() |
| 4449 | - # 2 files should be converted |
| 4450 | - self.assertEqual(len(popen_mock.call_args_list), 2) |
| 4451 | - self.assertEqual(popen_mock.call_args_list[0][0][0][1], |
| 4452 | - '--file=/usr/lib/compiz/migration/compiz-profile-active-unity.convert') |
| 4453 | - self.assertEqual(popen_mock.call_args_list[1][0][0][1], |
| 4454 | - '--file=/usr/lib/compiz/migration/compiz-profile-Default.convert') |
| 4455 | - |
| 4456 | - def testGetSchemaDefaultConvertPathInvalid(self): |
| 4457 | - """Test the default schema""" |
| 4458 | - popen_mock = self.setupGetSchema("Default") |
| 4459 | - os.path.exists = MagicMock(return_value=False) |
| 4460 | - mut.migrate_gconf_to_gsettings() |
| 4461 | - # 1 file should be converted |
| 4462 | - self.assertEqual(len(popen_mock.call_args_list), 1) |
| 4463 | - self.assertEqual(popen_mock.call_args_list[0][0][0][1], |
| 4464 | - '--file=/usr/lib/compiz/migration/compiz-profile-active-Default.convert') |
| 4465 | - |
| 4466 | - def testGetSchemaDefaultConvertPathValid(self): |
| 4467 | - """Test the default schema with a valid unity convert file""" |
| 4468 | - popen_mock = self.setupGetSchema("Default") |
| 4469 | - exists_mock = MagicMock(return_value=True) |
| 4470 | - os.path.exists = exists_mock |
| 4471 | - mut.migrate_gconf_to_gsettings() |
| 4472 | - self.assertEqual(exists_mock.call_args_list[0][0][0], |
| 4473 | - mut.CONVERT_PATH + 'compiz-profile-unity.convert') |
| 4474 | - # 2 files should be converted |
| 4475 | - self.assertEqual(len(popen_mock.call_args_list), 2) |
| 4476 | - self.assertEqual(popen_mock.call_args_list[0][0][0][1], |
| 4477 | - '--file=/usr/lib/compiz/migration/compiz-profile-active-Default.convert') |
| 4478 | - self.assertEqual(popen_mock.call_args_list[1][0][0][1], |
| 4479 | - '--file=/usr/lib/compiz/migration/compiz-profile-unity.convert') |
| 4480 | - |
| 4481 | - |
| 4482 | -if __name__ == '__main__': |
| 4483 | - unittest.main() |
| 4484 | - |
| 4485 | |
| 4486 | === modified file 'xslt/CMakeLists.txt' |
| 4487 | --- xslt/CMakeLists.txt 2012-09-18 11:32:20 +0000 |
| 4488 | +++ xslt/CMakeLists.txt 2015-12-11 09:51:42 +0000 |
| 4489 | @@ -5,10 +5,6 @@ |
| 4490 | |
| 4491 | compiz_configure_file (compiz_gsettings_schemas.xslt.in compiz_gsettings_schemas.xslt) |
| 4492 | |
| 4493 | -if (USE_GCONF) |
| 4494 | - list (APPEND _files compiz_gconf_schemas.xslt) |
| 4495 | -endif () |
| 4496 | - |
| 4497 | if (USE_GSETTINGS) |
| 4498 | list (APPEND _files ${CMAKE_CURRENT_BINARY_DIR}/compiz_gsettings_schemas.xslt) |
| 4499 | endif () |
| 4500 | |
| 4501 | === removed file 'xslt/compiz_gconf_schemas.xslt' |
| 4502 | --- xslt/compiz_gconf_schemas.xslt 2010-11-26 16:55:31 +0000 |
| 4503 | +++ xslt/compiz_gconf_schemas.xslt 1970-01-01 00:00:00 +0000 |
| 4504 | @@ -1,410 +0,0 @@ |
| 4505 | -<!-- |
| 4506 | - Copyright © 2007 Dennis Kasprzyk |
| 4507 | - |
| 4508 | - Permission to use, copy, modify, distribute, and sell this software |
| 4509 | - and its documentation for any purpose is hereby granted without |
| 4510 | - fee, provided that the above copyright notice appear in all copies |
| 4511 | - and that both that copyright notice and this permission notice |
| 4512 | - appear in supporting documentation, and that the name of |
| 4513 | - Dennis Kasprzyk not be used in advertising or publicity pertaining to |
| 4514 | - distribution of the software without specific, written prior permission. |
| 4515 | - Dennis Kasprzyk makes no representations about the suitability of this |
| 4516 | - software for any purpose. It is provided "as is" without express or |
| 4517 | - implied warranty. |
| 4518 | - |
| 4519 | - DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
| 4520 | - INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN |
| 4521 | - NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 4522 | - CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS |
| 4523 | - OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
| 4524 | - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
| 4525 | - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 4526 | - |
| 4527 | - Authors: Dennis Kasprzyk <onestone@deltatauchi.de> |
| 4528 | ---> |
| 4529 | - |
| 4530 | -<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' > |
| 4531 | - <xsl:output method="xml" indent="yes"/> |
| 4532 | - |
| 4533 | - <xsl:param name="appName">/apps/compiz-1</xsl:param> |
| 4534 | - |
| 4535 | - <xsl:template match="/compiz"> |
| 4536 | - <gconfschemafile> |
| 4537 | - <schemalist> |
| 4538 | - <!-- two levels of indentation: group and subgroup>= --> |
| 4539 | - <xsl:for-each select="/compiz//options//option[not(@read_only='true') and not(@type='action')]"> |
| 4540 | - <xsl:call-template name="dumpOption"/> |
| 4541 | - </xsl:for-each> |
| 4542 | - </schemalist> |
| 4543 | - </gconfschemafile> |
| 4544 | - </xsl:template> |
| 4545 | - |
| 4546 | - <!-- generates the schema for an option --> |
| 4547 | - <xsl:template name="dumpOption"> |
| 4548 | - <schema> |
| 4549 | - <key>/schemas<xsl:call-template name="printKey"/></key> |
| 4550 | - <applyto><xsl:call-template name="printKey"/></applyto> |
| 4551 | - <owner>compiz-1</owner> |
| 4552 | - <type><xsl:call-template name="printType"/></type> |
| 4553 | - <xsl:choose> |
| 4554 | - <!-- color values need a special handling --> |
| 4555 | - <xsl:when test="@type = 'color'"> |
| 4556 | - <default> |
| 4557 | - <xsl:choose> |
| 4558 | - <xsl:when test="default"> |
| 4559 | - <xsl:for-each select="default[1]"> |
| 4560 | - <xsl:call-template name="printColor"/> |
| 4561 | - </xsl:for-each> |
| 4562 | - </xsl:when> |
| 4563 | - <xsl:otherwise> |
| 4564 | - <xsl:text>#000000ff</xsl:text> |
| 4565 | - </xsl:otherwise> |
| 4566 | - </xsl:choose> |
| 4567 | - </default> |
| 4568 | - </xsl:when> |
| 4569 | - <xsl:when test="@type = 'edge'"> |
| 4570 | - <default> |
| 4571 | - <xsl:call-template name="printEdgeList"/> |
| 4572 | - </default> |
| 4573 | - </xsl:when> |
| 4574 | - <xsl:when test="@type = 'list'"> |
| 4575 | - <list_type> |
| 4576 | - <xsl:call-template name="printType"> |
| 4577 | - <xsl:with-param name="type" select="type/text()"/> |
| 4578 | - </xsl:call-template> |
| 4579 | - </list_type> |
| 4580 | - <xsl:choose> |
| 4581 | - <xsl:when test="type/text() = 'color'"> |
| 4582 | - <default>[<xsl:call-template name="printColorList"/>]</default> |
| 4583 | - </xsl:when> |
| 4584 | - <xsl:otherwise> |
| 4585 | - <default>[<xsl:call-template name="printValueList"/>]</default> |
| 4586 | - </xsl:otherwise> |
| 4587 | - </xsl:choose> |
| 4588 | - </xsl:when> |
| 4589 | - <!-- for most option types we can use the default value directly --> |
| 4590 | - <xsl:otherwise> |
| 4591 | - <default> |
| 4592 | - <xsl:choose> |
| 4593 | - <xsl:when test="default/text()"> |
| 4594 | - <xsl:value-of select="default/text()"/> |
| 4595 | - </xsl:when> |
| 4596 | - <xsl:otherwise> |
| 4597 | - <!-- if no default value was specified we need to generate one --> |
| 4598 | - <xsl:choose> |
| 4599 | - <xsl:when test="contains('bool,bell',@type)"> |
| 4600 | - <xsl:text>false</xsl:text> |
| 4601 | - </xsl:when> |
| 4602 | - <xsl:when test="@type = 'int'"> |
| 4603 | - <xsl:variable name="num"> |
| 4604 | - <xsl:call-template name="printNumFallback"/> |
| 4605 | - </xsl:variable> |
| 4606 | - <xsl:value-of select="floor($num)"/> |
| 4607 | - </xsl:when> |
| 4608 | - <xsl:when test="@type = 'float'"> |
| 4609 | - <xsl:call-template name="printNumFallback"/> |
| 4610 | - </xsl:when> |
| 4611 | - <xsl:when test="contains('key,button',@type)"> |
| 4612 | - <xsl:text>Disabled</xsl:text> |
| 4613 | - </xsl:when> |
| 4614 | - </xsl:choose> |
| 4615 | - </xsl:otherwise> |
| 4616 | - </xsl:choose> |
| 4617 | - </default> |
| 4618 | - </xsl:otherwise> |
| 4619 | - </xsl:choose> |
| 4620 | - <!-- add the short and long descriptions --> |
| 4621 | - <xsl:call-template name="printDescription"/> |
| 4622 | - </schema> |
| 4623 | - </xsl:template> |
| 4624 | - |
| 4625 | - <!-- converts a compiz type to a gconf type --> |
| 4626 | - <xsl:template name="printType"> |
| 4627 | - <xsl:param name="type"> |
| 4628 | - <xsl:value-of select="@type"/> |
| 4629 | - </xsl:param> |
| 4630 | - <xsl:choose> |
| 4631 | - <xsl:when test="$type = 'int'"> |
| 4632 | - <xsl:text>int</xsl:text> |
| 4633 | - </xsl:when> |
| 4634 | - <xsl:when test="$type = 'float'"> |
| 4635 | - <xsl:text>float</xsl:text> |
| 4636 | - </xsl:when> |
| 4637 | - <xsl:when test="$type = 'bool'"> |
| 4638 | - <xsl:text>bool</xsl:text> |
| 4639 | - </xsl:when> |
| 4640 | - <xsl:when test="$type = 'list'"> |
| 4641 | - <xsl:text>list</xsl:text> |
| 4642 | - </xsl:when> |
| 4643 | - <xsl:when test="$type = 'bell'"> |
| 4644 | - <xsl:text>bool</xsl:text> |
| 4645 | - </xsl:when> |
| 4646 | - <xsl:otherwise> |
| 4647 | - <xsl:text>string</xsl:text> |
| 4648 | - </xsl:otherwise> |
| 4649 | - </xsl:choose> |
| 4650 | - </xsl:template> |
| 4651 | - |
| 4652 | - <!-- prints the option long and short descriptions of an option --> |
| 4653 | - <xsl:template name="printDescription"> |
| 4654 | - <xsl:param name="info"> |
| 4655 | - <xsl:call-template name="printInfo"/> |
| 4656 | - </xsl:param> |
| 4657 | - <locale name="C"> |
| 4658 | - <short><xsl:value-of select="short[not(@xml:lang)]/text()"/></short> |
| 4659 | - <long> |
| 4660 | - <xsl:value-of select="long[not(@xml:lang)]/text()"/> |
| 4661 | - <xsl:value-of select="$info"/> |
| 4662 | - </long> |
| 4663 | - </locale> |
| 4664 | - <xsl:for-each select="short[@xml:lang]"> |
| 4665 | - <xsl:variable name="language" select="@xml:lang"/> |
| 4666 | - <xsl:variable name="infoTrans"> |
| 4667 | - <xsl:call-template name="printInfoTrans"> |
| 4668 | - <xsl:with-param name="language" select="$language"/> |
| 4669 | - </xsl:call-template> |
| 4670 | - </xsl:variable> |
| 4671 | - <locale> |
| 4672 | - <xsl:attribute name='name'> |
| 4673 | - <xsl:value-of select="@xml:lang"/> |
| 4674 | - </xsl:attribute> |
| 4675 | - <short><xsl:value-of select="text()"/></short> |
| 4676 | - <long> |
| 4677 | - <xsl:choose> |
| 4678 | - <xsl:when test="parent::option/long[lang($language)]"> |
| 4679 | - <xsl:value-of select="parent::option/long[lang($language)]/text()"/> |
| 4680 | - </xsl:when> |
| 4681 | - <xsl:otherwise> |
| 4682 | - <xsl:value-of select="parent::option/long[not(@xml:lang)]/text()"/> |
| 4683 | - </xsl:otherwise> |
| 4684 | - </xsl:choose> |
| 4685 | - <xsl:value-of select="$infoTrans"/> |
| 4686 | - </long> |
| 4687 | - </locale> |
| 4688 | - </xsl:for-each> |
| 4689 | - </xsl:template> |
| 4690 | - |
| 4691 | - <!-- generates the additional info for the long option description --> |
| 4692 | - <xsl:template name="printInfo"> |
| 4693 | - <xsl:variable name="info"> |
| 4694 | - <xsl:text> (</xsl:text> |
| 4695 | - <xsl:choose> |
| 4696 | - <xsl:when test="contains('int,float',@type) and not(desc/value/text())"> |
| 4697 | - <xsl:value-of select="min/text()"/> - <xsl:value-of select="max/text()"/> |
| 4698 | - </xsl:when> |
| 4699 | - <xsl:when test="@type='int' and desc/value/text()"> |
| 4700 | - <xsl:call-template name="printIntDescList"/> |
| 4701 | - </xsl:when> |
| 4702 | - <xsl:when test="@type = 'match'"> |
| 4703 | - <xsl:text>match</xsl:text> |
| 4704 | - </xsl:when> |
| 4705 | - </xsl:choose> |
| 4706 | - <xsl:text>)</xsl:text> |
| 4707 | - </xsl:variable> |
| 4708 | - <xsl:if test="not(contains($info,' ()'))"> |
| 4709 | - <xsl:value-of select="$info"/> |
| 4710 | - </xsl:if> |
| 4711 | - </xsl:template> |
| 4712 | - |
| 4713 | - <!-- generates a list of int descriptions --> |
| 4714 | - <xsl:template name="printIntDescList"> |
| 4715 | - <xsl:variable name="list"> |
| 4716 | - <xsl:for-each select="desc"> |
| 4717 | - <xsl:value-of select="value/text()"/> |
| 4718 | - <xsl:text> = </xsl:text> |
| 4719 | - <xsl:value-of select="name/text()"/> |
| 4720 | - <xsl:text>, </xsl:text> |
| 4721 | - </xsl:for-each> |
| 4722 | - </xsl:variable> |
| 4723 | - <xsl:value-of select="substring($list,1,string-length($list) - 2)"/> |
| 4724 | - </xsl:template> |
| 4725 | - |
| 4726 | - <!-- generates the additional info for the long option description --> |
| 4727 | - <xsl:template name="printInfoTrans"> |
| 4728 | - <xsl:param name="language"/> |
| 4729 | - <xsl:variable name="info"> |
| 4730 | - <xsl:text> (</xsl:text> |
| 4731 | - <xsl:choose> |
| 4732 | - <xsl:when test="contains('int,float',parent::option/@type) and not(parent::option/desc/value/text())"> |
| 4733 | - <xsl:value-of select="parent::option/min/text()"/> - <xsl:value-of select="parent::option/max/text()"/> |
| 4734 | - </xsl:when> |
| 4735 | - <xsl:when test="parent::option/@type='int' and parent::option/desc/value/text()"> |
| 4736 | - <xsl:call-template name="printIntDescListTrans"> |
| 4737 | - <xsl:with-param name="language" select="$language"/> |
| 4738 | - </xsl:call-template> |
| 4739 | - </xsl:when> |
| 4740 | - <xsl:when test="parent::option/@type = 'match'"> |
| 4741 | - <xsl:text>match</xsl:text> |
| 4742 | - </xsl:when> |
| 4743 | - </xsl:choose> |
| 4744 | - <xsl:text>)</xsl:text> |
| 4745 | - </xsl:variable> |
| 4746 | - <xsl:if test="not(contains($info,' ()'))"> |
| 4747 | - <xsl:value-of select="$info"/> |
| 4748 | - </xsl:if> |
| 4749 | - </xsl:template> |
| 4750 | - |
| 4751 | - <!-- generates a list of int descriptions --> |
| 4752 | - <xsl:template name="printIntDescListTrans"> |
| 4753 | - <xsl:param name="language"/> |
| 4754 | - <xsl:variable name="list"> |
| 4755 | - <xsl:for-each select="parent::option/desc"> |
| 4756 | - <xsl:value-of select="value/text()"/> |
| 4757 | - <xsl:text> = </xsl:text> |
| 4758 | - <xsl:choose> |
| 4759 | - <xsl:when test="name[lang($language)]/text()"> |
| 4760 | - <xsl:value-of select="name[lang($language)]/text()"/> |
| 4761 | - </xsl:when> |
| 4762 | - <xsl:otherwise> |
| 4763 | - <xsl:value-of select="name[not(@xml:lang)]/text()"/> |
| 4764 | - </xsl:otherwise> |
| 4765 | - </xsl:choose> |
| 4766 | - <xsl:text>, </xsl:text> |
| 4767 | - </xsl:for-each> |
| 4768 | - </xsl:variable> |
| 4769 | - <xsl:value-of select="substring($list,1,string-length($list) - 2)"/> |
| 4770 | - </xsl:template> |
| 4771 | - |
| 4772 | - <!-- generates a default number out of the min and max values --> |
| 4773 | - <xsl:template name="printNumFallback"> |
| 4774 | - <xsl:choose> |
| 4775 | - <xsl:when test="max/text() and min/text()"> |
| 4776 | - <xsl:value-of select="(max/text() + min/text()) div 2"/> |
| 4777 | - </xsl:when> |
| 4778 | - <xsl:when test="max/text() and not(min/text())"> |
| 4779 | - <xsl:value-of select="max/text()"/> |
| 4780 | - </xsl:when> |
| 4781 | - <xsl:when test="not(max/text()) and min/text()"> |
| 4782 | - <xsl:value-of select="min/text()"/> |
| 4783 | - </xsl:when> |
| 4784 | - <xsl:otherwise>0</xsl:otherwise> |
| 4785 | - </xsl:choose> |
| 4786 | - </xsl:template> |
| 4787 | - |
| 4788 | - <!-- generates a list of values --> |
| 4789 | - <xsl:template name="printValueList"> |
| 4790 | - <xsl:variable name="list"> |
| 4791 | - <xsl:for-each select="default/value"> |
| 4792 | - <xsl:value-of select="text()"/> |
| 4793 | - <xsl:text>,</xsl:text> |
| 4794 | - </xsl:for-each> |
| 4795 | - </xsl:variable> |
| 4796 | - <xsl:value-of select="substring($list,1,string-length($list) - 1)"/> |
| 4797 | - </xsl:template> |
| 4798 | - |
| 4799 | - <!-- generates a list of color string values --> |
| 4800 | - <xsl:template name="printColorList"> |
| 4801 | - <xsl:variable name="list"> |
| 4802 | - <xsl:for-each select="default/value"> |
| 4803 | - <xsl:call-template name="printColor"/> |
| 4804 | - <xsl:text>,</xsl:text> |
| 4805 | - </xsl:for-each> |
| 4806 | - </xsl:variable> |
| 4807 | - <xsl:value-of select="substring($list,1,string-length($list) - 1)"/> |
| 4808 | - </xsl:template> |
| 4809 | - |
| 4810 | - <!-- |
| 4811 | - generates the #00aabbcc color value out of the compiz |
| 4812 | - metadata color description |
| 4813 | - --> |
| 4814 | - <xsl:template name="printColor"> |
| 4815 | - <xsl:variable name="red"> |
| 4816 | - <xsl:call-template name="getHexNum"> |
| 4817 | - <xsl:with-param name="value" select="red/text()"/> |
| 4818 | - </xsl:call-template> |
| 4819 | - </xsl:variable> |
| 4820 | - <xsl:variable name="green"> |
| 4821 | - <xsl:call-template name="getHexNum"> |
| 4822 | - <xsl:with-param name="value" select="green/text()"/> |
| 4823 | - </xsl:call-template> |
| 4824 | - </xsl:variable> |
| 4825 | - <xsl:variable name="blue"> |
| 4826 | - <xsl:call-template name="getHexNum"> |
| 4827 | - <xsl:with-param name="value" select="blue/text()"/> |
| 4828 | - </xsl:call-template> |
| 4829 | - </xsl:variable> |
| 4830 | - <xsl:variable name="alpha"> |
| 4831 | - <xsl:choose> |
| 4832 | - <xsl:when test="alpha/text()"> |
| 4833 | - <xsl:call-template name="getHexNum"> |
| 4834 | - <xsl:with-param name="value" select="alpha/text()"/> |
| 4835 | - </xsl:call-template> |
| 4836 | - </xsl:when> |
| 4837 | - <xsl:otherwise> |
| 4838 | - <xsl:text>ff</xsl:text> |
| 4839 | - </xsl:otherwise> |
| 4840 | - </xsl:choose> |
| 4841 | - </xsl:variable> |
| 4842 | - <xsl:value-of select="concat('#',concat($red,concat($green,concat($blue,$alpha))))"/> |
| 4843 | - </xsl:template> |
| 4844 | - |
| 4845 | - <!-- |
| 4846 | - converts a decimal number in the range of 0-65535 or |
| 4847 | - a hex number in the range of 0x0000 - 0xffff to a hex number in the |
| 4848 | - range of 00 - ff |
| 4849 | - --> |
| 4850 | - <xsl:template name="getHexNum"> |
| 4851 | - <xsl:param name="value"/> |
| 4852 | - <xsl:choose> |
| 4853 | - <xsl:when test="starts-with($value,'0x')"> |
| 4854 | - <xsl:variable name="number"> |
| 4855 | - <xsl:text>0000</xsl:text> |
| 4856 | - <xsl:value-of select="substring-after($value,'0x')"/> |
| 4857 | - </xsl:variable> |
| 4858 | - <xsl:value-of select="substring(concat('000',$number),string-length($number),2)"/> |
| 4859 | - </xsl:when> |
| 4860 | - <xsl:when test="string-length($value)"> |
| 4861 | - <xsl:variable name="number"> |
| 4862 | - <xsl:call-template name="toHex"> |
| 4863 | - <xsl:with-param name="decimalNumber" select="$value"/> |
| 4864 | - </xsl:call-template> |
| 4865 | - </xsl:variable> |
| 4866 | - <xsl:value-of select="substring(concat('000',$number),string-length($number),2)"/> |
| 4867 | - </xsl:when> |
| 4868 | - <xsl:otherwise> |
| 4869 | - <xsl:text>00</xsl:text> |
| 4870 | - </xsl:otherwise> |
| 4871 | - </xsl:choose> |
| 4872 | - </xsl:template> |
| 4873 | - |
| 4874 | - <!-- generates a list of selected edges --> |
| 4875 | - <xsl:template name="printEdgeList"> |
| 4876 | - <xsl:variable name="list"> |
| 4877 | - <xsl:for-each select="default/edge"> |
| 4878 | - <xsl:value-of select="@name"/> |
| 4879 | - <xsl:text> | </xsl:text> |
| 4880 | - </xsl:for-each> |
| 4881 | - </xsl:variable> |
| 4882 | - <xsl:value-of select="substring($list,1,string-length($list) - 3)"/> |
| 4883 | - </xsl:template> |
| 4884 | - |
| 4885 | - <!-- prints the key path for an option --> |
| 4886 | - <xsl:template name="printKey"> |
| 4887 | - <xsl:value-of select="$appName"/> |
| 4888 | - <xsl:choose> |
| 4889 | - <xsl:when test="ancestor::plugin"> |
| 4890 | - <xsl:text>/plugins/</xsl:text> |
| 4891 | - <xsl:value-of select="ancestor::plugin/@name"/> |
| 4892 | - </xsl:when> |
| 4893 | - <xsl:otherwise> |
| 4894 | - <xsl:text>/general</xsl:text> |
| 4895 | - </xsl:otherwise> |
| 4896 | - </xsl:choose> |
| 4897 | - <xsl:text>/screen0/options/</xsl:text> |
| 4898 | - <xsl:value-of select="@name"/> |
| 4899 | - </xsl:template> |
| 4900 | - |
| 4901 | - <!-- converts a decimal number to a hex number --> |
| 4902 | - <xsl:variable name="hexDigits" select="'0123456789abcdef'" /> |
| 4903 | - |
| 4904 | - <xsl:template name="toHex"> |
| 4905 | - <xsl:param name="decimalNumber" /> |
| 4906 | - <xsl:if test="$decimalNumber >= 16"> |
| 4907 | - <xsl:call-template name="toHex"> |
| 4908 | - <xsl:with-param name="decimalNumber" select="floor($decimalNumber div 16)" /> |
| 4909 | - </xsl:call-template> |
| 4910 | - </xsl:if> |
| 4911 | - <xsl:value-of select="substring($hexDigits, ($decimalNumber mod 16) + 1, 1)" /> |
| 4912 | - </xsl:template> |
| 4913 | - |
| 4914 | -</xsl:stylesheet> |


Yes!!!