Merge lp:~muktupavels/compiz/remove-mate-integration into lp:compiz/0.9.13

Proposed by Alberts Muktupāvels on 2019-02-06
Status: Merged
Approved by: Dmitry Shachnev on 2019-02-07
Approved revision: 4201
Merged at revision: 4207
Proposed branch: lp:~muktupavels/compiz/remove-mate-integration
Merge into: lp:compiz/0.9.13
Diff against target: 5297 lines (+0/-5174)
23 files modified
compizconfig/integration/CMakeLists.txt (+0/-1)
compizconfig/integration/mate/CMakeLists.txt (+0/-42)
compizconfig/integration/mate/gsettings/CMakeLists.txt (+0/-54)
compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting.h (+0/-40)
compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting_factory.h (+0/-46)
compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_wrapper_factory.h (+0/-44)
compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting.c (+0/-355)
compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting_factory.c (+0/-261)
compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_wrapper_factory.c (+0/-136)
compizconfig/integration/mate/gsettings/tests/CMakeLists.txt (+0/-30)
compizconfig/integration/mate/gsettings/tests/compizconfig_test_ccs_mate_gsettings_integrated_setting.cpp (+0/-443)
compizconfig/integration/mate/include/ccs_mate_fwd.h (+0/-13)
compizconfig/integration/mate/include/ccs_mate_integrated_setting.h (+0/-64)
compizconfig/integration/mate/include/ccs_mate_integration.h (+0/-46)
compizconfig/integration/mate/include/ccs_mate_integration_constants.h (+0/-217)
compizconfig/integration/mate/include/ccs_mate_integration_types.h (+0/-19)
compizconfig/integration/mate/src/ccs_mate_integrated_setting.c (+0/-161)
compizconfig/integration/mate/src/ccs_mate_integration.c (+0/-815)
compizconfig/integration/mate/src/ccs_mate_integration_constants.c (+0/-1099)
compizconfig/integration/mate/tests/CMakeLists.txt (+0/-46)
compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.c (+0/-220)
compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.h (+0/-41)
compizconfig/integration/mate/tests/compizconfig_test_ccs_mate_integration.cpp (+0/-981)
To merge this branch: bzr merge lp:~muktupavels/compiz/remove-mate-integration
Reviewer Review Type Date Requested Status
Dmitry Shachnev 2019-02-06 Approve on 2019-02-06
Martin Wimpress 2019-02-06 Pending
Review via email: mp+362761@code.launchpad.net

Commit message

compizconfig: remove unused MATE integration

Description of the change

MATE integration is not used at all. Either this is unfinished work or someone did not understand what he was doing...

GNOME integration is built as static library that is used by gsettings backend. For example ccsGNOMEIntegrationBackendNew is called in compizconfig/gsettings/src/gsettings.c.

To post a comment you must log in.
Dmitry Shachnev (mitya57) wrote :

And there are almost no code changes compared to GNOME integration, it is mostly renaming functions from GNOME* to MATE*, removing some Unity-specific code, and removing the gschema.

Also it misses some fixes like the recent s/fullscreen/fullscreen-flash/ fix.

If someone wants to reintroduce this in the future, it is better to reuse existing code rather than duplicate it.

review: Approve
Alberts Muktupāvels (muktupavels) wrote :

I think there could be multiple options:

- duplicate also gsettings backend as gsettings-mate, but that does not sound like good thing to just add MATE integration.

- Link MATE integration with gsettings backend and choose integration based on current desktop environment.

- Change integration setting in configuration from boolean to string or enum - None, GNOME and MATE. And if backend supports integration (ini backend does not) then it could return list with valid integrations that user can choose from in ccsm. Of course default provided by config.

Third option in my opinion could be best thing and second might work, but does not sound that good. Anyway MATE configuration currently has integration = false and I am not going to do this work... If anyone decides to do this work this can be reverted if needed.

4201. By Alberts Muktupāvels on 2019-02-07

Merge with lp:compiz.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'compizconfig/integration/CMakeLists.txt'
2--- compizconfig/integration/CMakeLists.txt 2015-02-04 22:20:18 +0000
3+++ compizconfig/integration/CMakeLists.txt 2019-02-07 13:57:59 +0000
4@@ -1,2 +1,1 @@
5 add_subdirectory (gnome)
6-add_subdirectory (mate)
7
8=== removed directory 'compizconfig/integration/mate'
9=== removed file 'compizconfig/integration/mate/CMakeLists.txt'
10--- compizconfig/integration/mate/CMakeLists.txt 2019-02-05 15:45:03 +0000
11+++ compizconfig/integration/mate/CMakeLists.txt 1970-01-01 00:00:00 +0000
12@@ -1,42 +0,0 @@
13-add_subdirectory (gsettings)
14-
15-set (_deps
16- glib-2.0>=2.20.0
17- gio-2.0>=2.25.0)
18-
19-compiz_pkg_check_modules (COMPIZCONFIG_MATE_INTEGRATION ${_deps})
20-
21-if (COMPIZCONFIG_MATE_INTEGRATION_FOUND)
22-
23- include_directories (${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include
24- ${CMAKE_SOURCE_DIR}/compizconfig/integration/mate/include
25- ${COMPIZCONFIG_MATE_INTEGRATION_INCLUDE_DIRS})
26-
27- link_directories (${CMAKE_BINARY_DIR}/compizconfig/libcompizconfig
28- ${COMPIZCONFIG_MATE_INTEGRATION_LIBRARY_DIRS})
29-
30- add_library (compizconfig_mate_integration_constants STATIC
31- ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration_constants.c)
32-
33- add_library (compizconfig_mate_integration STATIC
34- ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration.c)
35-
36- target_link_libraries (compizconfig_mate_integration
37- compizconfig_mate_integration_constants
38- compizconfig_mate_integrated_setting
39- compizconfig
40- ${COMPIZCONFIG_MATE_INTEGRATION_LIBRARIES})
41-
42- add_library (compizconfig_mate_integrated_setting STATIC
43- ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integrated_setting.c)
44-
45- target_link_libraries (compizconfig_mate_integrated_setting
46- compizconfig_mate_integration_constants
47- compizconfig
48- ${COMPIZCONFIG_MATE_INTEGRATION_LIBRARIES})
49-
50- if (COMPIZ_BUILD_TESTING)
51- add_subdirectory (tests)
52- endif (COMPIZ_BUILD_TESTING)
53-
54-endif (COMPIZCONFIG_MATE_INTEGRATION_FOUND)
55
56=== removed directory 'compizconfig/integration/mate/gsettings'
57=== removed file 'compizconfig/integration/mate/gsettings/CMakeLists.txt'
58--- compizconfig/integration/mate/gsettings/CMakeLists.txt 2019-02-05 15:45:03 +0000
59+++ compizconfig/integration/mate/gsettings/CMakeLists.txt 1970-01-01 00:00:00 +0000
60@@ -1,54 +0,0 @@
61- set (_deps
62- glib-2.0>=2.20.0
63- gio-2.0>=2.25.0)
64-
65- compiz_pkg_check_modules (COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION ${_deps})
66-
67- if (COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_FOUND)
68-
69- include_directories (${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include
70- ${CMAKE_SOURCE_DIR}/compizconfig/gsettings/gsettings_backend_shared
71- ${CMAKE_SOURCE_DIR}/compizconfig/integration/mate/include
72- ${CMAKE_SOURCE_DIR}/compizconfig/integration/mate/gsettings/include
73- ${COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_INCLUDE_DIRS})
74-
75- link_directories (${CMAKE_BINARY_DIR}/compizconfig/libcompizconfig
76- ${CMAKE_BINARY_DIR}/compizconfig/gsettings/gsettings_backend_shared
77- ${CMAKE_BINARY_DIR}/compizconfig/integration/mate
78- ${COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_LIBRARY_DIRS})
79-
80- add_library (compizconfig_mate_integration_gsettings_integrated_setting STATIC
81- ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration_gsettings_integrated_setting.c)
82-
83- target_link_libraries (compizconfig_mate_integration_gsettings_integrated_setting
84- compizconfig_mate_integrated_setting
85- compizconfig_mate_integration_constants
86- compizconfig
87- compizconfig_gsettings_util
88- ${COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_LIBRARIES})
89-
90- add_library (compizconfig_mate_integration_gsettings_setting_factory STATIC
91- ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration_gsettings_integrated_setting_factory.c)
92-
93- target_link_libraries (compizconfig_mate_integration_gsettings_setting_factory
94- compizconfig_gsettings_wrapper_factory_interface
95- compizconfig_mate_integration_constants
96- compizconfig_mate_integrated_setting
97- compizconfig_mate_integration_gsettings_integrated_setting
98- compizconfig
99- compizconfig_gsettings_util
100- ${COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_LIBRARIES})
101-
102- add_library (compizconfig_mate_integration_gsettings_wrapper_factory STATIC
103- ${CMAKE_CURRENT_SOURCE_DIR}/src/ccs_mate_integration_gsettings_wrapper_factory.c)
104-
105- target_link_libraries (compizconfig_mate_integration_gsettings_setting_factory
106- compizconfig_gsettings_wrapper_factory_interface
107- compizconfig
108- ${COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_LIBRARIES})
109-
110- if (COMPIZ_BUILD_TESTING)
111- add_subdirectory (tests)
112- endif (COMPIZ_BUILD_TESTING)
113-
114- endif (COMPIZCONFIG_MATE_GSETTINGS_INTEGRATION_FOUND)
115
116=== removed directory 'compizconfig/integration/mate/gsettings/include'
117=== removed file 'compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting.h'
118--- compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting.h 2015-02-04 22:20:18 +0000
119+++ compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting.h 1970-01-01 00:00:00 +0000
120@@ -1,40 +0,0 @@
121-#ifndef _CCS_MATE_GSETTINGS_INTEGRATED_SETTING_H
122-#define _CCS_MATE_GSETTINGS_INTEGRATED_SETTING_H
123-
124-#include <ccs-defs.h>
125-#include <ccs-fwd.h>
126-#include <ccs_mate_fwd.h>
127-#include <ccs_gsettings_backend_fwd.h>
128-
129-COMPIZCONFIG_BEGIN_DECLS
130-
131-/**
132- * @brief ccsGSettingsIntegratedSettingNew
133- * @param base
134- * @param wrapper
135- * @param ai
136- * @return
137- *
138- * The GSettings implementation of CCSIntegratedSetting *, which will
139- * write using a CCSGSettingsWrapper * object when the read and write
140- * methods are called.
141- */
142-CCSIntegratedSetting *
143-ccsGSettingsIntegratedSettingNew (CCSMATEIntegratedSettingInfo *base,
144- CCSGSettingsWrapper *wrapper,
145- CCSObjectAllocationInterface *ai);
146-
147-/**
148- * @brief ccsGSettingsIntegratedSettingsTranslateOldMATEKeyForGSettings
149- * @param key the old style mate key to translate
150- * @return new-style key. Caller should free
151- *
152- * This translates old style keys (eg foo_bar) to new style keys
153- * foo-bar and special cases a few keys
154- */
155-char *
156-ccsGSettingsIntegratedSettingsTranslateOldMATEKeyForGSettings (const char *key);
157-
158-COMPIZCONFIG_END_DECLS
159-
160-#endif
161
162=== removed file 'compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting_factory.h'
163--- compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting_factory.h 2015-02-04 22:20:18 +0000
164+++ compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_integrated_setting_factory.h 1970-01-01 00:00:00 +0000
165@@ -1,46 +0,0 @@
166-#ifndef _CCS_MATE_GSETTINGS_INTEGRATED_SETTING_FACTORY_H
167-#define _CCS_MATE_GSETTINGS_INTEGRATED_SETTING_FACTORY_H
168-
169-#include <ccs-defs.h>
170-#include <ccs-fwd.h>
171-#include <ccs_mate_fwd.h>
172-#include <ccs_gsettings_backend_fwd.h>
173-#include <gio/gio.h>
174-
175-COMPIZCONFIG_BEGIN_DECLS
176-
177-/**
178- * @brief ccsGSettingsIntegratedSettingsTranslateNewMATEKeyForCCS
179- * @param key the old style mate key to translate
180- * @return new-style key. Caller should free
181- *
182- * This translates new style keys (eg foo-bar) to old style keys
183- * foo_bar and special cases a few keys
184- */
185-char *
186-ccsGSettingsIntegratedSettingsTranslateNewMATEKeyForCCS (const char *key);
187-
188-/**
189- * @brief ccsGSettingsIntegratedSettingsChangeCallback
190- * @return callback for settings change data
191- *
192- * This returns the default callback used for settings changes
193- *
194- * TODO: This API doesn't make a whole lot of sense, but we need
195- * it if we want to inject CCSGSettingsWrapperFactory into
196- * ccsGSettingsIntegratedSettingFactoryNew.
197- *
198- * The return type is GCallback to hide the details of this function
199- * from callers
200- */
201-GCallback
202-ccsGSettingsIntegratedSettingsChangeCallback ();
203-
204-CCSIntegratedSettingFactory *
205-ccsGSettingsIntegratedSettingFactoryNew (CCSGSettingsWrapperFactory *wrapperFactory,
206- CCSMATEValueChangeData *data,
207- CCSObjectAllocationInterface *ai);
208-
209-COMPIZCONFIG_END_DECLS
210-
211-#endif
212
213=== removed file 'compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_wrapper_factory.h'
214--- compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_wrapper_factory.h 2015-02-04 22:20:18 +0000
215+++ compizconfig/integration/mate/gsettings/include/ccs_mate_integration_gsettings_wrapper_factory.h 1970-01-01 00:00:00 +0000
216@@ -1,44 +0,0 @@
217-/**
218- *
219- * GSettings libcompizconfig backend
220- *
221- * ccs_gsettings_wrapper_factory.h
222- *
223- * Copyright (c) 2012 Canonical Ltd
224- *
225- * This program is free software; you can redistribute it and/or
226- * modify it under the terms of the GNU General Public License
227- * as published by the Free Software Foundation; either version 2
228- * of the License, or (at your option) any later version.
229- *
230- * This program is distributed in the hope that it will be useful,
231- * but WITHOUT ANY WARRANTY; without even the implied warranty of
232- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
233- * GNU General Public License for more details.
234- *
235- * Authored By:
236- * Sam Spilsbury <sam.spilsbury@canonical.com>
237- *
238- **/
239-#ifndef _CCS_MATE_INTEGRATION_GSETTINGS_WRAPPER_FACTORY_H
240-#define _CCS_MATE_INTEGRATION_GSETTINGS_WRAPPER_FACTORY_H
241-
242-#include <ccs-defs.h>
243-
244-COMPIZCONFIG_BEGIN_DECLS
245-
246-#include <gio/gio.h>
247-
248-#include <ccs-fwd.h>
249-#include <ccs_gsettings_backend_fwd.h>
250-#include <ccs_mate_fwd.h>
251-
252-CCSGSettingsWrapperFactory *
253-ccsMATEIntegrationGSettingsWrapperFactoryDefaultImplNew (CCSObjectAllocationInterface *ai,
254- CCSGSettingsWrapperFactory *factory,
255- GCallback callback,
256- CCSMATEValueChangeData *data);
257-
258-COMPIZCONFIG_END_DECLS
259-
260-#endif
261
262=== removed directory 'compizconfig/integration/mate/gsettings/src'
263=== removed file 'compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting.c'
264--- compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting.c 2015-02-04 22:20:18 +0000
265+++ compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting.c 1970-01-01 00:00:00 +0000
266@@ -1,355 +0,0 @@
267-#include <stdlib.h>
268-#include <string.h>
269-
270-#include <gio/gio.h>
271-
272-#include <ccs.h>
273-#include <ccs-backend.h>
274-#include <ccs-object.h>
275-
276-#include <ccs_gsettings_interface.h>
277-#include <gsettings_shared.h>
278-
279-#include "ccs_mate_integration_gsettings_integrated_setting.h"
280-#include "ccs_mate_integrated_setting.h"
281-#include "ccs_mate_integration_constants.h"
282-
283-
284-/* CCSGSettingsIntegratedSetting implementation */
285-typedef struct _CCSGSettingsIntegratedSettingPrivate CCSGSettingsIntegratedSettingPrivate;
286-
287-struct _CCSGSettingsIntegratedSettingPrivate
288-{
289- CCSMATEIntegratedSettingInfo *mateIntegratedSetting;
290- CCSGSettingsWrapper *wrapper;
291-};
292-
293-char *
294-ccsGSettingsIntegratedSettingsTranslateOldMATEKeyForGSettings (const char *key)
295-{
296- char *newKey = translateKeyForGSettings (key);
297-
298- if (g_strcmp0 (newKey, "run-command-screenshot") == 0)
299- {
300- free (newKey);
301- newKey = strdup ("screenshot");
302- }
303- else if (g_strcmp0 (newKey, "run-command-window-screenshot") == 0)
304- {
305- free (newKey);
306- newKey = strdup ("window-screenshot");
307- }
308- else if (g_strcmp0 (newKey, "run-command-terminal") == 0)
309- {
310- free (newKey);
311- newKey = strdup ("terminal");
312- }
313-
314- return newKey;
315-}
316-
317-SpecialOptionType
318-ccsGSettingsIntegratedSettingGetSpecialOptionType (CCSMATEIntegratedSettingInfo *setting)
319-{
320- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
321-
322- return ccsMATEIntegratedSettingInfoGetSpecialOptionType (priv->mateIntegratedSetting);
323-}
324-
325-const char *
326-ccsGSettingsIntegratedSettingGetMATEName (CCSMATEIntegratedSettingInfo *setting)
327-{
328- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
329-
330- return ccsMATEIntegratedSettingInfoGetMATEName (priv->mateIntegratedSetting);
331-}
332-
333-CCSSettingValue *
334-ccsGSettingsIntegratedSettingReadValue (CCSIntegratedSetting *setting, CCSSettingType type)
335-{
336- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
337- CCSSettingValue *v = calloc (1, sizeof (CCSSettingValue));
338- const char *mateKeyName = ccsMATEIntegratedSettingInfoGetMATEName ((CCSMATEIntegratedSettingInfo *) setting);
339- char *gsettingsTranslatedName = ccsGSettingsIntegratedSettingsTranslateOldMATEKeyForGSettings (mateKeyName);
340-
341- v->isListChild = FALSE;
342- v->parent = NULL;
343- v->refCount = 1;
344-
345- GVariant *variant = ccsGSettingsWrapperGetValue (priv->wrapper, gsettingsTranslatedName);
346-
347- if (!variant)
348- {
349- free (gsettingsTranslatedName);
350- free (v);
351- return NULL;
352- }
353-
354- const GVariantType *variantType = G_VARIANT_TYPE (g_variant_get_type_string (variant));
355-
356- switch (type)
357- {
358- case TypeInt:
359- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE_INT32))
360- {
361- ccsError ("Expected integer value");
362- free (v);
363- v = NULL;
364- break;
365- }
366-
367- v->value.asInt = readIntFromVariant (variant);
368- break;
369- case TypeBool:
370- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE_BOOLEAN))
371- {
372- ccsError ("Expected boolean value");
373- free (v);
374- v = NULL;
375- break;
376- }
377-
378- v->value.asBool = readBoolFromVariant (variant);
379- break;
380- case TypeString:
381- {
382- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE_STRING))
383- {
384- ccsError ("Expected string value");
385- free (v);
386- v = NULL;
387- break;
388- }
389-
390- const char *str = readStringFromVariant (variant);
391- v->value.asString = strdup (str ? str : "");
392- break;
393- }
394- case TypeKey:
395- {
396- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE ("as")))
397- {
398- ccsError ("Expected array-of-string value");
399- free (v);
400- v = NULL;
401- break;
402- }
403-
404- gsize len;
405- const gchar **strv = g_variant_get_strv (variant, &len);
406-
407- if (strv)
408- v->value.asString = strdup (strv[0] ? strv[0] : "");
409- else
410- v->value.asString = strdup ("");
411-
412- g_free (strv);
413- break;
414- }
415- default:
416- g_assert_not_reached ();
417- }
418-
419- g_variant_unref (variant);
420- free (gsettingsTranslatedName);
421-
422- return v;
423-}
424-
425-void
426-ccsGSettingsIntegratedSettingWriteValue (CCSIntegratedSetting *setting, CCSSettingValue *v, CCSSettingType type)
427-{
428- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
429- const char *mateKeyName = ccsMATEIntegratedSettingInfoGetMATEName ((CCSMATEIntegratedSettingInfo *) setting);
430- char *gsettingsTranslatedName = ccsGSettingsIntegratedSettingsTranslateOldMATEKeyForGSettings (mateKeyName);
431-
432- GVariant *variant = ccsGSettingsWrapperGetValue (priv->wrapper, gsettingsTranslatedName);
433- const GVariantType *variantType = g_variant_get_type (variant);
434- GVariant *newVariant = NULL;
435-
436- if (!variant)
437- {
438- ccsError ("NULL encountered while reading GSettings value");
439- free (gsettingsTranslatedName);
440- return;
441- }
442-
443- switch (type)
444- {
445- case TypeInt:
446- {
447- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE_INT32))
448- ccsError ("Expected integer value");
449- else
450- {
451- int currentValue = readIntFromVariant (variant);
452-
453- if ((currentValue != v->value.asInt))
454- writeIntToVariant (v->value.asInt, &newVariant);
455- }
456- }
457- break;
458- case TypeBool:
459- {
460- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE_BOOLEAN))
461- ccsError ("Expected boolean value");
462- else
463- {
464- gboolean currentValue = readBoolFromVariant (variant);
465-
466- if ((currentValue != v->value.asBool))
467- writeBoolToVariant (v->value.asBool, &newVariant);
468- }
469- }
470- break;
471- case TypeString:
472- {
473- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE_STRING))
474- ccsError ("Expected string value");
475- else
476- {
477- const char *defaultValue = "";
478- const char *newValue = v->value.asString ? v->value.asString : defaultValue;
479- gsize len = 0;
480- const gchar *currentValue = g_variant_get_string (variant, &len);
481-
482- if (currentValue)
483- {
484- if (strcmp (currentValue, newValue) != 0)
485- writeStringToVariant (newValue, &newVariant);
486- }
487- }
488- }
489- break;
490- case TypeKey:
491- {
492- if (!g_variant_type_equal (variantType, G_VARIANT_TYPE ("as")))
493- ccsError ("Expected array-of-string value");
494- else
495- {
496- const char *defaultValue = "";
497- GVariantBuilder strvBuilder;
498-
499- g_variant_builder_init (&strvBuilder, G_VARIANT_TYPE ("as"));
500- g_variant_builder_add (&strvBuilder, "s", v->value.asString ? v->value.asString : defaultValue);
501- newVariant = g_variant_builder_end (&strvBuilder);
502- }
503- }
504- break;
505- default:
506- g_assert_not_reached ();
507- break;
508- }
509-
510- /* g_settings_set_value consumes the reference */
511- if (newVariant)
512- ccsGSettingsWrapperSetValue (priv->wrapper, gsettingsTranslatedName, newVariant);
513-
514- g_variant_unref (variant);
515- free (gsettingsTranslatedName);
516-}
517-
518-const char *
519-ccsGSettingsIntegratedSettingInfoPluginName (CCSIntegratedSettingInfo *setting)
520-{
521- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
522-
523- return ccsIntegratedSettingInfoPluginName ((CCSIntegratedSettingInfo *) priv->mateIntegratedSetting);
524-}
525-
526-const char *
527-ccsGSettingsIntegratedSettingInfoSettingName (CCSIntegratedSettingInfo *setting)
528-{
529- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
530-
531- return ccsIntegratedSettingInfoSettingName ((CCSIntegratedSettingInfo *) priv->mateIntegratedSetting);
532-}
533-
534-CCSSettingType
535-ccsGSettingsIntegratedSettingInfoGetType (CCSIntegratedSettingInfo *setting)
536-{
537- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
538-
539- return ccsIntegratedSettingInfoGetType ((CCSIntegratedSettingInfo *) priv->mateIntegratedSetting);
540-}
541-
542-void
543-ccsGSettingsIntegratedSettingFree (CCSIntegratedSetting *setting)
544-{
545- CCSGSettingsIntegratedSettingPrivate *priv = (CCSGSettingsIntegratedSettingPrivate *) ccsObjectGetPrivate (setting);
546-
547- if (priv->wrapper)
548- ccsGSettingsWrapperUnref (priv->wrapper);
549-
550- ccsIntegratedSettingInfoUnref ((CCSIntegratedSettingInfo *) priv->mateIntegratedSetting);
551- ccsObjectFinalize (setting);
552-
553- (*setting->object.object_allocation->free_) (setting->object.object_allocation->allocator, setting);
554-}
555-
556-void
557-ccsGSettingsIntegratedSettingInfoFree (CCSIntegratedSettingInfo *info)
558-{
559- return ccsGSettingsIntegratedSettingFree ((CCSIntegratedSetting *) info);
560-}
561-
562-void
563-ccsGSettingsMATEIntegratedSettingInfoFree (CCSMATEIntegratedSettingInfo *info)
564-{
565- return ccsGSettingsIntegratedSettingFree ((CCSIntegratedSetting *) info);
566-}
567-
568-const CCSMATEIntegratedSettingInfoInterface ccsGSettingsMATEIntegratedSettingInterface =
569-{
570- ccsGSettingsIntegratedSettingGetSpecialOptionType,
571- ccsGSettingsIntegratedSettingGetMATEName,
572- ccsGSettingsMATEIntegratedSettingInfoFree
573-};
574-
575-const CCSIntegratedSettingInterface ccsGSettingsIntegratedSettingInterface =
576-{
577- ccsGSettingsIntegratedSettingReadValue,
578- ccsGSettingsIntegratedSettingWriteValue,
579- ccsGSettingsIntegratedSettingFree
580-};
581-
582-const CCSIntegratedSettingInfoInterface ccsGSettingsIntegratedSettingInfoInterface =
583-{
584- ccsGSettingsIntegratedSettingInfoPluginName,
585- ccsGSettingsIntegratedSettingInfoSettingName,
586- ccsGSettingsIntegratedSettingInfoGetType,
587- ccsGSettingsIntegratedSettingInfoFree
588-};
589-
590-CCSIntegratedSetting *
591-ccsGSettingsIntegratedSettingNew (CCSMATEIntegratedSettingInfo *base,
592- CCSGSettingsWrapper *wrapper,
593- CCSObjectAllocationInterface *ai)
594-{
595- CCSIntegratedSetting *setting = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegratedSetting));
596-
597- if (!setting)
598- return NULL;
599-
600- CCSGSettingsIntegratedSettingPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGSettingsIntegratedSettingPrivate));
601-
602- if (!priv)
603- {
604- (*ai->free_) (ai->allocator, priv);
605- return NULL;
606- }
607-
608- priv->mateIntegratedSetting = base;
609- priv->wrapper = wrapper;
610-
611- ccsGSettingsWrapperRef (priv->wrapper);
612-
613- ccsObjectInit (setting, ai);
614- ccsObjectSetPrivate (setting, (CCSPrivate *) priv);
615- ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGSettingsIntegratedSettingInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInterface));
616- ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGSettingsIntegratedSettingInfoInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInfoInterface));
617- ccsObjectAddInterface (setting, (const CCSInterface *) &ccsGSettingsMATEIntegratedSettingInterface, GET_INTERFACE_TYPE (CCSMATEIntegratedSettingInfoInterface));
618- ccsIntegratedSettingRef (setting);
619-
620- return setting;
621-}
622
623=== removed file 'compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting_factory.c'
624--- compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting_factory.c 2015-02-04 22:20:18 +0000
625+++ compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_integrated_setting_factory.c 1970-01-01 00:00:00 +0000
626@@ -1,261 +0,0 @@
627-#include <stdlib.h>
628-#include <string.h>
629-
630-#include <gio/gio.h>
631-
632-#include <ccs.h>
633-#include <ccs-backend.h>
634-#include <ccs-object.h>
635-
636-#include <ccs_gsettings_interface.h>
637-#include <ccs_gsettings_interface_wrapper.h>
638-
639-#include <gsettings_util.h>
640-#include <ccs_gsettings_wrapper_factory_interface.h>
641-
642-#include "ccs_mate_integration.h"
643-#include "ccs_mate_integrated_setting.h"
644-#include "ccs_mate_integration_constants.h"
645-#include "ccs_mate_integration_types.h"
646-#include "ccs_mate_integration_gsettings_integrated_setting.h"
647-#include "ccs_mate_integration_gsettings_integrated_setting_factory.h"
648-
649-char *
650-ccsGSettingsIntegratedSettingsTranslateNewMATEKeyForCCS (const char *key)
651-{
652- char *newKey = translateKeyForCCS (key);
653-
654- if (g_strcmp0 (newKey, "screenshot") == 0)
655- {
656- free (newKey);
657- newKey = strdup ("run_command_screenshot");
658- }
659- else if (g_strcmp0 (newKey, "window_screenshot") == 0)
660- {
661- free (newKey);
662- newKey = strdup ("run_command_window_screenshot");
663- }
664- else if (g_strcmp0 (newKey, "terminal") == 0)
665- {
666- free (newKey);
667- newKey = strdup ("run_command_terminal");
668- }
669-
670- return newKey;
671-}
672-
673-typedef struct _CCSGSettingsIntegratedSettingFactoryPrivate CCSGSettingsIntegratedSettingFactoryPrivate;
674-
675-struct _CCSGSettingsIntegratedSettingFactoryPrivate
676-{
677- CCSGSettingsWrapperFactory *wrapperFactory;
678- GHashTable *pluginsToSettingsGSettingsWrapperQuarksHashTable;
679- GHashTable *quarksToGSettingsWrappersHashTable;
680- GHashTable *pluginsToSettingsSpecialTypesHashTable;
681- GHashTable *pluginsToSettingNameMATENameHashTable;
682- CCSMATEValueChangeData *valueChangeData;
683-};
684-
685-static void
686-mateGSettingsValueChanged (GSettings *settings,
687- gchar *key,
688- gpointer user_data)
689-{
690- CCSMATEValueChangeData *data = (CCSMATEValueChangeData *) user_data;
691- char *baseName = ccsGSettingsIntegratedSettingsTranslateNewMATEKeyForCCS (key);
692-
693- /* We don't care if integration is not enabled */
694- if (!ccsGetIntegrationEnabled (data->context))
695- return;
696-
697- CCSIntegratedSettingList settingList = ccsIntegratedSettingsStorageFindMatchingSettingsByPredicate (data->storage,
698- ccsMATEIntegrationFindSettingsMatchingPredicate,
699- baseName);
700-
701- ccsIntegrationUpdateIntegratedSettings (data->integration,
702- data->context,
703- settingList);
704-
705- g_free (baseName);
706-
707-}
708-
709-GCallback
710-ccsGSettingsIntegratedSettingsChangeCallback ()
711-{
712- return (GCallback) mateGSettingsValueChanged;
713-}
714-
715-static CCSIntegratedSetting *
716-createNewGSettingsIntegratedSetting (CCSGSettingsWrapper *wrapper,
717- const char *mateName,
718- const char *pluginName,
719- const char *settingName,
720- CCSSettingType type,
721- SpecialOptionType specialOptionType,
722- CCSObjectAllocationInterface *ai)
723-{
724- CCSIntegratedSettingInfo *sharedIntegratedSettingInfo = ccsSharedIntegratedSettingInfoNew (pluginName, settingName, type, ai);
725-
726- if (!sharedIntegratedSettingInfo)
727- return NULL;
728-
729- CCSMATEIntegratedSettingInfo *mateIntegratedSettingInfo = ccsMATEIntegratedSettingInfoNew (sharedIntegratedSettingInfo, specialOptionType, mateName, ai);
730-
731- if (!mateIntegratedSettingInfo)
732- {
733- ccsIntegratedSettingInfoUnref (sharedIntegratedSettingInfo);
734- return NULL;
735- }
736-
737- CCSIntegratedSetting *gsettingsIntegratedSetting = ccsGSettingsIntegratedSettingNew (mateIntegratedSettingInfo, wrapper, ai);
738-
739- if (!gsettingsIntegratedSetting)
740- {
741- ccsIntegratedSettingInfoUnref ((CCSIntegratedSettingInfo *) mateIntegratedSettingInfo);
742- return NULL;
743- }
744-
745- return gsettingsIntegratedSetting;
746-}
747-
748-static void
749-ccsGSettingsWrapperUnrefWrapper (gpointer wrapper)
750-{
751- ccsGSettingsWrapperUnref ((CCSGSettingsWrapper *) wrapper);
752-}
753-
754-static GHashTable *
755-initializeGSettingsWrappers (CCSGSettingsWrapperFactory *factory)
756-{
757- const CCSGSettingsWrapperIntegratedSchemasQuarks *quarks = ccsMATEGSettingsWrapperQuarks ();
758- GHashTable *quarksToGSettingsWrappers = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, ccsGSettingsWrapperUnrefWrapper);
759-
760- g_hash_table_insert (quarksToGSettingsWrappers, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED),
761- ccsGSettingsWrapperFactoryNewGSettingsWrapper (factory,
762- g_quark_to_string (quarks->ORG_COMPIZ_INTEGRATED),
763- factory->object.object_allocation));
764- g_hash_table_insert (quarksToGSettingsWrappers, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS),
765- ccsGSettingsWrapperFactoryNewGSettingsWrapper (factory,
766- g_quark_to_string (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS),
767- factory->object.object_allocation));
768- g_hash_table_insert (quarksToGSettingsWrappers, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES),
769- ccsGSettingsWrapperFactoryNewGSettingsWrapper (factory,
770- g_quark_to_string (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES),
771- factory->object.object_allocation));
772- g_hash_table_insert (quarksToGSettingsWrappers, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_DEFAULT_APPLICATIONS_TERMINAL),
773- ccsGSettingsWrapperFactoryNewGSettingsWrapper (factory,
774- g_quark_to_string (quarks->ORG_MATE_DESKTOP_DEFAULT_APPLICATIONS_TERMINAL),
775- factory->object.object_allocation));
776- g_hash_table_insert (quarksToGSettingsWrappers, GINT_TO_POINTER (quarks->ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS),
777- ccsGSettingsWrapperFactoryNewGSettingsWrapper (factory,
778- g_quark_to_string (quarks->ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS),
779- factory->object.object_allocation));
780-
781- return quarksToGSettingsWrappers;
782-}
783-
784-CCSIntegratedSetting *
785-ccsGSettingsIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType (CCSIntegratedSettingFactory *factory,
786- CCSIntegration *integration,
787- const char *pluginName,
788- const char *settingName,
789- CCSSettingType type)
790-{
791- CCSGSettingsIntegratedSettingFactoryPrivate *priv = (CCSGSettingsIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory);
792- GHashTable *settingsGSettingsWrapperQuarksHashTable = g_hash_table_lookup (priv->pluginsToSettingsGSettingsWrapperQuarksHashTable, pluginName);
793- GHashTable *settingsSpecialTypesHashTable = g_hash_table_lookup (priv->pluginsToSettingsSpecialTypesHashTable, pluginName);
794- GHashTable *settingsSettingNameMATENameHashTable = g_hash_table_lookup (priv->pluginsToSettingNameMATENameHashTable, pluginName);
795-
796- if (!priv->quarksToGSettingsWrappersHashTable)
797- priv->quarksToGSettingsWrappersHashTable = initializeGSettingsWrappers (priv->wrapperFactory);
798-
799- if (settingsGSettingsWrapperQuarksHashTable &&
800- settingsSpecialTypesHashTable &&
801- settingsSettingNameMATENameHashTable)
802- {
803- GQuark wrapperQuark = GPOINTER_TO_INT (g_hash_table_lookup (settingsGSettingsWrapperQuarksHashTable, settingName));
804- CCSGSettingsWrapper *wrapper = g_hash_table_lookup (priv->quarksToGSettingsWrappersHashTable, GINT_TO_POINTER (wrapperQuark));
805- SpecialOptionType specialType = (SpecialOptionType) GPOINTER_TO_INT (g_hash_table_lookup (settingsSpecialTypesHashTable, settingName));
806- const gchar *integratedName = g_hash_table_lookup (settingsSettingNameMATENameHashTable, settingName);
807-
808- if (wrapper == NULL)
809- return NULL;
810-
811- return createNewGSettingsIntegratedSetting (wrapper,
812- integratedName,
813- pluginName,
814- settingName,
815- type,
816- specialType,
817- factory->object.object_allocation);
818- }
819-
820-
821- return NULL;
822-}
823-
824-void
825-ccsGSettingsIntegratedSettingFactoryFree (CCSIntegratedSettingFactory *factory)
826-{
827- CCSGSettingsIntegratedSettingFactoryPrivate *priv = (CCSGSettingsIntegratedSettingFactoryPrivate *) ccsObjectGetPrivate (factory);
828-
829- if (priv->pluginsToSettingsGSettingsWrapperQuarksHashTable)
830- g_hash_table_unref (priv->pluginsToSettingsGSettingsWrapperQuarksHashTable);
831-
832- if (priv->quarksToGSettingsWrappersHashTable)
833- g_hash_table_unref (priv->quarksToGSettingsWrappersHashTable);
834-
835- if (priv->pluginsToSettingsSpecialTypesHashTable)
836- g_hash_table_unref (priv->pluginsToSettingsSpecialTypesHashTable);
837-
838- if (priv->pluginsToSettingNameMATENameHashTable)
839- g_hash_table_unref (priv->pluginsToSettingNameMATENameHashTable);
840-
841- ccsGSettingsWrapperFactoryUnref (priv->wrapperFactory);
842-
843- ccsObjectFinalize (factory);
844- (*factory->object.object_allocation->free_) (factory->object.object_allocation->allocator, factory);
845-}
846-
847-const CCSIntegratedSettingFactoryInterface ccsGSettingsIntegratedSettingFactoryInterface =
848-{
849- ccsGSettingsIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType,
850- ccsGSettingsIntegratedSettingFactoryFree
851-};
852-
853-CCSIntegratedSettingFactory *
854-ccsGSettingsIntegratedSettingFactoryNew (CCSGSettingsWrapperFactory *wrapperFactory,
855- CCSMATEValueChangeData *valueChangeData,
856- CCSObjectAllocationInterface *ai)
857-{
858- CCSIntegratedSettingFactory *factory = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegratedSettingFactory));
859-
860- if (!factory)
861- return NULL;
862-
863- CCSGSettingsIntegratedSettingFactoryPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGSettingsIntegratedSettingFactoryPrivate));
864-
865- if (!priv)
866- {
867- (*ai->free_) (ai->allocator, factory);
868- return NULL;
869- }
870-
871- ccsGSettingsWrapperFactoryRef (wrapperFactory);
872-
873- priv->wrapperFactory = wrapperFactory;
874- priv->pluginsToSettingsGSettingsWrapperQuarksHashTable = ccsMATEGSettingsIntegrationPopulateSettingNameToIntegratedSchemasQuarksHashTable ();
875- priv->pluginsToSettingsSpecialTypesHashTable = ccsMATEIntegrationPopulateSpecialTypesHashTables ();
876- priv->pluginsToSettingNameMATENameHashTable = ccsMATEIntegrationPopulateSettingNameToMATENameHashTables ();
877- priv->valueChangeData = valueChangeData;
878-
879- ccsObjectInit (factory, ai);
880- ccsObjectSetPrivate (factory, (CCSPrivate *) priv);
881- ccsObjectAddInterface (factory, (const CCSInterface *) &ccsGSettingsIntegratedSettingFactoryInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingFactoryInterface));
882-
883- ccsObjectRef (factory);
884-
885- return factory;
886-}
887-
888
889=== removed file 'compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_wrapper_factory.c'
890--- compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_wrapper_factory.c 2015-02-04 22:20:18 +0000
891+++ compizconfig/integration/mate/gsettings/src/ccs_mate_integration_gsettings_wrapper_factory.c 1970-01-01 00:00:00 +0000
892@@ -1,136 +0,0 @@
893-/**
894- *
895- * GSettings libcompizconfig backend
896- *
897- * ccs_mate_integration_gsettings_wrapper_factory.c
898- *
899- * Copyright (c) 2012 Canonical Ltd
900- *
901- * This program is free software; you can redistribute it and/or
902- * modify it under the terms of the GNU General Public License
903- * as published by the Free Software Foundation; either version 2
904- * of the License, or (at your option) any later version.
905- *
906- * This program is distributed in the hope that it will be useful,
907- * but WITHOUT ANY WARRANTY; without even the implied warranty of
908- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
909- * GNU General Public License for more details.
910- *
911- * Authored By:
912- * Sam Spilsbury <sam.spilsbury@canonical.com>
913- *
914- **/
915-#include <ccs-object.h>
916-#include "ccs_gsettings_wrapper_factory.h"
917-#include "ccs_gsettings_wrapper_factory_interface.h"
918-#include "ccs_gsettings_interface.h"
919-#include "ccs_gsettings_interface_wrapper.h"
920-#include "ccs_mate_integration_gsettings_wrapper_factory.h"
921-
922-/* CCSGSettingsWrapperFactory implementation */
923-typedef struct _CCSMATEIntegrationGSettingsWrapperFactoryPrivate CCSMATEIntegrationGSettingsWrapperFactoryPrivate;
924-struct _CCSMATEIntegrationGSettingsWrapperFactoryPrivate
925-{
926- CCSGSettingsWrapperFactory *wrapperFactory;
927- GCallback callback;
928-
929- /* This is expected to stay alive during the
930- * lifetime of this object */
931- CCSMATEValueChangeData *data;
932-};
933-
934-static void
935-ccsMATEIntegrationGSettingsWrapperFree (CCSGSettingsWrapperFactory *wrapperFactory)
936-{
937- CCSMATEIntegrationGSettingsWrapperFactoryPrivate *priv =
938- GET_PRIVATE (CCSMATEIntegrationGSettingsWrapperFactoryPrivate, wrapperFactory);
939-
940- ccsGSettingsWrapperFactoryUnref (priv->wrapperFactory);
941-
942- ccsObjectFinalize (wrapperFactory);
943- (*wrapperFactory->object.object_allocation->free_) (wrapperFactory->object.object_allocation->allocator,
944- wrapperFactory);
945-}
946-
947-static void
948-connectWrapperToChangedSignal (CCSGSettingsWrapper *wrapper,
949- CCSMATEIntegrationGSettingsWrapperFactoryPrivate *priv)
950-{
951- ccsGSettingsWrapperConnectToChangedSignal (wrapper, priv->callback, priv->data);
952-}
953-
954-static CCSGSettingsWrapper *
955-ccsMATEIntegrationGSettingsWrapperFactoryNewGSettingsWrapper (CCSGSettingsWrapperFactory *factory,
956- const gchar *schemaName,
957- CCSObjectAllocationInterface *ai)
958-{
959- CCSMATEIntegrationGSettingsWrapperFactoryPrivate *priv =
960- GET_PRIVATE (CCSMATEIntegrationGSettingsWrapperFactoryPrivate, factory);
961- CCSGSettingsWrapper *wrapper = ccsGSettingsWrapperFactoryNewGSettingsWrapper (priv->wrapperFactory,
962- schemaName,
963- factory->object.object_allocation);
964-
965- if (wrapper != NULL)
966- connectWrapperToChangedSignal (wrapper, priv);
967-
968- return wrapper;
969-}
970-
971-static CCSGSettingsWrapper *
972-ccsMATEIntegrationGSettingsWrapperFactoryNewGSettingsWrapperWithPath (CCSGSettingsWrapperFactory *factory,
973- const gchar *schemaName,
974- const gchar *path,
975- CCSObjectAllocationInterface *ai)
976-{
977- CCSMATEIntegrationGSettingsWrapperFactoryPrivate *priv =
978- GET_PRIVATE (CCSMATEIntegrationGSettingsWrapperFactoryPrivate, factory);
979- CCSGSettingsWrapper *wrapper = ccsGSettingsWrapperFactoryNewGSettingsWrapperWithPath (priv->wrapperFactory,
980- schemaName,
981- path,
982- factory->object.object_allocation);
983-
984- connectWrapperToChangedSignal (wrapper, priv);
985-
986- return wrapper;
987-}
988-
989-const CCSGSettingsWrapperFactoryInterface ccsMATEIntegrationGSettingsWrapperFactoryInterface =
990-{
991- ccsMATEIntegrationGSettingsWrapperFactoryNewGSettingsWrapper,
992- ccsMATEIntegrationGSettingsWrapperFactoryNewGSettingsWrapperWithPath,
993- ccsMATEIntegrationGSettingsWrapperFree
994-};
995-
996-CCSGSettingsWrapperFactory *
997-ccsMATEIntegrationGSettingsWrapperFactoryDefaultImplNew (CCSObjectAllocationInterface *ai,
998- CCSGSettingsWrapperFactory *factory,
999- GCallback callback,
1000- CCSMATEValueChangeData *data)
1001-{
1002- CCSGSettingsWrapperFactory *wrapperFactory = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGSettingsWrapperFactory));
1003-
1004- if (!wrapperFactory)
1005- return NULL;
1006-
1007- CCSMATEIntegrationGSettingsWrapperFactoryPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSMATEIntegrationGSettingsWrapperFactoryPrivate));
1008-
1009- if (!priv)
1010- {
1011- (*ai->free_) (ai->allocator, wrapperFactory);
1012- return NULL;
1013- }
1014-
1015- ccsGSettingsWrapperFactoryRef (factory);
1016-
1017- priv->wrapperFactory = factory;
1018- priv->callback = callback;
1019- priv->data = data;
1020-
1021- ccsObjectInit (wrapperFactory, ai);
1022- ccsObjectAddInterface (wrapperFactory, (const CCSInterface *) &ccsMATEIntegrationGSettingsWrapperFactoryInterface, GET_INTERFACE_TYPE (CCSGSettingsWrapperFactoryInterface));
1023- ccsObjectSetPrivate (wrapperFactory, (CCSPrivate *) priv);
1024-
1025- ccsGSettingsWrapperFactoryRef (wrapperFactory);
1026-
1027- return wrapperFactory;
1028-}
1029
1030=== removed directory 'compizconfig/integration/mate/gsettings/tests'
1031=== removed file 'compizconfig/integration/mate/gsettings/tests/CMakeLists.txt'
1032--- compizconfig/integration/mate/gsettings/tests/CMakeLists.txt 2015-07-30 19:56:19 +0000
1033+++ compizconfig/integration/mate/gsettings/tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
1034@@ -1,30 +0,0 @@
1035-include_directories (${GTEST_INCLUDE_DIRS})
1036-include_directories (${CMAKE_SOURCE_DIR}/include)
1037-include_directories (${CMAKE_SOURCE_DIR}/tests/shared)
1038-include_directories (${CMAKE_SOURCE_DIR}/tests/shared/glib)
1039-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../../../mocks/libcompizconfig)
1040-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../../../gsettings/tests)
1041-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../../../gsettings/mocks)
1042-include_directories (${CMAKE_SOURCE_DIR}/compizconfig/tests)
1043-link_directories (${CMAKE_INSTALL_PREFIX}/lib)
1044-link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../mocks/libcompizconfig)
1045-link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../tests/)
1046-link_directories (${CMAKE_CURRENT_BINARY_DIR}/../src/)
1047-
1048-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
1049-
1050-add_executable (compizconfig_test_ccs_mate_gsettings_integrated_setting
1051- ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_mate_gsettings_integrated_setting.cpp)
1052-
1053-target_link_libraries (compizconfig_test_ccs_mate_gsettings_integrated_setting
1054- ${GTEST_BOTH_LIBRARIES}
1055- ${GMOCK_LIBRARY}
1056- ${GMOCK_MAIN_LIBRARY}
1057- ${LIBCOMPIZCONFIG_LIBRARIES}
1058- compizconfig
1059- compizconfig_gsettings_settings_test_env
1060- compizconfig_ccs_gsettings_wrapper_mock
1061- compizconfig_mate_integration_gsettings_integrated_setting
1062- compizconfig_gsettings_backend_interface)
1063-
1064-compiz_discover_tests (compizconfig_test_ccs_mate_gsettings_integrated_setting COVERAGE compizconfig_mate_integration_gsettings_integrated_setting)
1065
1066=== removed file 'compizconfig/integration/mate/gsettings/tests/compizconfig_test_ccs_mate_gsettings_integrated_setting.cpp'
1067--- compizconfig/integration/mate/gsettings/tests/compizconfig_test_ccs_mate_gsettings_integrated_setting.cpp 2018-07-19 00:55:26 +0000
1068+++ compizconfig/integration/mate/gsettings/tests/compizconfig_test_ccs_mate_gsettings_integrated_setting.cpp 1970-01-01 00:00:00 +0000
1069@@ -1,443 +0,0 @@
1070-/*
1071- * Compiz configuration system library
1072- *
1073- * Copyright (C) 2012 Canonical Ltd.
1074- *
1075- * This library is free software; you can redistribute it and/or
1076- * modify it under the terms of the GNU Lesser General Public
1077- * License as published by the Free Software Foundation; either
1078- * version 2.1 of the License, or (at your option) any later version.
1079-
1080- * This library is distributed in the hope that it will be useful,
1081- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1082- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1083- * Lesser General Public License for more details.
1084-
1085- * You should have received a copy of the GNU Lesser General Public
1086- * License along with this library; if not, write to the Free Software
1087- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1088- *
1089- * Authored By:
1090- * Sam Spilsbury <sam.spilsbury@canonical.com>
1091- */
1092-#include <gtest/gtest.h>
1093-#include <gmock/gmock.h>
1094-
1095-#include <map>
1096-#include <memory>
1097-#include <boost/shared_ptr.hpp>
1098-
1099-#include <glib_gslice_off_env.h>
1100-#include <gtest_shared_autodestroy.h>
1101-
1102-#include <ccs.h>
1103-#include <ccs-backend.h>
1104-#include <ccs_mate_integrated_setting.h>
1105-#include <ccs_mate_integration_gsettings_integrated_setting.h>
1106-#include <ccs_gsettings_wrapper_mock.h>
1107-
1108-using ::testing::Combine;
1109-using ::testing::Return;
1110-using ::testing::IsNull;
1111-using ::testing::ValuesIn;
1112-using ::testing::Values;
1113-using ::testing::Eq;
1114-using ::testing::WithArgs;
1115-using ::testing::_;
1116-
1117-namespace compiz
1118-{
1119- namespace config
1120- {
1121- namespace integration
1122- {
1123- namespace test
1124- {
1125- const std::string KEYBINDING_ONE = "keybinding_one";
1126- const std::string KEYBINDING_TWO = "keybinding_two";
1127- const std::string STRING = "string";
1128- const Bool BOOLEAN = TRUE;
1129- const int INTEGER = 2;
1130-
1131- const std::string STRING_ALT = "string_alt";
1132- const Bool BOOLEAN_ALT = FALSE;
1133- const int INTEGER_ALT = 1;
1134-
1135- namespace variant_generators
1136- {
1137- GVariant * i ();
1138- GVariant * s ();
1139- GVariant * b ();
1140- GVariant * as ();
1141- GVariant * fromValue (CCSSettingValue *v, CCSSettingType type);
1142- }
1143-
1144- namespace value_generators
1145- {
1146- CCSSettingValue * integer ();
1147- CCSSettingValue * string ();
1148- CCSSettingValue * key ();
1149- CCSSettingValue * boolean ();
1150- }
1151-
1152- namespace expectations
1153- {
1154- void integer (CCSSettingValue *);
1155- void string (CCSSettingValue *);
1156- void boolean (CCSSettingValue *);
1157- void key (CCSSettingValue *);
1158-
1159- void integerVariant (GVariant *, int);
1160- void stringVariant (GVariant *, const std::string &);
1161- void booleanVariant (GVariant *, bool);
1162- void keyVariant (GVariant *, const std::string &);
1163- }
1164-
1165- typedef GVariant * (*VariantGenerator) ();
1166- typedef CCSSettingValue * (*ValueGenerator) ();
1167- typedef void (*Expectation) (CCSSettingValue *);
1168-
1169- struct GSettingsIntegratedSettingInfo
1170- {
1171- VariantGenerator variantGenerator;
1172- ValueGenerator valueGenerator;
1173- Expectation expectation;
1174- CCSSettingType settingType;
1175- CCSSettingType returnType;
1176- };
1177-
1178- namespace impl
1179- {
1180- namespace ccit = compiz::config::integration::test;
1181- namespace vg = compiz::config::integration::test::variant_generators;
1182- namespace cvg = compiz::config::integration::test::value_generators;
1183- namespace ex = compiz::config::integration::test::expectations;
1184-
1185- ccit::GSettingsIntegratedSettingInfo settingsInfo[] =
1186- {
1187- { vg::i, cvg::integer, ex::integer, TypeInt, TypeInt },
1188- { vg::b, cvg::boolean, ex::boolean, TypeBool, TypeBool },
1189- { vg::s, cvg::string, ex::string, TypeString, TypeString },
1190- { vg::as, cvg::key, ex::key, TypeKey, TypeString }
1191- };
1192- }
1193- }
1194- }
1195- }
1196-}
1197-
1198-MATCHER_P (VariantEqual, lhs, "Variants Equal")
1199-{
1200- return g_variant_equal (lhs, arg);
1201-}
1202-
1203-namespace
1204-{
1205- std::map <CCSSettingType, SpecialOptionType> &
1206- ccsTypeToSpecialType ()
1207- {
1208- static std::map <CCSSettingType, SpecialOptionType> types;
1209- static bool initialized = false;
1210-
1211- if (!initialized)
1212- {
1213- types[TypeInt] = OptionInt;
1214- types[TypeBool] = OptionBool;
1215- types[TypeString] = OptionString;
1216- types[TypeKey] = OptionKey;
1217- }
1218-
1219- return types;
1220- }
1221-}
1222-
1223-namespace ccit = compiz::config::integration::test;
1224-namespace cciti = compiz::config::integration::test::impl;
1225-namespace ccvg = compiz::config::integration::test::variant_generators;
1226-namespace ccvalg = compiz::config::integration::test::value_generators;
1227-namespace ccex = compiz::config::integration::test::expectations;
1228-
1229-typedef testing::tuple <CCSSettingType,
1230- ccit::GSettingsIntegratedSettingInfo> CCSGSettingsIntegratedSettingTestInfo;
1231-
1232-class CCSGSettingsIntegratedSettingTest :
1233- public ::testing::TestWithParam <CCSGSettingsIntegratedSettingTestInfo>
1234-{
1235- public:
1236-
1237- virtual void SetUp ();
1238- virtual void TearDown ();
1239-
1240- protected:
1241-
1242- CompizGLibGSliceOffEnv env;
1243- boost::shared_ptr <CCSGSettingsWrapper> mWrapper;
1244- CCSGSettingsWrapperGMock *mWrapperMock;
1245-};
1246-
1247-GVariant *
1248-ccvg::fromValue (CCSSettingValue *v,
1249- CCSSettingType type)
1250-{
1251- switch (type)
1252- {
1253- case TypeInt:
1254- return g_variant_new ("i", v->value.asInt);
1255- break;
1256- case TypeBool:
1257- return g_variant_new ("b", v->value.asBool);
1258- break;
1259- case TypeString:
1260- return g_variant_new ("s", v->value.asString);
1261- break;
1262- case TypeKey:
1263- {
1264- GVariantBuilder builder;
1265- g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
1266-
1267- /* Represented internally as strings */
1268- std::string kb (v->value.asString);
1269- if (kb == "Disabled")
1270- kb[0] = 'd';
1271-
1272- g_variant_builder_add (&builder, "s", kb.c_str ());
1273- return g_variant_builder_end (&builder);
1274- }
1275- default:
1276- break;
1277- }
1278-
1279- return NULL;
1280-}
1281-
1282-GVariant *
1283-ccvg::as ()
1284-{
1285- GVariantBuilder builder;
1286- g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
1287- g_variant_builder_add (&builder, "s", ccit::KEYBINDING_ONE.c_str ());
1288- g_variant_builder_add (&builder, "s", ccit::KEYBINDING_TWO.c_str ());
1289-
1290- return g_variant_builder_end (&builder);
1291-}
1292-
1293-GVariant *
1294-ccvg::i ()
1295-{
1296- return g_variant_new ("i", ccit::INTEGER);
1297-}
1298-
1299-GVariant *
1300-ccvg::b ()
1301-{
1302- return g_variant_new ("b", ccit::BOOLEAN);
1303-}
1304-
1305-GVariant *
1306-ccvg::s ()
1307-{
1308- return g_variant_new ("s", ccit::STRING.c_str ());
1309-}
1310-
1311-namespace
1312-{
1313- CCSSettingValue * createSettingValue ()
1314- {
1315- CCSSettingValue *v = reinterpret_cast <CCSSettingValue *> (calloc (1, sizeof (CCSSettingValue)));
1316-
1317- v->isListChild = FALSE;
1318- v->parent = NULL;
1319- v->refCount = 1;
1320-
1321- return v;
1322- }
1323-}
1324-
1325-CCSSettingValue *
1326-ccvalg::integer ()
1327-{
1328- CCSSettingValue *v = createSettingValue ();
1329- v->value.asInt = ccit::INTEGER_ALT;
1330- return v;
1331-}
1332-
1333-CCSSettingValue *
1334-ccvalg::string ()
1335-{
1336- CCSSettingValue *v = createSettingValue ();
1337- v->value.asString = strdup (ccit::STRING_ALT.c_str ());
1338- return v;
1339-}
1340-
1341-CCSSettingValue *
1342-ccvalg::key ()
1343-{
1344- CCSSettingValue *v = createSettingValue ();
1345- v->value.asString = strdup (ccit::KEYBINDING_TWO.c_str ());
1346- return v;
1347-}
1348-
1349-CCSSettingValue *
1350-ccvalg::boolean ()
1351-{
1352- CCSSettingValue *v = createSettingValue ();
1353- v->value.asBool = ccit::BOOLEAN_ALT;
1354- return v;
1355-}
1356-
1357-void
1358-ccex::boolean (CCSSettingValue *v)
1359-{
1360- EXPECT_EQ (v->value.asBool, ccit::BOOLEAN);
1361-}
1362-
1363-void
1364-ccex::integer (CCSSettingValue *v)
1365-{
1366- EXPECT_EQ (v->value.asInt, ccit::INTEGER);
1367-}
1368-
1369-void
1370-ccex::string (CCSSettingValue *v)
1371-{
1372- EXPECT_EQ (v->value.asString, ccit::STRING);
1373-}
1374-
1375-void
1376-ccex::key (CCSSettingValue *v)
1377-{
1378- EXPECT_EQ (v->value.asString, ccit::KEYBINDING_ONE);
1379-}
1380-
1381-void
1382-ccex::integerVariant (GVariant *v , int i)
1383-{
1384- EXPECT_EQ (g_variant_get_int32 (v), i);
1385-}
1386-
1387-void
1388-ccex::stringVariant (GVariant *v, const std::string &s)
1389-{
1390- gsize len;
1391- EXPECT_EQ (g_variant_get_string (v, &len), s);
1392-}
1393-
1394-void
1395-ccex::booleanVariant (GVariant *v, bool b)
1396-{
1397- EXPECT_EQ (g_variant_get_boolean (v), b);
1398-}
1399-
1400-void
1401-ccex::keyVariant (GVariant *v, const std::string &s)
1402-{
1403- gsize len;
1404- const gchar * const *strv = g_variant_get_strv (v, &len);
1405- EXPECT_EQ (strv[0], s);
1406-}
1407-
1408-void
1409-CCSGSettingsIntegratedSettingTest::SetUp ()
1410-{
1411- env.SetUpEnv ();
1412- mWrapper.reset (ccsMockGSettingsWrapperNew (),
1413- boost::bind (ccsMockGSettingsWrapperFree, _1));
1414- mWrapperMock = reinterpret_cast <CCSGSettingsWrapperGMock *> (
1415- ccsObjectGetPrivate (mWrapper.get ()));
1416-}
1417-
1418-void
1419-CCSGSettingsIntegratedSettingTest::TearDown ()
1420-{
1421- mWrapper.reset ();
1422- mWrapperMock = NULL;
1423- env.TearDownEnv ();
1424-}
1425-
1426-TEST_P (CCSGSettingsIntegratedSettingTest, MatchedTypesReturnValueMismatchedTypesReturnNull)
1427-{
1428- const std::string keyName ("mock");
1429- const ccit::GSettingsIntegratedSettingInfo &integratedSettingInfo =
1430- testing::get <1> (GetParam ());
1431- const CCSSettingType createSettingType =
1432- testing::get <0> (GetParam ());
1433-
1434- /* The GSettings Integrated setting takes ownership of these */
1435- CCSIntegratedSettingInfo *integratedSetting = ccsSharedIntegratedSettingInfoNew (keyName.c_str (),
1436- keyName.c_str (),
1437- integratedSettingInfo.settingType,
1438- &ccsDefaultObjectAllocator);
1439- SpecialOptionType specialType = ccsTypeToSpecialType ()[integratedSettingInfo.settingType];
1440- CCSMATEIntegratedSettingInfo *mateIntegratedSetting = ccsMATEIntegratedSettingInfoNew (integratedSetting,
1441- specialType,
1442- keyName.c_str (),
1443- &ccsDefaultObjectAllocator);
1444- boost::shared_ptr <CCSIntegratedSetting> gsettingsIntegrated (AutoDestroy (ccsGSettingsIntegratedSettingNew (mateIntegratedSetting,
1445- mWrapper.get (),
1446- &ccsDefaultObjectAllocator),
1447- ccsIntegratedSettingUnref));
1448-
1449- GVariant *variant = (*integratedSettingInfo.variantGenerator) ();
1450- EXPECT_CALL (*mWrapperMock, getValue (Eq (keyName))).WillOnce (Return (variant));
1451-
1452- CCSSettingValue *value = ccsIntegratedSettingReadValue (gsettingsIntegrated.get (), createSettingType);
1453-
1454- if (createSettingType == integratedSettingInfo.settingType)
1455- (*integratedSettingInfo.expectation) (value);
1456- else
1457- EXPECT_THAT (value, IsNull ());
1458-
1459- if (value)
1460- ccsFreeSettingValueWithType (value, integratedSettingInfo.returnType);
1461-}
1462-
1463-ACTION (FreeVariant)
1464-{
1465- g_variant_unref (arg0);
1466-}
1467-
1468-TEST_P (CCSGSettingsIntegratedSettingTest, MatchedTypesReturnValueMismatchedTypesResetOrWrite)
1469-{
1470- const std::string keyName ("mock");
1471- const ccit::GSettingsIntegratedSettingInfo &integratedSettingInfo =
1472- testing::get <1> (GetParam ());
1473- const CCSSettingType createSettingType =
1474- testing::get <0> (GetParam ());
1475-
1476- CCSIntegratedSettingInfo *integratedSetting = ccsSharedIntegratedSettingInfoNew (keyName.c_str (),
1477- keyName.c_str (),
1478- integratedSettingInfo.settingType,
1479- &ccsDefaultObjectAllocator);
1480- SpecialOptionType specialType = ccsTypeToSpecialType ()[integratedSettingInfo.settingType];
1481- CCSMATEIntegratedSettingInfo *mateIntegratedSetting = ccsMATEIntegratedSettingInfoNew (integratedSetting,
1482- specialType,
1483- keyName.c_str (),
1484- &ccsDefaultObjectAllocator);
1485- boost::shared_ptr <CCSIntegratedSetting> gsettingsIntegrated (AutoDestroy (ccsGSettingsIntegratedSettingNew (mateIntegratedSetting,
1486- mWrapper.get (),
1487- &ccsDefaultObjectAllocator),
1488- ccsIntegratedSettingUnref));
1489-
1490- boost::shared_ptr <CCSSettingValue> value ((*integratedSettingInfo.valueGenerator) (),
1491- boost::bind (ccsFreeSettingValueWithType,
1492- _1,
1493- integratedSettingInfo.returnType));
1494- boost::shared_ptr <GVariant> variant = AutoDestroy (g_variant_ref ((*integratedSettingInfo.variantGenerator) ()),
1495- g_variant_unref);
1496- boost::shared_ptr <GVariant> newVariant = AutoDestroy (ccvg::fromValue (value.get (),
1497- integratedSettingInfo.settingType),
1498- g_variant_unref);
1499- EXPECT_CALL (*mWrapperMock, getValue (Eq (keyName))).WillOnce (Return (variant.get ()));
1500-
1501- if (createSettingType == integratedSettingInfo.settingType)
1502- EXPECT_CALL (*mWrapperMock, setValue (Eq (keyName), VariantEqual (newVariant.get ())))
1503- .WillOnce (WithArgs <1> (FreeVariant ()));
1504- else
1505- EXPECT_CALL (*mWrapperMock, resetKey (Eq (keyName)));
1506-
1507- ccsIntegratedSettingWriteValue (gsettingsIntegrated.get (), value.get (), createSettingType);
1508-}
1509-
1510-INSTANTIATE_TEST_CASE_P (CCSGSettingsIntegratedSettingTestMismatchedValues, CCSGSettingsIntegratedSettingTest,
1511- Combine (Values (TypeInt, TypeString, TypeBool, TypeKey),
1512- ValuesIn (cciti::settingsInfo)));
1513
1514=== removed directory 'compizconfig/integration/mate/include'
1515=== removed file 'compizconfig/integration/mate/include/ccs_mate_fwd.h'
1516--- compizconfig/integration/mate/include/ccs_mate_fwd.h 2015-02-04 22:20:18 +0000
1517+++ compizconfig/integration/mate/include/ccs_mate_fwd.h 1970-01-01 00:00:00 +0000
1518@@ -1,13 +0,0 @@
1519-#ifndef _CCS_MATE_INTEGRATION_FWD_H
1520-#define _CCS_MATE_INTEGRATION_FWD_H
1521-
1522-#include <ccs-defs.h>
1523-
1524-COMPIZCONFIG_BEGIN_DECLS
1525-
1526-typedef struct _CCSMATEIntegratedSettingInfo CCSMATEIntegratedSettingInfo;
1527-typedef struct _CCSMATEValueChangeData CCSMATEValueChangeData;
1528-
1529-COMPIZCONFIG_END_DECLS
1530-
1531-#endif
1532
1533=== removed file 'compizconfig/integration/mate/include/ccs_mate_integrated_setting.h'
1534--- compizconfig/integration/mate/include/ccs_mate_integrated_setting.h 2015-02-04 22:20:18 +0000
1535+++ compizconfig/integration/mate/include/ccs_mate_integrated_setting.h 1970-01-01 00:00:00 +0000
1536@@ -1,64 +0,0 @@
1537-#ifndef _CCS_MATE_INTEGRATED_SETTING_H
1538-#define _CCS_MATE_INTEGRATED_SETTING_H
1539-
1540-#include <ccs-defs.h>
1541-#include <ccs-fwd.h>
1542-#include <ccs_mate_fwd.h>
1543-
1544-#include "ccs_mate_integration_types.h"
1545-
1546-COMPIZCONFIG_BEGIN_DECLS
1547-
1548-typedef struct _CCSMATEIntegratedSettingInfoInterface CCSMATEIntegratedSettingInfoInterface;
1549-
1550-typedef SpecialOptionType (*CCSMATEIntegratedSettingInfoGetSpecialOptionType) (CCSMATEIntegratedSettingInfo *);
1551-typedef const char * (*CCSMATEIntegratedSettingInfoGetMATEName) (CCSMATEIntegratedSettingInfo *);
1552-typedef void (*CCSMATEIntegratedSettingInfoFree) (CCSMATEIntegratedSettingInfo *);
1553-
1554-struct _CCSMATEIntegratedSettingInfoInterface
1555-{
1556- CCSMATEIntegratedSettingInfoGetSpecialOptionType getSpecialOptionType;
1557- CCSMATEIntegratedSettingInfoGetMATEName getMATEName;
1558- CCSMATEIntegratedSettingInfoFree free;
1559-};
1560-
1561-/**
1562- * @brief The _CCSMATEIntegratedSetting struct
1563- *
1564- * CCSMATEIntegratedSetting represents an integrated setting in
1565- * MATE - it builds upon CCSSharedIntegratedSetting (which it composes
1566- * and implements) and also adds the concept of an MATE side keyname
1567- * and option type for that keyname (as the types do not match 1-1)
1568- */
1569-struct _CCSMATEIntegratedSettingInfo
1570-{
1571- CCSObject object;
1572-};
1573-
1574-unsigned int ccsCCSMATEIntegratedSettingInfoInterfaceGetType ();
1575-
1576-Bool
1577-ccsMATEIntegrationFindSettingsMatchingPredicate (CCSIntegratedSetting *setting,
1578- void *userData);
1579-
1580-SpecialOptionType
1581-ccsMATEIntegratedSettingInfoGetSpecialOptionType (CCSMATEIntegratedSettingInfo *);
1582-
1583-const char *
1584-ccsMATEIntegratedSettingInfoGetMATEName (CCSMATEIntegratedSettingInfo *);
1585-
1586-CCSMATEIntegratedSettingInfo *
1587-ccsMATEIntegratedSettingInfoNew (CCSIntegratedSettingInfo *base,
1588- SpecialOptionType type,
1589- const char *mateName,
1590- CCSObjectAllocationInterface *ai);
1591-
1592-void
1593-ccsFreeMATEIntegratedSettingInfo (CCSMATEIntegratedSettingInfo *);
1594-
1595-CCSREF_HDR (MATEIntegratedSettingInfo, CCSMATEIntegratedSettingInfo);
1596-CCSLIST_HDR (MATEIntegratedSettingInfo, CCSMATEIntegratedSettingInfo);
1597-
1598-COMPIZCONFIG_END_DECLS
1599-
1600-#endif
1601
1602=== removed file 'compizconfig/integration/mate/include/ccs_mate_integration.h'
1603--- compizconfig/integration/mate/include/ccs_mate_integration.h 2015-12-10 16:34:35 +0000
1604+++ compizconfig/integration/mate/include/ccs_mate_integration.h 1970-01-01 00:00:00 +0000
1605@@ -1,46 +0,0 @@
1606-#ifndef _CCS_COMPIZCONFIG_MATE_INTEGRATION
1607-#define _CCS_COMPIZCONFIG_MATE_INTEGRATION
1608-
1609-#include <ccs-defs.h>
1610-#include <ccs-fwd.h>
1611-#include <ccs_mate_fwd.h>
1612-#include "ccs_mate_integration_types.h"
1613-
1614-COMPIZCONFIG_BEGIN_DECLS
1615-
1616-struct _CCSMATEValueChangeData
1617-{
1618- CCSIntegration *integration;
1619- CCSIntegratedSettingsStorage *storage;
1620- CCSIntegratedSettingFactory *factory;
1621- CCSContext *context;
1622-};
1623-
1624-/**
1625- * @brief ccsMATEIntegrationBackendNew
1626- * @param backend
1627- * @param context
1628- * @param factory
1629- * @param storage
1630- * @param ai
1631- * @return A new CCSIntegration
1632- *
1633- * The MATE implementation of desktop environment integration - requires
1634- * a method to create new integrated settings, and a method to store them
1635- * as well.
1636- *
1637- * CCSMATEIntegration is a pure composition in most respects - it just
1638- * represents the process as to which settings should be written to
1639- * what keys and vice versa, it doesn't represent how those keys should
1640- * be written.
1641- */
1642-CCSIntegration *
1643-ccsMATEIntegrationBackendNew (CCSBackend *backend,
1644- CCSContext *context,
1645- CCSIntegratedSettingFactory *factory,
1646- CCSIntegratedSettingsStorage *storage,
1647- CCSObjectAllocationInterface *ai);
1648-
1649-COMPIZCONFIG_END_DECLS
1650-
1651-#endif
1652
1653=== removed file 'compizconfig/integration/mate/include/ccs_mate_integration_constants.h'
1654--- compizconfig/integration/mate/include/ccs_mate_integration_constants.h 2015-02-04 22:20:18 +0000
1655+++ compizconfig/integration/mate/include/ccs_mate_integration_constants.h 1970-01-01 00:00:00 +0000
1656@@ -1,217 +0,0 @@
1657-#ifndef _CCS_MATE_INTEGRATION_CONSTANTS_H
1658-#define _CCS_MATE_INTEGRATION_CONSTANTS_H
1659-
1660-#include <ccs-defs.h>
1661-#include <glib.h>
1662-
1663-COMPIZCONFIG_BEGIN_DECLS
1664-
1665-#include <ccs_mate_integration_types.h>
1666-
1667-#define METACITY "/apps/metacity"
1668-#define NUM_WATCHED_DIRS 3
1669-
1670-typedef struct _CCSSettingIntegratedSettingPair CCSSettingIntegratedSettingPair;
1671-struct _CCSSettingIntegratedSettingPair
1672-{
1673- const char *compizName;
1674- const char *mateName;
1675-};
1676-
1677-typedef struct _CCSMATEIntegratedSettingNames CCSMATEIntegratedSettingNames;
1678-struct _CCSMATEIntegratedSettingNames
1679-{
1680- CCSSettingIntegratedSettingPair CORE_AUDIBLE_BELL;
1681- CCSSettingIntegratedSettingPair CORE_CLICK_TO_FOCUS;
1682- CCSSettingIntegratedSettingPair CORE_RAISE_ON_CLICK;
1683- CCSSettingIntegratedSettingPair CORE_AUTORAISE_DELAY;
1684- CCSSettingIntegratedSettingPair CORE_AUTORAISE;
1685- CCSSettingIntegratedSettingPair THUMBNAIL_CURRENT_VIEWPORT;
1686- CCSSettingIntegratedSettingPair MATECOMPAT_COMMAND_TERMINAL;
1687- CCSSettingIntegratedSettingPair MATECOMPAT_COMMAND_WINDOW_SCREENSHOT;
1688- CCSSettingIntegratedSettingPair MATECOMPAT_COMMAND_SCREENSHOT;
1689- CCSSettingIntegratedSettingPair ROTATE_ROTATE_RIGHT_WINDOW_KEY;
1690- CCSSettingIntegratedSettingPair ROTATE_ROTATE_LEFT_WINDOW_KEY;
1691- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_12_WINDOW_KEY;
1692- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_11_WINDOW_KEY;
1693- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_10_WINDOW_KEY;
1694- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_9_WINDOW_KEY;
1695- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_8_WINDOW_KEY;
1696- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_7_WINDOW_KEY;
1697- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_6_WINDOW_KEY;
1698- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_5_WINDOW_KEY;
1699- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_4_WINDOW_KEY;
1700- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_3_WINDOW_KEY;
1701- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_2_WINDOW_KEY;
1702- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_1_WINDOW_KEY;
1703- CCSSettingIntegratedSettingPair PUT_PUT_BOTTOM_KEY;
1704- CCSSettingIntegratedSettingPair PUT_PUT_TOP_KEY;
1705- CCSSettingIntegratedSettingPair PUT_PUT_RIGHT_KEY;
1706- CCSSettingIntegratedSettingPair PUT_PUT_LEFT_KEY;
1707- CCSSettingIntegratedSettingPair PUT_PUT_BOTTOMRIGHT_KEY;
1708- CCSSettingIntegratedSettingPair PUT_PUT_BOTTOMLEFT_KEY;
1709- CCSSettingIntegratedSettingPair PUT_PUT_TOPRIGHT_KEY;
1710- CCSSettingIntegratedSettingPair PUT_PUT_TOPLEFT_KEY;
1711- CCSSettingIntegratedSettingPair WALL_DOWN_WINDOW_KEY;
1712- CCSSettingIntegratedSettingPair WALL_UP_WINDOW_KEY;
1713- CCSSettingIntegratedSettingPair WALL_RIGHT_WINDOW_KEY;
1714- CCSSettingIntegratedSettingPair WALL_LEFT_WINDOW_KEY;
1715- CCSSettingIntegratedSettingPair WALL_RIGHT_KEY;
1716- CCSSettingIntegratedSettingPair WALL_LEFT_KEY;
1717- CCSSettingIntegratedSettingPair WALL_DOWN_KEY;
1718- CCSSettingIntegratedSettingPair WALL_UP_KEY;
1719- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_12_KEY;
1720- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_11_KEY;
1721- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_10_KEY;
1722- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_9_KEY;
1723- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_8_KEY;
1724- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_7_KEY;
1725- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_6_KEY;
1726- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_5_KEY;
1727- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_4_KEY;
1728- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_3_KEY;
1729- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_2_KEY;
1730- CCSSettingIntegratedSettingPair VPSWITCH_SWITCH_TO_1_KEY;
1731- CCSSettingIntegratedSettingPair ROTATE_ROTATE_RIGHT_KEY;
1732- CCSSettingIntegratedSettingPair ROTATE_ROTATE_LEFT_KEY;
1733- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_12_KEY;
1734- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_11_KEY;
1735- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_10_KEY;
1736- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_9_KEY;
1737- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_8_KEY;
1738- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_7_KEY;
1739- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_6_KEY;
1740- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_5_KEY;
1741- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_4_KEY;
1742- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_3_KEY;
1743- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_2_KEY;
1744- CCSSettingIntegratedSettingPair ROTATE_ROTATE_TO_1_KEY;
1745- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND11_KEY;
1746- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND10_KEY;
1747- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND9_KEY;
1748- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND8_KEY;
1749- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND7_KEY;
1750- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND6_KEY;
1751- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND5_KEY;
1752- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND4_KEY;
1753- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND3_KEY;
1754- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND2_KEY;
1755- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND1_KEY;
1756- CCSSettingIntegratedSettingPair COMMANDS_RUN_COMMAND0_KEY;
1757- CCSSettingIntegratedSettingPair COMMANDS_COMMAND11;
1758- CCSSettingIntegratedSettingPair COMMANDS_COMMAND10;
1759- CCSSettingIntegratedSettingPair COMMANDS_COMMAND9;
1760- CCSSettingIntegratedSettingPair COMMANDS_COMMAND8;
1761- CCSSettingIntegratedSettingPair COMMANDS_COMMAND7;
1762- CCSSettingIntegratedSettingPair COMMANDS_COMMAND6;
1763- CCSSettingIntegratedSettingPair COMMANDS_COMMAND5;
1764- CCSSettingIntegratedSettingPair COMMANDS_COMMAND4;
1765- CCSSettingIntegratedSettingPair COMMANDS_COMMAND3;
1766- CCSSettingIntegratedSettingPair COMMANDS_COMMAND2;
1767- CCSSettingIntegratedSettingPair COMMANDS_COMMAND1;
1768- CCSSettingIntegratedSettingPair COMMANDS_COMMAND0;
1769- CCSSettingIntegratedSettingPair EXTRAWM_TOGGLE_FULLSCREEN_KEY;
1770- CCSSettingIntegratedSettingPair EXTRAWM_TOGGLE_STICKY_KEY;
1771- CCSSettingIntegratedSettingPair STATICSWITCHER_PREV_KEY;
1772- CCSSettingIntegratedSettingPair STATICSWITCHER_NEXT_KEY;
1773- CCSSettingIntegratedSettingPair FADE_FULLSCREEN_VISUAL_BELL;
1774- CCSSettingIntegratedSettingPair FADE_VISUAL_BELL;
1775- CCSSettingIntegratedSettingPair NULL_RESIZE_WITH_RIGHT_BUTTON;
1776- CCSSettingIntegratedSettingPair NULL_MOUSE_BUTTON_MODIFIER;
1777- CCSSettingIntegratedSettingPair CORE_WINDOW_MENU_BUTTON;
1778- CCSSettingIntegratedSettingPair RESIZE_INITIATE_BUTTON;
1779- CCSSettingIntegratedSettingPair MOVE_INITIATE_BUTTON;
1780- CCSSettingIntegratedSettingPair CORE_WINDOW_MENU_KEY;
1781- CCSSettingIntegratedSettingPair RESIZE_INITIATE_KEY;
1782- CCSSettingIntegratedSettingPair MOVE_INITIATE_KEY;
1783- CCSSettingIntegratedSettingPair CORE_SHOW_DESKTOP_KEY;
1784- CCSSettingIntegratedSettingPair CORE_TOGGLE_WINDOW_SHADED_KEY;
1785- CCSSettingIntegratedSettingPair CORE_CLOSE_WINDOW_KEY;
1786- CCSSettingIntegratedSettingPair CORE_LOWER_WINDOW_KEY;
1787- CCSSettingIntegratedSettingPair CORE_RAISE_WINDOW_KEY;
1788- CCSSettingIntegratedSettingPair CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY;
1789- CCSSettingIntegratedSettingPair CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY;
1790- CCSSettingIntegratedSettingPair CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY;
1791- CCSSettingIntegratedSettingPair CORE_MAXIMIZE_WINDOW_KEY;
1792- CCSSettingIntegratedSettingPair CORE_MINIMIZE_WINDOW_KEY;
1793- CCSSettingIntegratedSettingPair CORE_TOGGLE_WINDOW_MAXIMIZED_KEY;
1794- CCSSettingIntegratedSettingPair MATECOMPAT_RUN_COMMAND_TERMINAL_KEY;
1795- CCSSettingIntegratedSettingPair MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY;
1796- CCSSettingIntegratedSettingPair MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY;
1797- CCSSettingIntegratedSettingPair MATECOMPAT_MAIN_MENU_KEY;
1798- CCSSettingIntegratedSettingPair MATECOMPAT_RUN_KEY;
1799-};
1800-
1801-extern const CCSMATEIntegratedSettingNames ccsMATEIntegratedSettingNames;
1802-
1803-typedef struct _CCSGConfIntegrationCategoires CCSGConfIntegrationCategories;
1804-
1805-struct _CCSGConfIntegrationCategoires
1806-{
1807- const char *GENERAL;
1808- const char *APPS;
1809- const char *DESKTOP;
1810- const char *KEYBINDING_COMMANDS;
1811- const char *WINDOW_KEYBINDINGS;
1812- const char *GLOBAL_KEYBINDINGS;
1813-};
1814-
1815-extern const CCSGConfIntegrationCategories ccsGConfIntegrationCategories;
1816-
1817-typedef struct _CCSMATEIntegratedPluginNames CCSMATEIntegratedPluginNames;
1818-
1819-struct _CCSMATEIntegratedPluginNames
1820-{
1821- const char *CORE;
1822- const char *THUMBNAIL;
1823- const char *MATECOMPAT;
1824- const char *ROTATE;
1825- const char *PUT;
1826- const char *WALL;
1827- const char *VPSWITCH;
1828- const char *COMMANDS;
1829- const char *EXTRAWM;
1830- const char *RESIZE;
1831- const char *MOVE;
1832- const char *STATICSWITCHER;
1833- const char *FADE;
1834- const char *SPECIAL;
1835-};
1836-
1837-extern const CCSMATEIntegratedPluginNames ccsMATEIntegratedPluginNames;
1838-
1839-extern const char* watchedGConfMateDirectories[];
1840-
1841-typedef struct _CCSGSettingsWrapperIntegratedSchemasQuarks
1842-{
1843- GQuark ORG_MATE_DESKTOP_WM_PREFERENCES;
1844- GQuark ORG_MATE_DESKTOP_WM_KEYBINDINGS;
1845- GQuark ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS;
1846- GQuark ORG_MATE_DESKTOP_DEFAULT_APPLICATIONS_TERMINAL;
1847- GQuark ORG_COMPIZ_INTEGRATED;
1848-} CCSGSettingsWrapperIntegratedSchemasQuarks;
1849-
1850-const CCSGSettingsWrapperIntegratedSchemasQuarks *ccsMATEGSettingsWrapperQuarks ();
1851-
1852-GHashTable * ccsMATEIntegrationPopulateCategoriesHashTables ();
1853-GHashTable * ccsMATEIntegrationPopulateSpecialTypesHashTables ();
1854-GHashTable * ccsMATEIntegrationPopulateSettingNameToMATENameHashTables ();
1855-GHashTable * ccsMATEGSettingsIntegrationPopulateSettingNameToIntegratedSchemasQuarksHashTable ();
1856-
1857-/* We only have to use the #define here because
1858- * C doesn't have a concept of "constants" setting
1859- * the array size ...
1860- */
1861-#define CCS_MATE_INTEGRATED_SETTINGS_LIST_SIZE 120
1862-
1863-typedef struct _CCSMATEIntegratedSettingsList
1864-{
1865- const char *pluginName;
1866- const char *settingName;
1867-} CCSMATEIntegratedSettingsList;
1868-
1869-const CCSMATEIntegratedSettingsList * ccsMATEIntegratedSettingsList ();
1870-
1871-COMPIZCONFIG_END_DECLS
1872-
1873-#endif
1874
1875=== removed file 'compizconfig/integration/mate/include/ccs_mate_integration_types.h'
1876--- compizconfig/integration/mate/include/ccs_mate_integration_types.h 2015-02-04 22:20:18 +0000
1877+++ compizconfig/integration/mate/include/ccs_mate_integration_types.h 1970-01-01 00:00:00 +0000
1878@@ -1,19 +0,0 @@
1879-#ifndef _CCS_MATE_INTEGRATION_TYPES_H
1880-#define _CCS_MATE_INTEGRATION_TYPES_H
1881-
1882-#include <ccs-defs.h>
1883-
1884-COMPIZCONFIG_BEGIN_DECLS
1885-
1886-typedef enum {
1887- OptionInt,
1888- OptionBool,
1889- OptionKey,
1890- OptionString,
1891- OptionSpecial,
1892-} SpecialOptionType;
1893-
1894-COMPIZCONFIG_END_DECLS
1895-
1896-#endif
1897-
1898
1899=== removed directory 'compizconfig/integration/mate/src'
1900=== removed file 'compizconfig/integration/mate/src/ccs_mate_integrated_setting.c'
1901--- compizconfig/integration/mate/src/ccs_mate_integrated_setting.c 2015-02-04 22:20:18 +0000
1902+++ compizconfig/integration/mate/src/ccs_mate_integrated_setting.c 1970-01-01 00:00:00 +0000
1903@@ -1,161 +0,0 @@
1904-#include <stdlib.h>
1905-#include <string.h>
1906-
1907-#include <glib.h>
1908-
1909-#include <ccs.h>
1910-#include <ccs-backend.h>
1911-#include <ccs-object.h>
1912-
1913-#include "ccs_mate_integrated_setting.h"
1914-#include "ccs_mate_integration_constants.h"
1915-
1916-INTERFACE_TYPE (CCSMATEIntegratedSettingInfoInterface);
1917-
1918-CCSREF_OBJ (MATEIntegratedSettingInfo, CCSMATEIntegratedSettingInfo);
1919-
1920-SpecialOptionType
1921-ccsMATEIntegratedSettingInfoGetSpecialOptionType (CCSMATEIntegratedSettingInfo *info)
1922-{
1923- return (*(GET_INTERFACE (CCSMATEIntegratedSettingInfoInterface, info))->getSpecialOptionType) (info);
1924-}
1925-
1926-const char *
1927-ccsMATEIntegratedSettingInfoGetMATEName (CCSMATEIntegratedSettingInfo *info)
1928-{
1929- return (*(GET_INTERFACE (CCSMATEIntegratedSettingInfoInterface, info))->getMATEName) (info);
1930-}
1931-
1932-/* CCSMATEIntegratedSettingDefaultImpl implementation */
1933-
1934-typedef struct _CCSMATEIntegratedSettingInfoDefaultImplPrivate CCSMATEIntegratedSettingInfoDefaultImplPrivate;
1935-
1936-struct _CCSMATEIntegratedSettingInfoDefaultImplPrivate
1937-{
1938- SpecialOptionType type;
1939- const char *mateName;
1940- CCSIntegratedSettingInfo *sharedIntegratedSettingInfo;
1941-};
1942-
1943-Bool
1944-ccsMATEIntegrationFindSettingsMatchingPredicate (CCSIntegratedSetting *setting,
1945- void *userData)
1946-{
1947- const char *findMateName = (const char *) userData;
1948- const char *mateNameOfSetting = ccsMATEIntegratedSettingInfoGetMATEName ((CCSMATEIntegratedSettingInfo *) setting);
1949-
1950- if (strcmp (findMateName, mateNameOfSetting) == 0)
1951- return TRUE;
1952-
1953- return FALSE;
1954-}
1955-
1956-SpecialOptionType
1957-ccsMATEIntegratedSettingGetSpecialOptionDefault (CCSMATEIntegratedSettingInfo *info)
1958-{
1959- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (CCSMATEIntegratedSettingInfoDefaultImplPrivate *) ccsObjectGetPrivate (info);
1960-
1961- return priv->type;
1962-}
1963-
1964-const char *
1965-ccsMATEIntegratedSettingGetMATENameDefault (CCSMATEIntegratedSettingInfo *info)
1966-{
1967- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (CCSMATEIntegratedSettingInfoDefaultImplPrivate *) ccsObjectGetPrivate (info);
1968-
1969- return priv->mateName;
1970-}
1971-
1972-const char *
1973-ccsMATEIntegratedSettingInfoPluginName (CCSIntegratedSettingInfo *info)
1974-{
1975- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (CCSMATEIntegratedSettingInfoDefaultImplPrivate *) ccsObjectGetPrivate (info);
1976-
1977- return ccsIntegratedSettingInfoPluginName (priv->sharedIntegratedSettingInfo);
1978-}
1979-
1980-const char *
1981-ccsMATEIntegratedSettingInfoSettingName (CCSIntegratedSettingInfo *info)
1982-{
1983- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (CCSMATEIntegratedSettingInfoDefaultImplPrivate *) ccsObjectGetPrivate (info);
1984-
1985- return ccsIntegratedSettingInfoSettingName (priv->sharedIntegratedSettingInfo);
1986-}
1987-
1988-CCSSettingType
1989-ccsMATEIntegratedSettingInfoGetType (CCSIntegratedSettingInfo *info)
1990-{
1991- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (CCSMATEIntegratedSettingInfoDefaultImplPrivate *) ccsObjectGetPrivate (info);
1992-
1993- return ccsIntegratedSettingInfoGetType (priv->sharedIntegratedSettingInfo);
1994-}
1995-
1996-void
1997-ccsMATESharedIntegratedSettingInfoFree (CCSIntegratedSettingInfo *info)
1998-{
1999- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (CCSMATEIntegratedSettingInfoDefaultImplPrivate *) ccsObjectGetPrivate (info);
2000-
2001- ccsIntegratedSettingInfoUnref (priv->sharedIntegratedSettingInfo);
2002- ccsObjectFinalize (info);
2003-
2004- (*info->object.object_allocation->free_) (info->object.object_allocation->allocator, info);
2005-}
2006-
2007-static void
2008-ccsMATEIntegratedSettingInfoFree (CCSMATEIntegratedSettingInfo *info)
2009-{
2010- ccsMATESharedIntegratedSettingInfoFree ((CCSIntegratedSettingInfo *) info);
2011-}
2012-
2013-CCSMATEIntegratedSettingInfoInterface ccsMATEIntegratedSettingInfoDefaultImplInterface =
2014-{
2015- ccsMATEIntegratedSettingGetSpecialOptionDefault,
2016- ccsMATEIntegratedSettingGetMATENameDefault,
2017- ccsMATEIntegratedSettingInfoFree
2018-};
2019-
2020-const CCSIntegratedSettingInfoInterface ccsMATEIntegratedSettingInfoInterface =
2021-{
2022- ccsMATEIntegratedSettingInfoPluginName,
2023- ccsMATEIntegratedSettingInfoSettingName,
2024- ccsMATEIntegratedSettingInfoGetType,
2025- ccsMATESharedIntegratedSettingInfoFree
2026-};
2027-
2028-void
2029-ccsFreeMATEIntegratedSettingInfo (CCSMATEIntegratedSettingInfo *info)
2030-{
2031- (*(GET_INTERFACE (CCSMATEIntegratedSettingInfoInterface, info))->free) (info);
2032-}
2033-
2034-CCSMATEIntegratedSettingInfo *
2035-ccsMATEIntegratedSettingInfoNew (CCSIntegratedSettingInfo *base,
2036- SpecialOptionType type,
2037- const char *mateName,
2038- CCSObjectAllocationInterface *ai)
2039-{
2040- CCSMATEIntegratedSettingInfo *info = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSMATEIntegratedSettingInfo));
2041-
2042- if (!info)
2043- return NULL;
2044-
2045- CCSMATEIntegratedSettingInfoDefaultImplPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSMATEIntegratedSettingInfoDefaultImplPrivate));
2046-
2047- if (!priv)
2048- {
2049- (*ai->free_) (ai->allocator, info);
2050- return NULL;
2051- }
2052-
2053- priv->sharedIntegratedSettingInfo = base;
2054- priv->mateName = mateName;
2055- priv->type = type;
2056-
2057- ccsObjectInit (info, ai);
2058- ccsObjectSetPrivate (info, (CCSPrivate *) priv);
2059- ccsObjectAddInterface (info, (const CCSInterface *) &ccsMATEIntegratedSettingInfoInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingInfoInterface));
2060- ccsObjectAddInterface (info, (const CCSInterface *) &ccsMATEIntegratedSettingInfoDefaultImplInterface, GET_INTERFACE_TYPE (CCSMATEIntegratedSettingInfoInterface));
2061- ccsIntegratedSettingInfoRef ((CCSIntegratedSettingInfo *) info);
2062-
2063- return info;
2064-}
2065
2066=== removed file 'compizconfig/integration/mate/src/ccs_mate_integration.c'
2067--- compizconfig/integration/mate/src/ccs_mate_integration.c 2015-02-04 22:20:18 +0000
2068+++ compizconfig/integration/mate/src/ccs_mate_integration.c 1970-01-01 00:00:00 +0000
2069@@ -1,815 +0,0 @@
2070-/**
2071- *
2072- * compizconfig mate integration backend
2073- *
2074- * mate-integration.c
2075- *
2076- * Copyright (c) 2011 Canonical Ltd
2077- *
2078- * Based on the original compizconfig-backend-gconf
2079- *
2080- * Copyright (c) 2007 Danny Baumann <maniac@opencompositing.org>
2081- *
2082- * Parts of this code are taken from libberylsettings
2083- * gconf backend, written by:
2084- *
2085- * Copyright (c) 2006 Robert Carr <racarr@opencompositing.org>
2086- * Copyright (c) 2007 Dennis Kasprzyk <onestone@opencompositing.org>
2087- *
2088- * This program is free software; you can redistribute it and/or
2089- * modify it under the terms of the GNU General Public License
2090- * as published by the Free Software Foundation; either version 2
2091- * of the License, or (at your option) any later version.
2092- *
2093- * This program is distributed in the hope that it will be useful,
2094- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2095- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2096- * GNU General Public License for more details.
2097- *
2098- * Authored By:
2099- * Sam Spilsbury <sam.spilsbury@canonical.com>
2100- *
2101- **/
2102-#include <stdlib.h>
2103-#include <string.h>
2104-#include <ccs.h>
2105-#include <ccs-backend.h>
2106-#include <ccs-object.h>
2107-#include <gio/gio.h>
2108-#include "ccs_mate_integration.h"
2109-#include "ccs_mate_integration_constants.h"
2110-#include "ccs_mate_integrated_setting.h"
2111-
2112-typedef struct _CCSMATEIntegrationBackendPrivate CCMATEIntegrationBackendPrivate;
2113-
2114-struct _CCSMATEIntegrationBackendPrivate
2115-{
2116- CCSBackend *backend;
2117- CCSContext *context;
2118- CCSIntegratedSettingFactory *factory;
2119- CCSIntegratedSettingsStorage *storage;
2120- Bool noWrites;
2121-};
2122-
2123-static CCSSetting *
2124-findDisplaySettingForPlugin (CCSContext *context,
2125- const char *plugin,
2126- const char *setting)
2127-{
2128- CCSPlugin *p;
2129- CCSSetting *s;
2130-
2131- p = ccsFindPlugin (context, plugin);
2132- if (!p)
2133- return NULL;
2134-
2135- s = ccsFindSetting (p, setting);
2136- if (!s)
2137- return NULL;
2138-
2139- return s;
2140-}
2141-
2142-static void
2143-unregisterAllIntegratedOptions (CCSIntegration *integration)
2144-{
2145- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2146-
2147- if (priv->storage)
2148- ccsIntegratedSettingsStorageUnref (priv->storage);
2149-
2150- if (priv->factory)
2151- ccsIntegratedSettingFactoryUnref (priv->factory);
2152-
2153- priv->storage = NULL;
2154- priv->factory = NULL;
2155-}
2156-
2157-static void
2158-registerAllIntegratedOptions (CCSIntegration *integration)
2159-{
2160- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2161-
2162- unsigned int i = 0;
2163- const CCSMATEIntegratedSettingsList *array = ccsMATEIntegratedSettingsList ();
2164-
2165- for (; i < CCS_MATE_INTEGRATED_SETTINGS_LIST_SIZE; ++i)
2166- {
2167- CCSIntegratedSetting *setting = ccsIntegratedSettingFactoryCreateIntegratedSettingForCCSSettingNameAndType (priv->factory,
2168- integration,
2169- array[i].pluginName,
2170- array[i].settingName,
2171- TypeInt);
2172-
2173- ccsIntegratedSettingsStorageAddSetting (priv->storage, setting);
2174- }
2175-}
2176-
2177-static CCSIntegratedSetting *
2178-ccsMATEIntegrationBackendGetIntegratedSetting (CCSIntegration *integration,
2179- const char *pluginName,
2180- const char *settingName)
2181-{
2182- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2183-
2184- if (ccsIntegratedSettingsStorageEmpty (priv->storage))
2185- registerAllIntegratedOptions (integration);
2186-
2187- CCSIntegratedSettingList integratedSettings = ccsIntegratedSettingsStorageFindMatchingSettingsByPluginAndSettingName (priv->storage,
2188- pluginName,
2189- settingName);
2190-
2191- if (integratedSettings)
2192- {
2193- /* At the moment, we only support the first setting out of
2194- * the list. Assert the returned size is one */
2195- g_assert (ccsIntegratedSettingListLength (integratedSettings) == 1);
2196-
2197- CCSIntegratedSetting *integratedSetting = integratedSettings->data;
2198- ccsIntegratedSettingListFree (integratedSettings, FALSE);
2199-
2200- return integratedSetting;
2201- }
2202-
2203- return NULL;
2204-}
2205-
2206-static unsigned int
2207-getMateMouseButtonModifier (CCSIntegratedSetting *mouseButtonModifierSetting)
2208-{
2209- unsigned int modMask = 0;
2210- CCSSettingType type = TypeString;
2211- CCSSettingValue *v = ccsIntegratedSettingReadValue (mouseButtonModifierSetting, type);
2212-
2213- if (v)
2214- {
2215- modMask = ccsStringToModifiers (v->value.asString);
2216-
2217- ccsFreeSettingValueWithType (v, type);
2218- }
2219-
2220- return modMask;
2221-}
2222-
2223-static unsigned int
2224-getButtonBindingForSetting (CCSContext *context,
2225- const char *plugin,
2226- const char *setting)
2227-{
2228- CCSSetting *s;
2229-
2230- s = findDisplaySettingForPlugin (context, plugin, setting);
2231- if (!s)
2232- return 0;
2233-
2234- if (ccsSettingGetType (s) != TypeButton)
2235- return 0;
2236-
2237- return ccsSettingGetValue (s)->value.asButton.button;
2238-}
2239-
2240-static Bool
2241-ccsMATEIntegrationBackendReadISAndSetSettingForType (CCSIntegratedSetting *integratedSetting,
2242- CCSSetting *setting,
2243- CCSSettingValue **v,
2244- CCSSettingType sourceType,
2245- CCSSettingType destinationType)
2246-{
2247- *v = ccsIntegratedSettingReadValue (integratedSetting, sourceType);
2248-
2249- if (*v != NULL && (*v)->value.asString)
2250- {
2251- /* Conversion to key type option necessary */
2252- if (destinationType == TypeKey)
2253- {
2254- CCSSettingKeyValue key;
2255-
2256- memset (&key, 0, sizeof (CCSSettingKeyValue));
2257- if (ccsStringToKeyBinding ((*v)->value.asString, &key))
2258- {
2259- /* Since we effectively change the type of the value here
2260- * we need to free the old string value */
2261- free ((*v)->value.asString);
2262- ccsSetKey (setting, key, TRUE);
2263- return TRUE;
2264- }
2265- else
2266- {
2267- /* We were not successful at converting strings to keybindings
2268- * but we must free the string value anyways as we present
2269- * this value to ccsSettingValueFreeWithType as a TypeKey
2270- * intentionally made empty */
2271- free ((*v)->value.asString);
2272- return FALSE;
2273- }
2274- }
2275- return TRUE;
2276- }
2277-
2278- return FALSE;
2279-}
2280-
2281-static Bool
2282-ccsMATEIntegrationBackendReadOptionIntoSetting (CCSIntegration *integration,
2283- CCSContext *context,
2284- CCSSetting *setting,
2285- CCSIntegratedSetting *integratedSetting)
2286-{
2287- Bool ret = FALSE;
2288- CCSSettingValue *v = NULL;
2289- CCSSettingType type = TypeNum;
2290-
2291- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2292-
2293- if (ccsIntegratedSettingsStorageEmpty (priv->storage))
2294- registerAllIntegratedOptions (integration);
2295-
2296- if (!ccsSettingIsReadableByBackend (setting))
2297- return FALSE;
2298-
2299- switch (ccsMATEIntegratedSettingInfoGetSpecialOptionType ((CCSMATEIntegratedSettingInfo *) integratedSetting)) {
2300- case OptionInt:
2301- {
2302- type = TypeInt;
2303- v = ccsIntegratedSettingReadValue (integratedSetting, type);
2304- if (!v)
2305- break;
2306- ccsSetInt (setting, v->value.asInt, TRUE);
2307- ret = TRUE;
2308- }
2309- break;
2310- case OptionBool:
2311- {
2312- type = TypeBool;
2313- v = ccsIntegratedSettingReadValue (integratedSetting, type);
2314- if (!v)
2315- break;
2316- ccsSetBool (setting, v->value.asBool, TRUE);
2317- ret = TRUE;
2318- }
2319- break;
2320- case OptionString:
2321- {
2322- type = TypeString;
2323- v = ccsIntegratedSettingReadValue (integratedSetting, type);
2324- if (!v)
2325- break;
2326- char *str = v->value.asString;
2327-
2328- ccsSetString (setting, str, TRUE);
2329- ret = TRUE;
2330- }
2331- break;
2332- case OptionKey:
2333- {
2334- /* Some backends store keys differently so we need to let the backend know
2335- * that we really intend to read a key and let it handle the conversion */
2336- type = TypeKey;
2337- if (ccsMATEIntegrationBackendReadISAndSetSettingForType (integratedSetting,
2338- setting,
2339- &v,
2340- TypeKey,
2341- type))
2342- ret = TRUE;
2343- }
2344- break;
2345- case OptionSpecial:
2346- {
2347- const char *settingName = ccsSettingGetName (setting);
2348- const char *pluginName = ccsPluginGetName (ccsSettingGetParent (setting));
2349-
2350- if (strcmp (settingName, "current_viewport") == 0)
2351- {
2352- type = TypeBool;
2353- v = ccsIntegratedSettingReadValue (integratedSetting, type);
2354-
2355- if (!v)
2356- break;
2357-
2358- Bool showAll = v->value.asBool;
2359- ccsSetBool (setting, !showAll, TRUE);
2360- ret = TRUE;
2361- }
2362- else if (strcmp (settingName, "fullscreen_visual_bell") == 0)
2363- {
2364- type = TypeString;
2365- v = ccsIntegratedSettingReadValue (integratedSetting, type);
2366- if (!v)
2367- break;
2368-
2369- const char *value = v->value.asString;
2370- if (value)
2371- {
2372- Bool fullscreen;
2373-
2374- fullscreen = strcmp (value, "fullscreen") == 0;
2375- ccsSetBool (setting, fullscreen, TRUE);
2376- ret = TRUE;
2377- }
2378- }
2379- else if (strcmp (settingName, "click_to_focus") == 0)
2380- {
2381- type = TypeString;
2382- v = ccsIntegratedSettingReadValue (integratedSetting, type);
2383- if (!v)
2384- break;
2385-
2386- const char *focusMode = v->value.asString;
2387-
2388- if (focusMode)
2389- {
2390- Bool clickToFocus = (strcmp (focusMode, "click") == 0);
2391- ccsSetBool (setting, clickToFocus, TRUE);
2392- ret = TRUE;
2393- }
2394- }
2395- else if ((strcmp (settingName, "run_command_screenshot_key") == 0 ||
2396- strcmp (settingName, "run_command_window_screenshot_key") == 0 ||
2397- strcmp (settingName, "run_command_terminal_key") == 0))
2398- {
2399- /* These are always stored as strings, no matter what the backend is
2400- * so the source type should be string */
2401- type = TypeKey;
2402- if (ccsMATEIntegrationBackendReadISAndSetSettingForType (integratedSetting,
2403- setting,
2404- &v,
2405- TypeString,
2406- type))
2407- ret = TRUE;
2408- }
2409- else if (((strcmp (settingName, "initiate_button") == 0) &&
2410- ((strcmp (pluginName, "move") == 0) ||
2411- (strcmp (pluginName, "resize") == 0))) ||
2412- ((strcmp (settingName, "window_menu_button") == 0) &&
2413- (strcmp (pluginName, "core") == 0)))
2414- {
2415- gboolean resizeWithRightButton;
2416- CCSSettingButtonValue button;
2417-
2418- memset (&button, 0, sizeof (CCSSettingButtonValue));
2419- ccsGetButton (setting, &button);
2420-
2421- CCSIntegratedSettingList mouseModifierSetting =
2422- ccsIntegratedSettingsStorageFindMatchingSettingsByPluginAndSettingName (priv->storage,
2423- ccsMATEIntegratedPluginNames.SPECIAL,
2424- ccsMATEIntegratedSettingNames.NULL_MOUSE_BUTTON_MODIFIER.compizName);
2425-
2426- button.buttonModMask = getMateMouseButtonModifier (mouseModifierSetting->data);
2427-
2428- CCSIntegratedSettingList resizeButtonSetting =
2429- ccsIntegratedSettingsStorageFindMatchingSettingsByPluginAndSettingName (priv->storage,
2430- ccsMATEIntegratedPluginNames.SPECIAL,
2431- ccsMATEIntegratedSettingNames.NULL_RESIZE_WITH_RIGHT_BUTTON.compizName);
2432-
2433- type = TypeBool;
2434- v = ccsIntegratedSettingReadValue (resizeButtonSetting->data, type);
2435-
2436- resizeWithRightButton =
2437- v->value.asBool;
2438-
2439- if (strcmp (settingName, "window_menu_button") == 0)
2440- button.button = resizeWithRightButton ? 2 : 3;
2441- else if (strcmp (pluginName, "resize") == 0)
2442- button.button = resizeWithRightButton ? 3 : 2;
2443- else
2444- button.button = 1;
2445-
2446- ccsSetButton (setting, button, TRUE);
2447- ret = TRUE;
2448-
2449- /* Free the returned lists */
2450- ccsIntegratedSettingListFree (mouseModifierSetting, FALSE);
2451- ccsIntegratedSettingListFree (resizeButtonSetting, FALSE);
2452- }
2453-
2454- }
2455- break;
2456- default:
2457- break;
2458- }
2459-
2460- if (v)
2461- ccsFreeSettingValueWithType (v, type);
2462-
2463- return ret;
2464-}
2465-
2466-static Bool
2467-setMateMouseButtonModifier (CCSIntegratedSetting *setting,
2468- unsigned int modMask)
2469-{
2470- char *modifiers;
2471- CCSSettingValue *v = calloc (1, sizeof (CCSSettingValue));
2472-
2473- v->isListChild = FALSE;
2474- v->parent = NULL;
2475- v->refCount = 1;
2476-
2477- modifiers = ccsModifiersToString (modMask);
2478- if (!modifiers)
2479- {
2480- ccsFreeSettingValueWithType (v, TypeString);
2481- return FALSE;
2482- }
2483-
2484- v->value.asString = modifiers;
2485- ccsIntegratedSettingWriteValue (setting, v, TypeString);
2486-
2487- ccsFreeSettingValueWithType (v, TypeString);
2488-
2489- return TRUE;
2490-}
2491-
2492-static void
2493-setButtonBindingForSetting (CCSContext *context,
2494- const char *plugin,
2495- const char *setting,
2496- unsigned int button,
2497- unsigned int buttonModMask)
2498-{
2499- CCSSetting *s;
2500-
2501- s = findDisplaySettingForPlugin (context, plugin, setting);
2502- if (!s)
2503- return;
2504-
2505- if (ccsSettingGetType (s) != TypeButton)
2506- return;
2507-
2508- CCSSettingButtonValue value = ccsSettingGetValue (s)->value.asButton;
2509-
2510- if ((value.button != button) || (value.buttonModMask != buttonModMask))
2511- {
2512- value.button = button;
2513- value.buttonModMask = buttonModMask;
2514-
2515- ccsSetButton (s, value, TRUE);
2516- }
2517-}
2518-
2519-static Bool
2520-ccsMATEIntegrationBackendKeyValueToStringValue (CCSSettingValue *keyValue,
2521- CCSSettingValue *stringValue)
2522-{
2523- char *newValue;
2524-
2525- newValue = ccsKeyBindingToString (&keyValue->value.asKey);
2526- if (newValue)
2527- {
2528- if (strcmp (newValue, "Disabled") == 0)
2529- {
2530- /* Metacity doesn't like "Disabled", it wants "disabled" */
2531- newValue[0] = 'd';
2532- }
2533-
2534- stringValue->value.asString = newValue;
2535-
2536- return TRUE;
2537- }
2538-
2539- return FALSE;
2540-}
2541-
2542-static void
2543-ccsMATEIntegrationBackendWriteOptionFromSetting (CCSIntegration *integration,
2544- CCSContext *context,
2545- CCSSetting *setting,
2546- CCSIntegratedSetting *integratedSetting)
2547-{
2548- GError *err = NULL;
2549- CCSSettingType type = TypeNum;
2550-
2551- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2552-
2553- if (ccsIntegratedSettingsStorageEmpty (priv->storage))
2554- registerAllIntegratedOptions (integration);
2555-
2556- if (priv->noWrites)
2557- return;
2558-
2559- /* Do not allow recursing back into writeIntegratedSetting */
2560- ccsIntegrationDisallowIntegratedWrites (integration);
2561-
2562- CCSSettingType sType = ccsSettingGetType (setting);
2563- CCSSettingInfo *sInfo = ccsSettingGetInfo (setting);
2564-
2565- CCSSettingValue *vSetting = ccsSettingGetValue (setting);
2566- CCSSettingValue *v = ccsCopyValue (vSetting, sType, sInfo);
2567-
2568- if (!v)
2569- return;
2570-
2571- switch (ccsMATEIntegratedSettingInfoGetSpecialOptionType ((CCSMATEIntegratedSettingInfo *) integratedSetting))
2572- {
2573- case OptionInt:
2574- ccsIntegratedSettingWriteValue (integratedSetting, v, TypeInt);
2575- break;
2576- case OptionBool:
2577- ccsIntegratedSettingWriteValue (integratedSetting, v, TypeBool);
2578- break;
2579- case OptionString:
2580- ccsIntegratedSettingWriteValue (integratedSetting, v, TypeString);
2581- break;
2582- case OptionKey:
2583- {
2584- CCSSettingValue *newValue = calloc (1, sizeof (CCSSettingValue));
2585-
2586- newValue->isListChild = FALSE;
2587- newValue->parent = NULL;
2588- newValue->refCount = 1;
2589-
2590- if (ccsMATEIntegrationBackendKeyValueToStringValue (v, newValue))
2591- {
2592- /* Really this is a lie - the writer expects a string
2593- * but it needs to know if its a key or a string */
2594- type = TypeKey;
2595- ccsIntegratedSettingWriteValue (integratedSetting, newValue, type);
2596- }
2597-
2598- if (newValue)
2599- ccsFreeSettingValueWithType (newValue, TypeString);
2600- }
2601- break;
2602- case OptionSpecial:
2603- {
2604- const char *settingName = ccsSettingGetName (setting);
2605- const char *pluginName = ccsPluginGetName (ccsSettingGetParent (setting));
2606- CCSSettingValue *newValue = calloc (1, sizeof (CCSSettingValue));
2607-
2608- newValue->isListChild = FALSE;
2609- newValue->parent = NULL;
2610- newValue->refCount = 1;
2611-
2612- if (strcmp (settingName, "current_viewport") == 0)
2613- {
2614- newValue->value.asBool = !v->value.asBool;
2615- type = TypeBool;
2616-
2617- ccsIntegratedSettingWriteValue (integratedSetting, newValue, type);
2618- }
2619- else if (strcmp (settingName, "fullscreen_visual_bell") == 0)
2620- {
2621- const char *newValueString = v->value.asBool ? "fullscreen" : "frame_flash";
2622- newValue->value.asString = strdup (newValueString);
2623- type = TypeString;
2624-
2625- ccsIntegratedSettingWriteValue (integratedSetting, newValue, type);
2626- }
2627- else if (strcmp (settingName, "click_to_focus") == 0)
2628- {
2629- const char *newValueString = v->value.asBool ? "click" : "sloppy";
2630- newValue->value.asString = strdup (newValueString);
2631- type = TypeString;
2632-
2633- ccsIntegratedSettingWriteValue (integratedSetting, newValue, type);
2634- }
2635- else if ((strcmp (settingName, "run_command_screenshot_key") == 0 ||
2636- strcmp (settingName, "run_command_window_screenshot_key") == 0 ||
2637- strcmp (settingName, "run_command_terminal_key") == 0))
2638- {
2639- if (ccsMATEIntegrationBackendKeyValueToStringValue (v, newValue))
2640- {
2641- /* These are actually stored as strings in the schemas */
2642- type = TypeString;
2643- ccsIntegratedSettingWriteValue (integratedSetting, newValue, type);
2644- }
2645-
2646- }
2647- else if (((strcmp (settingName, "initiate_button") == 0) &&
2648- ((strcmp (pluginName, "move") == 0) ||
2649- (strcmp (pluginName, "resize") == 0))) ||
2650- ((strcmp (settingName, "window_menu_button") == 0) &&
2651- (strcmp (pluginName, "core") == 0)))
2652- {
2653- unsigned int modMask;
2654- Bool resizeWithRightButton = FALSE;
2655-
2656- if ((getButtonBindingForSetting (priv->context, "resize",
2657- "initiate_button") == 3) ||
2658- (getButtonBindingForSetting (priv->context, "core",
2659- "window_menu_button") == 2))
2660- {
2661- resizeWithRightButton = TRUE;
2662- }
2663-
2664- CCSIntegratedSettingList resizeButtonSetting =
2665- ccsIntegratedSettingsStorageFindMatchingSettingsByPluginAndSettingName (priv->storage,
2666- ccsMATEIntegratedPluginNames.SPECIAL,
2667- ccsMATEIntegratedSettingNames.NULL_RESIZE_WITH_RIGHT_BUTTON.compizName);
2668-
2669- newValue->value.asBool = resizeWithRightButton;
2670- type = TypeBool;
2671-
2672- ccsIntegratedSettingWriteValue (resizeButtonSetting->data, newValue, type);
2673-
2674- CCSIntegratedSettingList mouseModifierSetting =
2675- ccsIntegratedSettingsStorageFindMatchingSettingsByPluginAndSettingName (priv->storage,
2676- ccsMATEIntegratedPluginNames.SPECIAL,
2677- ccsMATEIntegratedSettingNames.NULL_MOUSE_BUTTON_MODIFIER.compizName);
2678-
2679- modMask = v->value.asButton.buttonModMask;
2680- if (setMateMouseButtonModifier (mouseModifierSetting->data, modMask))
2681- {
2682- setButtonBindingForSetting (priv->context, "move",
2683- "initiate_button", 1, modMask);
2684- setButtonBindingForSetting (priv->context, "resize",
2685- "initiate_button",
2686- resizeWithRightButton ? 3 : 2,
2687- modMask);
2688- setButtonBindingForSetting (priv->context, "core",
2689- "window_menu_button",
2690- resizeWithRightButton ? 2 : 3,
2691- modMask);
2692- }
2693-
2694- /* We own the returned lists, so free them */
2695- ccsIntegratedSettingListFree (resizeButtonSetting, FALSE);
2696- ccsIntegratedSettingListFree (mouseModifierSetting, FALSE);
2697- }
2698-
2699- if (newValue)
2700- ccsFreeSettingValueWithType (newValue, type);
2701- }
2702- break;
2703- }
2704-
2705- if (err)
2706- {
2707- ccsError ("%s", err->message);
2708- g_error_free (err);
2709- }
2710-
2711- if (v)
2712- ccsFreeSettingValueWithType (v, sType);
2713-
2714- /* we should immediately write changed settings */
2715- ccsWriteChangedSettings (priv->context);
2716- ccsIntegrationAllowIntegratedWrites (integration);
2717-}
2718-
2719-static void
2720-ccsMATEIntegrationBackendUpdateIntegratedSettings (CCSIntegration *integration,
2721- CCSContext *context,
2722- CCSIntegratedSettingList integratedSettings)
2723-{
2724- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2725- Bool needInit = TRUE;
2726-
2727- CCSIntegratedSettingList iter = integratedSettings;
2728-
2729- while (iter)
2730- {
2731- CCSIntegratedSetting *integrated = iter->data;
2732- const char *settingName = ccsIntegratedSettingInfoSettingName ((CCSIntegratedSettingInfo *)integrated);
2733- const char *pluginName = ccsIntegratedSettingInfoPluginName ((CCSIntegratedSettingInfo *) integrated);
2734-
2735- /* Special case for mouse button modifier etc */
2736- if ((strcmp (settingName,
2737- "mouse_button_modifier") == 0) ||
2738- (strcmp (settingName,
2739- "resize_with_right_button") == 0))
2740- {
2741- CCSSetting *s;
2742-
2743- if (needInit)
2744- {
2745- ccsBackendReadInit (priv->backend, priv->context);
2746- needInit = FALSE;
2747- }
2748-
2749- s = findDisplaySettingForPlugin (priv->context, "core",
2750- "window_menu_button");
2751- if (s)
2752- ccsBackendReadSetting (priv->backend, priv->context, s);
2753-
2754- s = findDisplaySettingForPlugin (priv->context, "move",
2755- "initiate_button");
2756- if (s)
2757- ccsBackendReadSetting (priv->backend, priv->context, s);
2758-
2759- s = findDisplaySettingForPlugin (priv->context, "resize",
2760- "initiate_button");
2761- if (s)
2762- ccsBackendReadSetting (priv->backend, priv->context, s);
2763- }
2764- else
2765- {
2766- CCSPlugin *plugin = NULL;
2767-
2768- plugin = ccsFindPlugin (priv->context, pluginName);
2769- if (plugin)
2770- {
2771- CCSSetting *setting;
2772- setting = ccsFindSetting (plugin, settingName);
2773-
2774- if (setting)
2775- {
2776- if (needInit)
2777- {
2778- ccsBackendReadInit (priv->backend, priv->context);
2779- needInit = FALSE;
2780- }
2781-
2782- ccsBackendReadSetting (priv->backend, priv->context, setting);
2783- }
2784- }
2785- }
2786-
2787- iter = iter->next;
2788- }
2789-}
2790-
2791-static void
2792-ccsMATEIntegrationDisallowIntegratedWrites (CCSIntegration *integration)
2793-{
2794- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2795- priv->noWrites = TRUE;
2796-}
2797-
2798-static void
2799-ccsMATEIntegrationAllowIntegratedWrites (CCSIntegration *integration)
2800-{
2801- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2802- priv->noWrites = FALSE;
2803-}
2804-
2805-static void
2806-ccsMATEIntegrationBackendFree (CCSIntegration *integration)
2807-{
2808- CCMATEIntegrationBackendPrivate *priv = (CCMATEIntegrationBackendPrivate *) ccsObjectGetPrivate (integration);
2809-
2810- unregisterAllIntegratedOptions (integration);
2811-
2812- priv->backend = NULL;
2813-
2814- ccsObjectFinalize (integration);
2815- free (integration);
2816-}
2817-
2818-const CCSIntegrationInterface ccsMATEIntegrationBackendInterface =
2819-{
2820- ccsMATEIntegrationBackendGetIntegratedSetting,
2821- ccsMATEIntegrationBackendReadOptionIntoSetting,
2822- ccsMATEIntegrationBackendWriteOptionFromSetting,
2823- ccsMATEIntegrationBackendUpdateIntegratedSettings,
2824- ccsMATEIntegrationDisallowIntegratedWrites,
2825- ccsMATEIntegrationAllowIntegratedWrites,
2826- ccsMATEIntegrationBackendFree
2827-};
2828-
2829-static CCMATEIntegrationBackendPrivate *
2830-addPrivate (CCSIntegration *backend,
2831- CCSObjectAllocationInterface *ai)
2832-{
2833- CCMATEIntegrationBackendPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCMATEIntegrationBackendPrivate));
2834-
2835- if (!priv)
2836- {
2837- ccsObjectFinalize (backend);
2838- free (backend);
2839- }
2840-
2841- ccsObjectSetPrivate (backend, (CCSPrivate *) priv);
2842-
2843- return priv;
2844-}
2845-
2846-static CCSIntegration *
2847-ccsMATEIntegrationBackendNewCommon (CCSBackend *backend,
2848- CCSContext *context,
2849- CCSIntegratedSettingFactory *factory,
2850- CCSIntegratedSettingsStorage *storage,
2851- CCSObjectAllocationInterface *ai)
2852-{
2853- CCSIntegration *integration = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSIntegration));
2854-
2855- if (!integration)
2856- return NULL;
2857-
2858- ccsObjectInit (integration, ai);
2859-
2860- CCMATEIntegrationBackendPrivate *priv = addPrivate (integration, ai);
2861- priv->backend = backend;
2862- priv->context = context;
2863- priv->factory = factory;
2864- priv->storage = storage;
2865- priv->noWrites = FALSE;
2866-
2867- ccsObjectAddInterface (integration,
2868- (const CCSInterface *) &ccsMATEIntegrationBackendInterface,
2869- GET_INTERFACE_TYPE (CCSIntegrationInterface));
2870-
2871- ccsIntegrationRef (integration);
2872-
2873- return integration;
2874-}
2875-
2876-CCSIntegration *
2877-ccsMATEIntegrationBackendNew (CCSBackend *backend,
2878- CCSContext *context,
2879- CCSIntegratedSettingFactory *factory,
2880- CCSIntegratedSettingsStorage *storage,
2881- CCSObjectAllocationInterface *ai)
2882-{
2883- return ccsMATEIntegrationBackendNewCommon (backend, context, factory, storage, ai);
2884-}
2885
2886=== removed file 'compizconfig/integration/mate/src/ccs_mate_integration_constants.c'
2887--- compizconfig/integration/mate/src/ccs_mate_integration_constants.c 2015-02-04 22:20:18 +0000
2888+++ compizconfig/integration/mate/src/ccs_mate_integration_constants.c 1970-01-01 00:00:00 +0000
2889@@ -1,1099 +0,0 @@
2890-#include <glib.h>
2891-#include "ccs_mate_integration_constants.h"
2892-
2893-const char * watchedGConfMateDirectories[] = {
2894- METACITY,
2895- "/desktop/mate/applications/terminal",
2896- "/apps/panel/applets/window_list/prefs"
2897-};
2898-
2899-const CCSMATEIntegratedSettingNames ccsMATEIntegratedSettingNames =
2900-{
2901- { "audible_bell", "audible_bell" },
2902- { "click_to_focus", "focus_mode" },
2903- { "raise_on_click", "raise_on_click" },
2904- { "autoraise_delay", "auto_raise_delay" },
2905- { "autoraise", "auto_raise" },
2906- { "current_viewport", "display_all_workspaces" },
2907- { "command_terminal", "exec" },
2908- { "command_window_screenshot", "command_window_screenshot" },
2909- { "command_screenshot", "command_screenshot" },
2910- { "rotate_right_window_key", "move_to_workspace_right" },
2911- { "rotate_left_window_key", "move_to_workspace_left" },
2912- { "rotate_to_12_window_key", "move_to_workspace_12" },
2913- { "rotate_to_11_window_key", "move_to_workspace_11" },
2914- { "rotate_to_10_window_key", "move_to_workspace_10" },
2915- { "rotate_to_9_window_key", "move_to_workspace_9" },
2916- { "rotate_to_8_window_key", "move_to_workspace_8" },
2917- { "rotate_to_7_window_key", "move_to_workspace_7" },
2918- { "rotate_to_6_window_key", "move_to_workspace_6" },
2919- { "rotate_to_5_window_key", "move_to_workspace_5" },
2920- { "rotate_to_4_window_key", "move_to_workspace_4" },
2921- { "rotate_to_3_window_key", "move_to_workspace_3" },
2922- { "rotate_to_2_window_key", "move_to_workspace_2" },
2923- { "rotate_to_1_window_key", "move_to_workspace_1" },
2924- { "put_bottom_key", "move_to_side_s" },
2925- { "put_top_key", "move_to_side_n" },
2926- { "put_right_key", "move_to_side_e" },
2927- { "put_left_key", "move_to_side_w" },
2928- { "put_bottomright_key", "move_to_corner_se" },
2929- { "put_bottomleft_key", "move_to_corner_sw" },
2930- { "put_topright_key", "move_to_corner_ne" },
2931- { "put_topleft_key", "move_to_corner_nw" },
2932- { "down_window_key", "move_to_workspace_down" },
2933- { "up_window_key", "move_to_workspace_up" },
2934- { "right_window_key", "move_to_workspace_right" },
2935- { "left_window_key", "move_to_workspace_left" },
2936- { "right_key", "switch_to_workspace_right" },
2937- { "left_key", "switch_to_workspace_left" },
2938- { "down_key", "switch_to_workspace_down" },
2939- { "up_key", "switch_to_workspace_up" },
2940- { "switch_to_12_key", "switch_to_workspace_12" },
2941- { "switch_to_11_key", "switch_to_workspace_11" },
2942- { "switch_to_10_key", "switch_to_workspace_10" },
2943- { "switch_to_9_key", "switch_to_workspace_9" },
2944- { "switch_to_8_key", "switch_to_workspace_8" },
2945- { "switch_to_7_key", "switch_to_workspace_7" },
2946- { "switch_to_6_key", "switch_to_workspace_6" },
2947- { "switch_to_5_key", "switch_to_workspace_5" },
2948- { "switch_to_4_key", "switch_to_workspace_4" },
2949- { "switch_to_3_key", "switch_to_workspace_3" },
2950- { "switch_to_2_key", "switch_to_workspace_2" },
2951- { "switch_to_1_key", "switch_to_workspace_1" },
2952- { "rotate_right_key", "switch_to_workspace_right" },
2953- { "rotate_left_key", "switch_to_workspace_left" },
2954- { "rotate_to_12_key", "switch_to_workspace_12" },
2955- { "rotate_to_11_key", "switch_to_workspace_11" },
2956- { "rotate_to_10_key", "switch_to_workspace_10" },
2957- { "rotate_to_9_key", "switch_to_workspace_9" },
2958- { "rotate_to_8_key", "switch_to_workspace_8" },
2959- { "rotate_to_7_key", "switch_to_workspace_7" },
2960- { "rotate_to_6_key", "switch_to_workspace_6" },
2961- { "rotate_to_5_key", "switch_to_workspace_5" },
2962- { "rotate_to_4_key", "switch_to_workspace_4" },
2963- { "rotate_to_3_key", "switch_to_workspace_3" },
2964- { "rotate_to_2_key", "switch_to_workspace_2" },
2965- { "rotate_to_1_key", "switch_to_workspace_1" },
2966- { "run_command11_key", "run_command_12" },
2967- { "run_command10_key", "run_command_11" },
2968- { "run_command9_key", "run_command_10" },
2969- { "run_command8_key", "run_command_9" },
2970- { "run_command7_key", "run_command_8" },
2971- { "run_command6_key", "run_command_7" },
2972- { "run_command5_key", "run_command_6" },
2973- { "run_command4_key", "run_command_5" },
2974- { "run_command3_key", "run_command_4" },
2975- { "run_command2_key", "run_command_3" },
2976- { "run_command1_key", "run_command_2" },
2977- { "run_command0_key", "run_command_1" },
2978- { "command11", "command_12" },
2979- { "command10", "command_11" },
2980- { "command9", "command_10" },
2981- { "command8", "command_9" },
2982- { "command7", "command_8" },
2983- { "command6", "command_7" },
2984- { "command5", "command_6" },
2985- { "command4", "command_5" },
2986- { "command3", "command_4" },
2987- { "command2", "command_3" },
2988- { "command1", "command_2" },
2989- { "command0", "command_1" },
2990- { "toggle_fullscreen_key", "toggle_fullscreen" },
2991- { "toggle_sticky_key", "toggle_on_all_workspaces" },
2992- { "prev_key", "switch_windows_backward" },
2993- { "next_key", "switch_windows" },
2994- { "fullscreen_visual_bell", "visual_bell_type" },
2995- { "visual_bell", "visual_bell" },
2996- { "resize_with_right_button", "resize_with_right_button" },
2997- { "mouse_button_modifier", "mouse_button_modifier" },
2998- { "window_menu_button", "activate_window_menu" },
2999- { "initiate_button", "begin_resize" },
3000- { "initiate_button", "begin_move" },
3001- { "window_menu_key", "activate_window_menu" },
3002- { "initiate_key", "begin_resize" },
3003- { "initiate_key", "begin_move" },
3004- { "show_desktop_key", "show_desktop" },
3005- { "toggle_window_shaded_key", "toggle_shaded" },
3006- { "close_window_key", "close" },
3007- { "lower_window_key", "lower" },
3008- { "raise_window_key", "raise" },
3009- { "maximize_window_vertically_key", "maximize_vertically" },
3010- { "maximize_window_horizontally_key", "maximize_horizontally" },
3011- { "unmaximize_or_minimize_window_key", "unmaximize" },
3012- { "maximize_window_key", "maximize" },
3013- { "minimize_window_key", "minimize" },
3014- { "toggle_window_maximized_key", "toggle_maximized" },
3015- { "run_command_terminal_key", "run_command_terminal" },
3016- { "run_command_window_screenshot_key", "run_command_window_screenshot" },
3017- { "run_command_screenshot_key", "run_command_screenshot" },
3018- { "main_menu_key", "panel_main_menu" },
3019- { "run_key", "panel_run_dialog" }
3020-};
3021-
3022-const CCSGConfIntegrationCategories ccsGConfIntegrationCategories =
3023-{
3024- METACITY "/general/",
3025- "/apps/panel/applets/window_list/prefs/",
3026- "/desktop/mate/applications/terminal/",
3027- METACITY "/keybinding_commands/",
3028- METACITY "/window_keybindings/",
3029- METACITY "/global_keybindings/"
3030-};
3031-
3032-const CCSMATEIntegratedPluginNames ccsMATEIntegratedPluginNames =
3033-{
3034- "core",
3035- "thumbnail",
3036- "matecompat",
3037- "rotate",
3038- "put",
3039- "wall",
3040- "vpswitch",
3041- "commands",
3042- "extrawm",
3043- "resize",
3044- "move",
3045- "staticswitcher",
3046- "fade",
3047- "__special"
3048-};
3049-
3050-static gpointer
3051-ccsMATEIntegrationInitializeIntegratedSettingsList (gpointer data)
3052-{
3053- CCSMATEIntegratedSettingsList *array = (CCSMATEIntegratedSettingsList *) data;
3054- const CCSMATEIntegratedPluginNames *plugins = &ccsMATEIntegratedPluginNames;
3055- const CCSMATEIntegratedSettingNames *settings = &ccsMATEIntegratedSettingNames;
3056-
3057- array[0].pluginName = plugins->CORE;
3058- array[0].settingName = settings->CORE_AUDIBLE_BELL.compizName;
3059- array[1].pluginName = plugins->CORE;
3060- array[1].settingName = settings->CORE_CLICK_TO_FOCUS.compizName;
3061- array[2].pluginName = plugins->CORE;
3062- array[2].settingName = settings->CORE_RAISE_ON_CLICK.compizName;
3063- array[3].pluginName = plugins->CORE;
3064- array[3].settingName = settings->CORE_AUTORAISE_DELAY.compizName;
3065- array[4].pluginName = plugins->CORE;
3066- array[4].settingName = settings->CORE_AUTORAISE.compizName;
3067- array[5].pluginName = plugins->THUMBNAIL;
3068- array[5].settingName = settings->THUMBNAIL_CURRENT_VIEWPORT.compizName;
3069- array[6].pluginName = plugins->MATECOMPAT;
3070- array[6].settingName = settings->MATECOMPAT_COMMAND_TERMINAL.compizName;
3071- array[7].pluginName = plugins->MATECOMPAT;
3072- array[7].settingName = settings->MATECOMPAT_COMMAND_WINDOW_SCREENSHOT.compizName;
3073- array[8].pluginName = plugins->MATECOMPAT;
3074- array[8].settingName = settings->MATECOMPAT_COMMAND_SCREENSHOT.compizName;
3075- array[9].pluginName = plugins->ROTATE;
3076- array[9].settingName = settings->ROTATE_ROTATE_RIGHT_WINDOW_KEY.compizName;
3077- array[10].pluginName = plugins->ROTATE;
3078- array[10].settingName = settings->ROTATE_ROTATE_LEFT_WINDOW_KEY.compizName;
3079- array[11].pluginName = plugins->ROTATE;
3080- array[11].settingName = settings->ROTATE_ROTATE_TO_12_WINDOW_KEY.compizName;
3081- array[12].pluginName = plugins->ROTATE;
3082- array[12].settingName = settings->ROTATE_ROTATE_TO_11_WINDOW_KEY.compizName;
3083- array[13].pluginName = plugins->ROTATE;
3084- array[13].settingName = settings->ROTATE_ROTATE_TO_10_WINDOW_KEY.compizName;
3085- array[14].pluginName = plugins->ROTATE;
3086- array[14].settingName = settings->ROTATE_ROTATE_TO_9_WINDOW_KEY.compizName;
3087- array[15].pluginName = plugins->ROTATE;
3088- array[15].settingName = settings->ROTATE_ROTATE_TO_8_WINDOW_KEY.compizName;
3089- array[16].pluginName = plugins->ROTATE;
3090- array[16].settingName = settings->ROTATE_ROTATE_TO_7_WINDOW_KEY.compizName;
3091- array[17].pluginName = plugins->ROTATE;
3092- array[17].settingName = settings->ROTATE_ROTATE_TO_6_WINDOW_KEY.compizName;
3093- array[18].pluginName = plugins->ROTATE;
3094- array[18].settingName = settings->ROTATE_ROTATE_TO_5_WINDOW_KEY.compizName;
3095- array[19].pluginName = plugins->ROTATE;
3096- array[19].settingName = settings->ROTATE_ROTATE_TO_4_WINDOW_KEY.compizName;
3097- array[20].pluginName = plugins->ROTATE;
3098- array[20].settingName = settings->ROTATE_ROTATE_TO_3_WINDOW_KEY.compizName;
3099- array[21].pluginName = plugins->ROTATE;
3100- array[21].settingName = settings->ROTATE_ROTATE_TO_2_WINDOW_KEY.compizName;
3101- array[22].pluginName = plugins->ROTATE;
3102- array[22].settingName = settings->ROTATE_ROTATE_TO_1_WINDOW_KEY.compizName;
3103- array[23].pluginName = plugins->PUT;
3104- array[23].settingName = settings->PUT_PUT_BOTTOM_KEY.compizName;
3105- array[24].pluginName = plugins->PUT;
3106- array[24].settingName = settings->PUT_PUT_TOP_KEY.compizName;
3107- array[25].pluginName = plugins->PUT;
3108- array[25].settingName = settings->PUT_PUT_RIGHT_KEY.compizName;
3109- array[26].pluginName = plugins->PUT;
3110- array[26].settingName = settings->PUT_PUT_LEFT_KEY.compizName;
3111- array[27].pluginName = plugins->PUT;
3112- array[27].settingName = settings->PUT_PUT_BOTTOMRIGHT_KEY.compizName;
3113- array[28].pluginName = plugins->PUT;
3114- array[28].settingName = settings->PUT_PUT_BOTTOMLEFT_KEY.compizName;
3115- array[29].pluginName = plugins->PUT;
3116- array[29].settingName = settings->PUT_PUT_TOPRIGHT_KEY.compizName;
3117- array[30].pluginName = plugins->PUT;
3118- array[30].settingName = settings->PUT_PUT_TOPLEFT_KEY.compizName;
3119- array[31].pluginName = plugins->WALL;
3120- array[31].settingName = settings->WALL_DOWN_WINDOW_KEY.compizName;
3121- array[32].pluginName = plugins->WALL;
3122- array[32].settingName = settings->WALL_UP_WINDOW_KEY.compizName;
3123- array[33].pluginName = plugins->WALL;
3124- array[33].settingName = settings->WALL_RIGHT_WINDOW_KEY.compizName;
3125- array[34].pluginName = plugins->WALL;
3126- array[34].settingName = settings->WALL_LEFT_WINDOW_KEY.compizName;
3127- array[35].pluginName = plugins->WALL;
3128- array[35].settingName = settings->WALL_RIGHT_KEY.compizName;
3129- array[36].pluginName = plugins->WALL;
3130- array[36].settingName = settings->WALL_LEFT_KEY.compizName;
3131- array[37].pluginName = plugins->WALL;
3132- array[37].settingName = settings->WALL_DOWN_KEY.compizName;
3133- array[38].pluginName = plugins->WALL;
3134- array[38].settingName = settings->WALL_UP_KEY.compizName;
3135- array[39].pluginName = plugins->VPSWITCH;
3136- array[39].settingName = settings->VPSWITCH_SWITCH_TO_12_KEY.compizName;
3137- array[40].pluginName = plugins->VPSWITCH;
3138- array[40].settingName = settings->VPSWITCH_SWITCH_TO_11_KEY.compizName;
3139- array[41].pluginName = plugins->VPSWITCH;
3140- array[41].settingName = settings->VPSWITCH_SWITCH_TO_10_KEY.compizName;
3141- array[42].pluginName = plugins->VPSWITCH;
3142- array[42].settingName = settings->VPSWITCH_SWITCH_TO_9_KEY.compizName;
3143- array[43].pluginName = plugins->VPSWITCH;
3144- array[43].settingName = settings->VPSWITCH_SWITCH_TO_8_KEY.compizName;
3145- array[44].pluginName = plugins->VPSWITCH;
3146- array[44].settingName = settings->VPSWITCH_SWITCH_TO_7_KEY.compizName;
3147- array[45].pluginName = plugins->VPSWITCH;
3148- array[45].settingName = settings->VPSWITCH_SWITCH_TO_6_KEY.compizName;
3149- array[46].pluginName = plugins->VPSWITCH;
3150- array[46].settingName = settings->VPSWITCH_SWITCH_TO_5_KEY.compizName;
3151- array[47].pluginName = plugins->VPSWITCH;
3152- array[47].settingName = settings->VPSWITCH_SWITCH_TO_4_KEY.compizName;
3153- array[48].pluginName = plugins->VPSWITCH;
3154- array[48].settingName = settings->VPSWITCH_SWITCH_TO_3_KEY.compizName;
3155- array[49].pluginName = plugins->VPSWITCH;
3156- array[49].settingName = settings->VPSWITCH_SWITCH_TO_2_KEY.compizName;
3157- array[50].pluginName = plugins->VPSWITCH;
3158- array[50].settingName = settings->VPSWITCH_SWITCH_TO_1_KEY.compizName;
3159- array[51].pluginName = plugins->ROTATE;
3160- array[51].settingName = settings->ROTATE_ROTATE_RIGHT_KEY.compizName;
3161- array[52].pluginName = plugins->ROTATE;
3162- array[52].settingName = settings->ROTATE_ROTATE_LEFT_KEY.compizName;
3163- array[53].pluginName = plugins->ROTATE;
3164- array[53].settingName = settings->ROTATE_ROTATE_TO_12_KEY.compizName;
3165- array[54].pluginName = plugins->ROTATE;
3166- array[54].settingName = settings->ROTATE_ROTATE_TO_11_KEY.compizName;
3167- array[55].pluginName = plugins->ROTATE;
3168- array[55].settingName = settings->ROTATE_ROTATE_TO_10_KEY.compizName;
3169- array[56].pluginName = plugins->ROTATE;
3170- array[56].settingName = settings->ROTATE_ROTATE_TO_9_KEY.compizName;
3171- array[57].pluginName = plugins->ROTATE;
3172- array[57].settingName = settings->ROTATE_ROTATE_TO_8_KEY.compizName;
3173- array[58].pluginName = plugins->ROTATE;
3174- array[58].settingName = settings->ROTATE_ROTATE_TO_7_KEY.compizName;
3175- array[59].pluginName = plugins->ROTATE;
3176- array[59].settingName = settings->ROTATE_ROTATE_TO_6_KEY.compizName;
3177- array[60].pluginName = plugins->ROTATE;
3178- array[60].settingName = settings->ROTATE_ROTATE_TO_5_KEY.compizName;
3179- array[61].pluginName = plugins->ROTATE;
3180- array[61].settingName = settings->ROTATE_ROTATE_TO_4_KEY.compizName;
3181- array[62].pluginName = plugins->ROTATE;
3182- array[62].settingName = settings->ROTATE_ROTATE_TO_3_KEY.compizName;
3183- array[63].pluginName = plugins->ROTATE;
3184- array[63].settingName = settings->ROTATE_ROTATE_TO_2_KEY.compizName;
3185- array[64].pluginName = plugins->ROTATE;
3186- array[64].settingName = settings->ROTATE_ROTATE_TO_1_KEY.compizName;
3187- array[65].pluginName = plugins->COMMANDS;
3188- array[65].settingName = settings->COMMANDS_RUN_COMMAND11_KEY.compizName;
3189- array[66].pluginName = plugins->COMMANDS;
3190- array[66].settingName = settings->COMMANDS_RUN_COMMAND10_KEY.compizName;
3191- array[67].pluginName = plugins->COMMANDS;
3192- array[67].settingName = settings->COMMANDS_RUN_COMMAND9_KEY.compizName;
3193- array[68].pluginName = plugins->COMMANDS;
3194- array[68].settingName = settings->COMMANDS_RUN_COMMAND8_KEY.compizName;
3195- array[69].pluginName = plugins->COMMANDS;
3196- array[69].settingName = settings->COMMANDS_RUN_COMMAND7_KEY.compizName;
3197- array[70].pluginName = plugins->COMMANDS;
3198- array[70].settingName = settings->COMMANDS_RUN_COMMAND6_KEY.compizName;
3199- array[71].pluginName = plugins->COMMANDS;
3200- array[71].settingName = settings->COMMANDS_RUN_COMMAND5_KEY.compizName;
3201- array[72].pluginName = plugins->COMMANDS;
3202- array[72].settingName = settings->COMMANDS_RUN_COMMAND4_KEY.compizName;
3203- array[73].pluginName = plugins->COMMANDS;
3204- array[73].settingName = settings->COMMANDS_RUN_COMMAND3_KEY.compizName;
3205- array[74].pluginName = plugins->COMMANDS;
3206- array[74].settingName = settings->COMMANDS_RUN_COMMAND2_KEY.compizName;
3207- array[75].pluginName = plugins->COMMANDS;
3208- array[75].settingName = settings->COMMANDS_RUN_COMMAND1_KEY.compizName;
3209- array[76].pluginName = plugins->COMMANDS;
3210- array[76].settingName = settings->COMMANDS_RUN_COMMAND0_KEY.compizName;
3211- array[77].pluginName = plugins->COMMANDS;
3212- array[77].settingName = settings->COMMANDS_COMMAND11.compizName;
3213- array[78].pluginName = plugins->COMMANDS;
3214- array[78].settingName = settings->COMMANDS_COMMAND10.compizName;
3215- array[79].pluginName = plugins->COMMANDS;
3216- array[79].settingName = settings->COMMANDS_COMMAND9.compizName;
3217- array[80].pluginName = plugins->COMMANDS;
3218- array[80].settingName = settings->COMMANDS_COMMAND8.compizName;
3219- array[81].pluginName = plugins->COMMANDS;
3220- array[81].settingName = settings->COMMANDS_COMMAND7.compizName;
3221- array[82].pluginName = plugins->COMMANDS;
3222- array[82].settingName = settings->COMMANDS_COMMAND6.compizName;
3223- array[83].pluginName = plugins->COMMANDS;
3224- array[83].settingName = settings->COMMANDS_COMMAND5.compizName;
3225- array[84].pluginName = plugins->COMMANDS;
3226- array[84].settingName = settings->COMMANDS_COMMAND4.compizName;
3227- array[85].pluginName = plugins->COMMANDS;
3228- array[85].settingName = settings->COMMANDS_COMMAND3.compizName;
3229- array[86].pluginName = plugins->COMMANDS;
3230- array[86].settingName = settings->COMMANDS_COMMAND2.compizName;
3231- array[87].pluginName = plugins->COMMANDS;
3232- array[87].settingName = settings->COMMANDS_COMMAND1.compizName;
3233- array[88].pluginName = plugins->COMMANDS;
3234- array[88].settingName = settings->COMMANDS_COMMAND0.compizName;
3235- array[89].pluginName = plugins->EXTRAWM;
3236- array[89].settingName = settings->EXTRAWM_TOGGLE_FULLSCREEN_KEY.compizName;
3237- array[90].pluginName = plugins->EXTRAWM;
3238- array[90].settingName = settings->EXTRAWM_TOGGLE_STICKY_KEY.compizName;
3239- array[91].pluginName = plugins->STATICSWITCHER;
3240- array[91].settingName = settings->STATICSWITCHER_PREV_KEY.compizName;
3241- array[92].pluginName = plugins->STATICSWITCHER;
3242- array[92].settingName = settings->STATICSWITCHER_NEXT_KEY.compizName;
3243- array[93].pluginName = plugins->FADE;
3244- array[93].settingName = settings->FADE_FULLSCREEN_VISUAL_BELL.compizName;
3245- array[94].pluginName = plugins->FADE;
3246- array[94].settingName = settings->FADE_VISUAL_BELL.compizName;
3247- array[95].pluginName = plugins->SPECIAL;
3248- array[95].settingName = settings->NULL_RESIZE_WITH_RIGHT_BUTTON.compizName;
3249- array[96].pluginName = plugins->SPECIAL;
3250- array[96].settingName = settings->NULL_MOUSE_BUTTON_MODIFIER.compizName;
3251- array[97].pluginName = plugins->CORE;
3252- array[97].settingName = settings->CORE_WINDOW_MENU_BUTTON.compizName;
3253- array[98].pluginName = plugins->RESIZE;
3254- array[98].settingName = settings->RESIZE_INITIATE_BUTTON.compizName;
3255- array[99].pluginName = plugins->MOVE;
3256- array[99].settingName = settings->MOVE_INITIATE_BUTTON.compizName;
3257- array[100].pluginName = plugins->CORE;
3258- array[100].settingName = settings->CORE_WINDOW_MENU_KEY.compizName;
3259- array[101].pluginName = plugins->RESIZE;
3260- array[101].settingName = settings->RESIZE_INITIATE_KEY.compizName;
3261- array[102].pluginName = plugins->MOVE;
3262- array[102].settingName = settings->MOVE_INITIATE_KEY.compizName;
3263- array[103].pluginName = plugins->CORE;
3264- array[103].settingName = settings->CORE_SHOW_DESKTOP_KEY.compizName;
3265- array[104].pluginName = plugins->CORE;
3266- array[104].settingName = settings->CORE_TOGGLE_WINDOW_SHADED_KEY.compizName;
3267- array[105].pluginName = plugins->CORE;
3268- array[105].settingName = settings->CORE_CLOSE_WINDOW_KEY.compizName;
3269- array[106].pluginName = plugins->CORE;
3270- array[106].settingName = settings->CORE_LOWER_WINDOW_KEY.compizName;
3271- array[107].pluginName = plugins->CORE;
3272- array[107].settingName = settings->CORE_RAISE_WINDOW_KEY.compizName;
3273- array[108].pluginName = plugins->CORE;
3274- array[108].settingName = settings->CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY.compizName;
3275- array[109].pluginName = plugins->CORE;
3276- array[109].settingName = settings->CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY.compizName;
3277- array[110].pluginName = plugins->CORE;
3278- array[110].settingName = settings->CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY.compizName;
3279- array[111].pluginName = plugins->CORE;
3280- array[111].settingName = settings->CORE_MAXIMIZE_WINDOW_KEY.compizName;
3281- array[112].pluginName = plugins->CORE;
3282- array[112].settingName = settings->CORE_MINIMIZE_WINDOW_KEY.compizName;
3283- array[113].pluginName = plugins->CORE;
3284- array[113].settingName = settings->CORE_TOGGLE_WINDOW_MAXIMIZED_KEY.compizName;
3285- array[114].pluginName = plugins->MATECOMPAT;
3286- array[114].settingName = settings->MATECOMPAT_RUN_COMMAND_TERMINAL_KEY.compizName;
3287- array[115].pluginName = plugins->MATECOMPAT;
3288- array[115].settingName = settings->MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY.compizName;
3289- array[116].pluginName = plugins->MATECOMPAT;
3290- array[116].settingName = settings->MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY.compizName;
3291- array[117].pluginName = plugins->MATECOMPAT;
3292- array[117].settingName = settings->MATECOMPAT_MAIN_MENU_KEY.compizName;
3293- array[118].pluginName = plugins->MATECOMPAT;
3294- array[118].settingName = settings->MATECOMPAT_RUN_KEY.compizName;
3295-
3296-
3297- return NULL;
3298-}
3299-
3300-const CCSMATEIntegratedSettingsList *
3301-ccsMATEIntegratedSettingsList ()
3302-{
3303- static GOnce initIntegratedSettings = G_ONCE_INIT;
3304- static CCSMATEIntegratedSettingsList settings[CCS_MATE_INTEGRATED_SETTINGS_LIST_SIZE];
3305-
3306- g_once (&initIntegratedSettings, ccsMATEIntegrationInitializeIntegratedSettingsList, (gpointer) settings);
3307-
3308- return settings;
3309-}
3310-
3311-gpointer
3312-ccsMATEGSettingsIntegrationInitializeIntegratedSchemasQuarks (gpointer data)
3313-{
3314- CCSGSettingsWrapperIntegratedSchemasQuarks *quarks = (CCSGSettingsWrapperIntegratedSchemasQuarks *) data;
3315-
3316- static const char *org_compiz_integrated = "org.compiz.integrated";
3317- static const char *org_mate_desktop_wm_keybindings = "org.mate.Marco.global-keybindings";
3318- static const char *org_mate_desktop_wm_preferences = "org.mate.Marco.general";
3319- static const char *org_mate_settings_daemon_plugins_media_keys = "org.mate.SettingsDaemon.plugins.media-keys";
3320- static const char *org_mate_desktop_default_applications_terminal = "org.mate.applications-terminal";
3321-
3322- quarks->ORG_COMPIZ_INTEGRATED = g_quark_from_string (org_compiz_integrated);
3323- quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS = g_quark_from_string (org_mate_desktop_wm_keybindings);
3324- quarks->ORG_MATE_DESKTOP_WM_PREFERENCES = g_quark_from_string (org_mate_desktop_wm_preferences);
3325- quarks->ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS = g_quark_from_string (org_mate_settings_daemon_plugins_media_keys);
3326- quarks->ORG_MATE_DESKTOP_DEFAULT_APPLICATIONS_TERMINAL = g_quark_from_string (org_mate_desktop_default_applications_terminal);
3327-
3328- return NULL;
3329-}
3330-
3331-const CCSGSettingsWrapperIntegratedSchemasQuarks *
3332-ccsMATEGSettingsWrapperQuarks ()
3333-{
3334- static GOnce initIntegratedSchemaQuarks = G_ONCE_INIT;
3335- static CCSGSettingsWrapperIntegratedSchemasQuarks quarks;
3336-
3337- g_once (&initIntegratedSchemaQuarks, ccsMATEGSettingsIntegrationInitializeIntegratedSchemasQuarks, (gpointer) &quarks);
3338-
3339- return &quarks;
3340-}
3341-
3342-static void destroyHashTableInternal (void *ht)
3343-{
3344- g_hash_table_unref ((GHashTable *) ht);
3345-}
3346-
3347-GHashTable *
3348-ccsMATEGSettingsIntegrationPopulateSettingNameToIntegratedSchemasQuarksHashTable ()
3349-{
3350- GHashTable *masterHashTable = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, destroyHashTableInternal);
3351- GHashTable *coreHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3352- GHashTable *thumbnailHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3353- GHashTable *matecompatHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3354- GHashTable *rotateHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3355- GHashTable *putHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3356- GHashTable *wallHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3357- GHashTable *vpswitchHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3358- GHashTable *commandsHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3359- GHashTable *extrawmHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3360- GHashTable *resizeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3361- GHashTable *moveHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3362- GHashTable *staticswitcherHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3363- GHashTable *fadeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3364- GHashTable *specialHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3365-
3366- const CCSMATEIntegratedSettingNames *names = &ccsMATEIntegratedSettingNames;
3367- const CCSMATEIntegratedPluginNames *plugins = &ccsMATEIntegratedPluginNames;
3368- const CCSGSettingsWrapperIntegratedSchemasQuarks *quarks = ccsMATEGSettingsWrapperQuarks ();
3369-
3370- g_hash_table_insert (masterHashTable, (gpointer) plugins->CORE, coreHashTable);
3371- g_hash_table_insert (masterHashTable, (gpointer) plugins->THUMBNAIL, thumbnailHashTable);
3372- g_hash_table_insert (masterHashTable, (gpointer) plugins->MATECOMPAT, matecompatHashTable);
3373- g_hash_table_insert (masterHashTable, (gpointer) plugins->ROTATE, rotateHashTable);
3374- g_hash_table_insert (masterHashTable, (gpointer) plugins->PUT, putHashTable);
3375- g_hash_table_insert (masterHashTable, (gpointer) plugins->WALL, wallHashTable);
3376- g_hash_table_insert (masterHashTable, (gpointer) plugins->VPSWITCH, vpswitchHashTable);
3377- g_hash_table_insert (masterHashTable, (gpointer) plugins->COMMANDS, commandsHashTable);
3378- g_hash_table_insert (masterHashTable, (gpointer) plugins->EXTRAWM, extrawmHashTable);
3379- g_hash_table_insert (masterHashTable, (gpointer) plugins->STATICSWITCHER, staticswitcherHashTable);
3380- g_hash_table_insert (masterHashTable, (gpointer) plugins->FADE, fadeHashTable);
3381- g_hash_table_insert (masterHashTable, (gpointer) plugins->RESIZE, resizeHashTable);
3382- g_hash_table_insert (masterHashTable, (gpointer) plugins->MOVE, moveHashTable);
3383- g_hash_table_insert (masterHashTable, (gpointer) plugins->SPECIAL, specialHashTable);
3384-
3385- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUDIBLE_BELL.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3386- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLICK_TO_FOCUS.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3387- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_ON_CLICK.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3388- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE_DELAY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3389- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3390- g_hash_table_insert (thumbnailHashTable, (gpointer) names->THUMBNAIL_CURRENT_VIEWPORT.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3391- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_TERMINAL.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_DEFAULT_APPLICATIONS_TERMINAL));
3392- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_WINDOW_SCREENSHOT.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3393- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_SCREENSHOT.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3394- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3395- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3396- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3397- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3398- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3399- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3400- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3401- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3402- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3403- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3404- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3405- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3406- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3407- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3408- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOM_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3409- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOP_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3410- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_RIGHT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3411- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_LEFT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3412- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMRIGHT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3413- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMLEFT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3414- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPRIGHT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3415- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPLEFT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3416- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3417- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3418- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3419- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3420- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3421- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3422- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3423- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3424- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_12_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3425- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_11_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3426- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_10_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3427- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_9_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3428- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_8_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3429- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_7_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3430- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_6_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3431- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_5_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3432- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_4_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3433- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_3_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3434- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_2_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3435- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_1_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3436- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3437- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3438- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3439- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3440- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3441- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3442- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3443- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3444- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3445- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3446- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3447- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3448- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3449- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3450- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND11_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3451- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND10_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3452- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND9_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3453- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND8_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3454- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND7_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3455- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND6_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3456- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND5_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3457- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND4_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3458- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND3_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3459- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND2_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3460- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND1_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3461- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND0_KEY.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3462- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND11.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3463- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND10.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3464- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND9.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3465- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND8.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3466- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND7.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3467- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND6.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3468- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND5.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3469- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND4.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3470- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND3.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3471- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND2.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3472- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND1.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3473- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND0.compizName, GINT_TO_POINTER (quarks->ORG_COMPIZ_INTEGRATED));
3474- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_FULLSCREEN_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3475- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_STICKY_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3476- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_PREV_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3477- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_NEXT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3478- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_FULLSCREEN_VISUAL_BELL.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3479- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_VISUAL_BELL.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3480- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_RESIZE_WITH_RIGHT_BUTTON.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3481- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_MOUSE_BUTTON_MODIFIER.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_PREFERENCES));
3482- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_BUTTON.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3483- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_BUTTON.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3484- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_BUTTON.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3485- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3486- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3487- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3488- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_SHOW_DESKTOP_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3489- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_SHADED_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3490- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLOSE_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3491- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_LOWER_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3492- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3493- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3494- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3495- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3496- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3497- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MINIMIZE_WINDOW_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3498- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_MAXIMIZED_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3499- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_TERMINAL_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS));
3500- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS));
3501- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_SETTINGS_DAEMON_PLUGINS_MEDIA_KEYS));
3502- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_MAIN_MENU_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3503- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_KEY.compizName, GINT_TO_POINTER (quarks->ORG_MATE_DESKTOP_WM_KEYBINDINGS));
3504-
3505- return masterHashTable;
3506-}
3507-
3508-GHashTable *
3509-ccsMATEIntegrationPopulateCategoriesHashTables ()
3510-{
3511- GHashTable *masterHashTable = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, destroyHashTableInternal);
3512- GHashTable *coreHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3513- GHashTable *thumbnailHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3514- GHashTable *matecompatHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3515- GHashTable *rotateHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3516- GHashTable *putHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3517- GHashTable *wallHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3518- GHashTable *vpswitchHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3519- GHashTable *commandsHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3520- GHashTable *extrawmHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3521- GHashTable *resizeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3522- GHashTable *moveHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3523- GHashTable *staticswitcherHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3524- GHashTable *fadeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3525- GHashTable *specialHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3526-
3527- const CCSMATEIntegratedSettingNames *names = &ccsMATEIntegratedSettingNames;
3528- const CCSGConfIntegrationCategories *categories = &ccsGConfIntegrationCategories;
3529- const CCSMATEIntegratedPluginNames *plugins = &ccsMATEIntegratedPluginNames;
3530-
3531- g_hash_table_insert (masterHashTable, (gpointer) plugins->CORE, coreHashTable);
3532- g_hash_table_insert (masterHashTable, (gpointer) plugins->THUMBNAIL, thumbnailHashTable);
3533- g_hash_table_insert (masterHashTable, (gpointer) plugins->MATECOMPAT, matecompatHashTable);
3534- g_hash_table_insert (masterHashTable, (gpointer) plugins->ROTATE, rotateHashTable);
3535- g_hash_table_insert (masterHashTable, (gpointer) plugins->PUT, putHashTable);
3536- g_hash_table_insert (masterHashTable, (gpointer) plugins->WALL, wallHashTable);
3537- g_hash_table_insert (masterHashTable, (gpointer) plugins->VPSWITCH, vpswitchHashTable);
3538- g_hash_table_insert (masterHashTable, (gpointer) plugins->COMMANDS, commandsHashTable);
3539- g_hash_table_insert (masterHashTable, (gpointer) plugins->EXTRAWM, extrawmHashTable);
3540- g_hash_table_insert (masterHashTable, (gpointer) plugins->STATICSWITCHER, staticswitcherHashTable);
3541- g_hash_table_insert (masterHashTable, (gpointer) plugins->FADE, fadeHashTable);
3542- g_hash_table_insert (masterHashTable, (gpointer) plugins->RESIZE, resizeHashTable);
3543- g_hash_table_insert (masterHashTable, (gpointer) plugins->MOVE, moveHashTable);
3544- g_hash_table_insert (masterHashTable, (gpointer) plugins->SPECIAL, specialHashTable);
3545-
3546- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUDIBLE_BELL.compizName, (gpointer) categories->GENERAL);
3547- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLICK_TO_FOCUS.compizName, (gpointer) categories->GENERAL);
3548- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_ON_CLICK.compizName, (gpointer) categories->GENERAL);
3549- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE_DELAY.compizName, (gpointer) categories->GENERAL);
3550- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE.compizName, (gpointer) categories->GENERAL);
3551- g_hash_table_insert (thumbnailHashTable, (gpointer) names->THUMBNAIL_CURRENT_VIEWPORT.compizName, (gpointer) categories->APPS);
3552- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_TERMINAL.compizName, (gpointer) categories->DESKTOP);
3553- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_WINDOW_SCREENSHOT.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3554- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_SCREENSHOT.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3555- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3556- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3557- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3558- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3559- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3560- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3561- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3562- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3563- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3564- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3565- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3566- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3567- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3568- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3569- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOM_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3570- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOP_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3571- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_RIGHT_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3572- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_LEFT_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3573- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMRIGHT_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3574- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMLEFT_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3575- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPRIGHT_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3576- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPLEFT_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3577- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3578- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3579- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3580- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3581- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3582- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3583- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3584- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3585- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_12_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3586- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_11_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3587- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_10_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3588- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_9_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3589- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_8_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3590- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_7_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3591- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_6_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3592- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_5_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3593- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_4_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3594- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_3_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3595- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_2_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3596- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_1_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3597- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3598- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3599- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3600- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3601- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3602- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3603- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3604- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3605- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3606- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3607- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3608- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3609- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3610- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3611- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND11_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3612- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND10_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3613- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND9_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3614- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND8_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3615- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND7_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3616- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND6_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3617- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND5_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3618- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND4_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3619- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND3_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3620- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND2_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3621- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND1_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3622- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND0_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3623- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND11.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3624- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND10.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3625- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND9.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3626- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND8.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3627- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND7.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3628- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND6.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3629- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND5.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3630- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND4.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3631- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND3.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3632- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND2.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3633- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND1.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3634- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND0.compizName, (gpointer) categories->KEYBINDING_COMMANDS);
3635- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_FULLSCREEN_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3636- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_STICKY_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3637- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_PREV_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3638- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_NEXT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3639- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_FULLSCREEN_VISUAL_BELL.compizName, (gpointer) categories->GENERAL);
3640- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_VISUAL_BELL.compizName, (gpointer) categories->GENERAL);
3641- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_RESIZE_WITH_RIGHT_BUTTON.compizName, (gpointer) categories->GENERAL);
3642- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_MOUSE_BUTTON_MODIFIER.compizName, (gpointer) categories->GENERAL);
3643- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_BUTTON.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3644- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_BUTTON.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3645- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_BUTTON.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3646- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3647- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3648- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3649- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_SHOW_DESKTOP_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3650- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_SHADED_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3651- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLOSE_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3652- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_LOWER_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3653- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3654- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3655- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3656- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3657- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3658- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MINIMIZE_WINDOW_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3659- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_MAXIMIZED_KEY.compizName, (gpointer) categories->WINDOW_KEYBINDINGS);
3660- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_TERMINAL_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3661- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3662- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3663- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_MAIN_MENU_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3664- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_KEY.compizName, (gpointer) categories->GLOBAL_KEYBINDINGS);
3665-
3666- return masterHashTable;
3667-}
3668-
3669-
3670-GHashTable *
3671-ccsMATEIntegrationPopulateSpecialTypesHashTables ()
3672-{
3673- GHashTable *masterHashTable = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, destroyHashTableInternal);
3674- GHashTable *coreHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3675- GHashTable *thumbnailHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3676- GHashTable *matecompatHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3677- GHashTable *rotateHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3678- GHashTable *putHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3679- GHashTable *wallHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3680- GHashTable *vpswitchHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3681- GHashTable *commandsHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3682- GHashTable *extrawmHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3683- GHashTable *resizeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3684- GHashTable *moveHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3685- GHashTable *staticswitcherHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3686- GHashTable *fadeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3687- GHashTable *specialHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3688-
3689- const CCSMATEIntegratedSettingNames *names = &ccsMATEIntegratedSettingNames;
3690- const CCSMATEIntegratedPluginNames *plugins = &ccsMATEIntegratedPluginNames;
3691-
3692- g_hash_table_insert (masterHashTable, (gpointer) plugins->CORE, coreHashTable);
3693- g_hash_table_insert (masterHashTable, (gpointer) plugins->THUMBNAIL, thumbnailHashTable);
3694- g_hash_table_insert (masterHashTable, (gpointer) plugins->MATECOMPAT, matecompatHashTable);
3695- g_hash_table_insert (masterHashTable, (gpointer) plugins->ROTATE, rotateHashTable);
3696- g_hash_table_insert (masterHashTable, (gpointer) plugins->PUT, putHashTable);
3697- g_hash_table_insert (masterHashTable, (gpointer) plugins->WALL, wallHashTable);
3698- g_hash_table_insert (masterHashTable, (gpointer) plugins->VPSWITCH, vpswitchHashTable);
3699- g_hash_table_insert (masterHashTable, (gpointer) plugins->COMMANDS, commandsHashTable);
3700- g_hash_table_insert (masterHashTable, (gpointer) plugins->EXTRAWM, extrawmHashTable);
3701- g_hash_table_insert (masterHashTable, (gpointer) plugins->STATICSWITCHER, staticswitcherHashTable);
3702- g_hash_table_insert (masterHashTable, (gpointer) plugins->FADE, fadeHashTable);
3703- g_hash_table_insert (masterHashTable, (gpointer) plugins->RESIZE, resizeHashTable);
3704- g_hash_table_insert (masterHashTable, (gpointer) plugins->MOVE, moveHashTable);
3705- g_hash_table_insert (masterHashTable, (gpointer) plugins->SPECIAL, specialHashTable);
3706-
3707- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUDIBLE_BELL.compizName, GINT_TO_POINTER (OptionBool));
3708- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLICK_TO_FOCUS.compizName, GINT_TO_POINTER (OptionSpecial));
3709- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_ON_CLICK.compizName, GINT_TO_POINTER (OptionBool));
3710- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE_DELAY.compizName, GINT_TO_POINTER (OptionInt));
3711- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE.compizName, GINT_TO_POINTER (OptionBool));
3712- g_hash_table_insert (thumbnailHashTable, (gpointer) names->THUMBNAIL_CURRENT_VIEWPORT.compizName, GINT_TO_POINTER (OptionSpecial));
3713- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_TERMINAL.compizName, GINT_TO_POINTER (OptionString));
3714- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_WINDOW_SCREENSHOT.compizName, GINT_TO_POINTER (OptionString));
3715- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_SCREENSHOT.compizName, GINT_TO_POINTER (OptionString));
3716- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3717- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3718- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3719- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3720- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3721- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3722- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3723- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3724- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3725- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3726- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3727- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3728- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3729- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3730- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOM_KEY.compizName, GINT_TO_POINTER (OptionKey));
3731- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOP_KEY.compizName, GINT_TO_POINTER (OptionKey));
3732- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_RIGHT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3733- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_LEFT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3734- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMRIGHT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3735- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMLEFT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3736- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPRIGHT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3737- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPLEFT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3738- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3739- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3740- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3741- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3742- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3743- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3744- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_KEY.compizName, GINT_TO_POINTER (OptionKey));
3745- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_KEY.compizName, GINT_TO_POINTER (OptionKey));
3746- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_12_KEY.compizName, GINT_TO_POINTER (OptionKey));
3747- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_11_KEY.compizName, GINT_TO_POINTER (OptionKey));
3748- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_10_KEY.compizName, GINT_TO_POINTER (OptionKey));
3749- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_9_KEY.compizName, GINT_TO_POINTER (OptionKey));
3750- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_8_KEY.compizName, GINT_TO_POINTER (OptionKey));
3751- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_7_KEY.compizName, GINT_TO_POINTER (OptionKey));
3752- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_6_KEY.compizName, GINT_TO_POINTER (OptionKey));
3753- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_5_KEY.compizName, GINT_TO_POINTER (OptionKey));
3754- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_4_KEY.compizName, GINT_TO_POINTER (OptionKey));
3755- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_3_KEY.compizName, GINT_TO_POINTER (OptionKey));
3756- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_2_KEY.compizName, GINT_TO_POINTER (OptionKey));
3757- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_1_KEY.compizName, GINT_TO_POINTER (OptionKey));
3758- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3759- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3760- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_KEY.compizName, GINT_TO_POINTER (OptionKey));
3761- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_KEY.compizName, GINT_TO_POINTER (OptionKey));
3762- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_KEY.compizName, GINT_TO_POINTER (OptionKey));
3763- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_KEY.compizName, GINT_TO_POINTER (OptionKey));
3764- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_KEY.compizName, GINT_TO_POINTER (OptionKey));
3765- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_KEY.compizName, GINT_TO_POINTER (OptionKey));
3766- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_KEY.compizName, GINT_TO_POINTER (OptionKey));
3767- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_KEY.compizName, GINT_TO_POINTER (OptionKey));
3768- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_KEY.compizName, GINT_TO_POINTER (OptionKey));
3769- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_KEY.compizName, GINT_TO_POINTER (OptionKey));
3770- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_KEY.compizName, GINT_TO_POINTER (OptionKey));
3771- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_KEY.compizName, GINT_TO_POINTER (OptionKey));
3772- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND11_KEY.compizName, GINT_TO_POINTER (OptionKey));
3773- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND10_KEY.compizName, GINT_TO_POINTER (OptionKey));
3774- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND9_KEY.compizName, GINT_TO_POINTER (OptionKey));
3775- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND8_KEY.compizName, GINT_TO_POINTER (OptionKey));
3776- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND7_KEY.compizName, GINT_TO_POINTER (OptionKey));
3777- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND6_KEY.compizName, GINT_TO_POINTER (OptionKey));
3778- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND5_KEY.compizName, GINT_TO_POINTER (OptionKey));
3779- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND4_KEY.compizName, GINT_TO_POINTER (OptionKey));
3780- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND3_KEY.compizName, GINT_TO_POINTER (OptionKey));
3781- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND2_KEY.compizName, GINT_TO_POINTER (OptionKey));
3782- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND1_KEY.compizName, GINT_TO_POINTER (OptionKey));
3783- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND0_KEY.compizName, GINT_TO_POINTER (OptionKey));
3784- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND11.compizName, GINT_TO_POINTER (OptionString));
3785- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND10.compizName, GINT_TO_POINTER (OptionString));
3786- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND9.compizName, GINT_TO_POINTER (OptionString));
3787- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND8.compizName, GINT_TO_POINTER (OptionString));
3788- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND7.compizName, GINT_TO_POINTER (OptionString));
3789- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND6.compizName, GINT_TO_POINTER (OptionString));
3790- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND5.compizName, GINT_TO_POINTER (OptionString));
3791- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND4.compizName, GINT_TO_POINTER (OptionString));
3792- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND3.compizName, GINT_TO_POINTER (OptionString));
3793- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND2.compizName, GINT_TO_POINTER (OptionString));
3794- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND1.compizName, GINT_TO_POINTER (OptionString));
3795- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND0.compizName, GINT_TO_POINTER (OptionString));
3796- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_FULLSCREEN_KEY.compizName, GINT_TO_POINTER (OptionKey));
3797- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_STICKY_KEY.compizName, GINT_TO_POINTER (OptionKey));
3798- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_PREV_KEY.compizName, GINT_TO_POINTER (OptionKey));
3799- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_NEXT_KEY.compizName, GINT_TO_POINTER (OptionKey));
3800- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_FULLSCREEN_VISUAL_BELL.compizName, GINT_TO_POINTER (OptionSpecial));
3801- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_VISUAL_BELL.compizName, GINT_TO_POINTER (OptionBool));
3802- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_RESIZE_WITH_RIGHT_BUTTON.compizName, GINT_TO_POINTER (OptionSpecial));
3803- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_MOUSE_BUTTON_MODIFIER.compizName, GINT_TO_POINTER (OptionSpecial));
3804- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_BUTTON.compizName, GINT_TO_POINTER (OptionSpecial));
3805- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_BUTTON.compizName, GINT_TO_POINTER (OptionSpecial));
3806- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_BUTTON.compizName, GINT_TO_POINTER (OptionSpecial));
3807- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_KEY.compizName, GINT_TO_POINTER (OptionKey));
3808- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_KEY.compizName, GINT_TO_POINTER (OptionKey));
3809- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_KEY.compizName, GINT_TO_POINTER (OptionKey));
3810- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_SHOW_DESKTOP_KEY.compizName, GINT_TO_POINTER (OptionKey));
3811- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_SHADED_KEY.compizName, GINT_TO_POINTER (OptionKey));
3812- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLOSE_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3813- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_LOWER_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3814- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3815- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY.compizName, GINT_TO_POINTER (OptionKey));
3816- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY.compizName, GINT_TO_POINTER (OptionKey));
3817- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3818- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3819- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MINIMIZE_WINDOW_KEY.compizName, GINT_TO_POINTER (OptionKey));
3820- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_MAXIMIZED_KEY.compizName, GINT_TO_POINTER (OptionKey));
3821- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_TERMINAL_KEY.compizName, GINT_TO_POINTER (OptionSpecial));
3822- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY.compizName, GINT_TO_POINTER (OptionSpecial));
3823- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY.compizName, GINT_TO_POINTER (OptionSpecial));
3824- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_MAIN_MENU_KEY.compizName, GINT_TO_POINTER (OptionKey));
3825- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_KEY.compizName, GINT_TO_POINTER (OptionKey));
3826-
3827- return masterHashTable;
3828-}
3829-
3830-GHashTable *
3831-ccsMATEIntegrationPopulateSettingNameToMATENameHashTables ()
3832-{
3833- GHashTable *masterHashTable = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, destroyHashTableInternal);
3834- GHashTable *coreHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3835- GHashTable *thumbnailHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3836- GHashTable *matecompatHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3837- GHashTable *rotateHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3838- GHashTable *putHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3839- GHashTable *wallHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3840- GHashTable *vpswitchHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3841- GHashTable *commandsHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3842- GHashTable *extrawmHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3843- GHashTable *resizeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3844- GHashTable *moveHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3845- GHashTable *staticswitcherHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3846- GHashTable *fadeHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3847- GHashTable *specialHashTable = g_hash_table_new (g_str_hash, g_str_equal);
3848-
3849- const CCSMATEIntegratedSettingNames *names = &ccsMATEIntegratedSettingNames;
3850- const CCSMATEIntegratedPluginNames *plugins = &ccsMATEIntegratedPluginNames;
3851-
3852- g_hash_table_insert (masterHashTable, (gpointer) plugins->CORE, coreHashTable);
3853- g_hash_table_insert (masterHashTable, (gpointer) plugins->THUMBNAIL, thumbnailHashTable);
3854- g_hash_table_insert (masterHashTable, (gpointer) plugins->MATECOMPAT, matecompatHashTable);
3855- g_hash_table_insert (masterHashTable, (gpointer) plugins->ROTATE, rotateHashTable);
3856- g_hash_table_insert (masterHashTable, (gpointer) plugins->PUT, putHashTable);
3857- g_hash_table_insert (masterHashTable, (gpointer) plugins->WALL, wallHashTable);
3858- g_hash_table_insert (masterHashTable, (gpointer) plugins->VPSWITCH, vpswitchHashTable);
3859- g_hash_table_insert (masterHashTable, (gpointer) plugins->COMMANDS, commandsHashTable);
3860- g_hash_table_insert (masterHashTable, (gpointer) plugins->EXTRAWM, extrawmHashTable);
3861- g_hash_table_insert (masterHashTable, (gpointer) plugins->STATICSWITCHER, staticswitcherHashTable);
3862- g_hash_table_insert (masterHashTable, (gpointer) plugins->FADE, fadeHashTable);
3863- g_hash_table_insert (masterHashTable, (gpointer) plugins->RESIZE, resizeHashTable);
3864- g_hash_table_insert (masterHashTable, (gpointer) plugins->MOVE, moveHashTable);
3865- g_hash_table_insert (masterHashTable, (gpointer) plugins->SPECIAL, specialHashTable);
3866-
3867- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUDIBLE_BELL.compizName, (gpointer) names->CORE_AUDIBLE_BELL.mateName);
3868- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLICK_TO_FOCUS.compizName, (gpointer) names->CORE_CLICK_TO_FOCUS.mateName);
3869- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_ON_CLICK.compizName, (gpointer) names->CORE_RAISE_ON_CLICK.mateName);
3870- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE_DELAY.compizName, (gpointer) names->CORE_AUTORAISE_DELAY.mateName);
3871- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_AUTORAISE.compizName, (gpointer) names->CORE_AUTORAISE.mateName);
3872- g_hash_table_insert (thumbnailHashTable, (gpointer) names->THUMBNAIL_CURRENT_VIEWPORT.compizName, (gpointer) names->THUMBNAIL_CURRENT_VIEWPORT.mateName);
3873- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_TERMINAL.compizName, (gpointer) names->MATECOMPAT_COMMAND_TERMINAL.mateName);
3874- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_WINDOW_SCREENSHOT.compizName, (gpointer) names->MATECOMPAT_COMMAND_WINDOW_SCREENSHOT.mateName);
3875- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_COMMAND_SCREENSHOT.compizName, (gpointer) names->MATECOMPAT_COMMAND_SCREENSHOT.mateName);
3876- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_RIGHT_WINDOW_KEY.mateName);
3877- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_LEFT_WINDOW_KEY.mateName);
3878- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_12_WINDOW_KEY.mateName);
3879- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_11_WINDOW_KEY.mateName);
3880- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_10_WINDOW_KEY.mateName);
3881- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_9_WINDOW_KEY.mateName);
3882- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_8_WINDOW_KEY.mateName);
3883- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_7_WINDOW_KEY.mateName);
3884- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_6_WINDOW_KEY.mateName);
3885- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_5_WINDOW_KEY.mateName);
3886- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_4_WINDOW_KEY.mateName);
3887- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_3_WINDOW_KEY.mateName);
3888- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_2_WINDOW_KEY.mateName);
3889- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_WINDOW_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_1_WINDOW_KEY.mateName);
3890- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOM_KEY.compizName, (gpointer) names->PUT_PUT_BOTTOM_KEY.mateName);
3891- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOP_KEY.compizName, (gpointer) names->PUT_PUT_TOP_KEY.mateName);
3892- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_RIGHT_KEY.compizName, (gpointer) names->PUT_PUT_RIGHT_KEY.mateName);
3893- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_LEFT_KEY.compizName, (gpointer) names->PUT_PUT_LEFT_KEY.mateName);
3894- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMRIGHT_KEY.compizName, (gpointer) names->PUT_PUT_BOTTOMRIGHT_KEY.mateName);
3895- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_BOTTOMLEFT_KEY.compizName, (gpointer) names->PUT_PUT_BOTTOMLEFT_KEY.mateName);
3896- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPRIGHT_KEY.compizName, (gpointer) names->PUT_PUT_TOPRIGHT_KEY.mateName);
3897- g_hash_table_insert (putHashTable, (gpointer) names->PUT_PUT_TOPLEFT_KEY.compizName, (gpointer) names->PUT_PUT_TOPLEFT_KEY.mateName);
3898- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_WINDOW_KEY.compizName, (gpointer) names->WALL_DOWN_WINDOW_KEY.mateName);
3899- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_WINDOW_KEY.compizName, (gpointer) names->WALL_UP_WINDOW_KEY.mateName);
3900- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_WINDOW_KEY.compizName, (gpointer) names->WALL_RIGHT_WINDOW_KEY.mateName);
3901- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_WINDOW_KEY.compizName, (gpointer) names->WALL_LEFT_WINDOW_KEY.mateName);
3902- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_RIGHT_KEY.compizName, (gpointer) names->WALL_RIGHT_KEY.mateName);
3903- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_LEFT_KEY.compizName, (gpointer) names->WALL_LEFT_KEY.mateName);
3904- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_DOWN_KEY.compizName, (gpointer) names->WALL_DOWN_KEY.mateName);
3905- g_hash_table_insert (wallHashTable, (gpointer) names->WALL_UP_KEY.compizName, (gpointer) names->WALL_UP_KEY.mateName);
3906- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_12_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_12_KEY.mateName);
3907- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_11_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_11_KEY.mateName);
3908- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_10_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_10_KEY.mateName);
3909- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_9_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_9_KEY.mateName);
3910- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_8_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_8_KEY.mateName);
3911- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_7_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_7_KEY.mateName);
3912- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_6_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_6_KEY.mateName);
3913- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_5_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_5_KEY.mateName);
3914- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_4_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_4_KEY.mateName);
3915- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_3_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_3_KEY.mateName);
3916- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_2_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_2_KEY.mateName);
3917- g_hash_table_insert (vpswitchHashTable, (gpointer) names->VPSWITCH_SWITCH_TO_1_KEY.compizName, (gpointer) names->VPSWITCH_SWITCH_TO_1_KEY.mateName);
3918- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_RIGHT_KEY.compizName, (gpointer) names->ROTATE_ROTATE_RIGHT_KEY.mateName);
3919- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_LEFT_KEY.compizName, (gpointer) names->ROTATE_ROTATE_LEFT_KEY.mateName);
3920- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_12_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_12_KEY.mateName);
3921- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_11_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_11_KEY.mateName);
3922- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_10_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_10_KEY.mateName);
3923- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_9_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_9_KEY.mateName);
3924- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_8_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_8_KEY.mateName);
3925- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_7_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_7_KEY.mateName);
3926- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_6_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_6_KEY.mateName);
3927- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_5_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_5_KEY.mateName);
3928- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_4_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_4_KEY.mateName);
3929- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_3_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_3_KEY.mateName);
3930- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_2_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_2_KEY.mateName);
3931- g_hash_table_insert (rotateHashTable, (gpointer) names->ROTATE_ROTATE_TO_1_KEY.compizName, (gpointer) names->ROTATE_ROTATE_TO_1_KEY.mateName);
3932- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND11_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND11_KEY.mateName);
3933- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND10_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND10_KEY.mateName);
3934- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND9_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND9_KEY.mateName);
3935- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND8_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND8_KEY.mateName);
3936- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND7_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND7_KEY.mateName);
3937- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND6_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND6_KEY.mateName);
3938- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND5_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND5_KEY.mateName);
3939- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND4_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND4_KEY.mateName);
3940- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND3_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND3_KEY.mateName);
3941- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND2_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND2_KEY.mateName);
3942- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND1_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND1_KEY.mateName);
3943- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_RUN_COMMAND0_KEY.compizName, (gpointer) names->COMMANDS_RUN_COMMAND0_KEY.mateName);
3944- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND11.compizName, (gpointer) names->COMMANDS_COMMAND11.mateName);
3945- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND10.compizName, (gpointer) names->COMMANDS_COMMAND10.mateName);
3946- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND9.compizName, (gpointer) names->COMMANDS_COMMAND9.mateName);
3947- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND8.compizName, (gpointer) names->COMMANDS_COMMAND8.mateName);
3948- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND7.compizName, (gpointer) names->COMMANDS_COMMAND7.mateName);
3949- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND6.compizName, (gpointer) names->COMMANDS_COMMAND6.mateName);
3950- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND5.compizName, (gpointer) names->COMMANDS_COMMAND5.mateName);
3951- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND4.compizName, (gpointer) names->COMMANDS_COMMAND4.mateName);
3952- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND3.compizName, (gpointer) names->COMMANDS_COMMAND3.mateName);
3953- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND2.compizName, (gpointer) names->COMMANDS_COMMAND2.mateName);
3954- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND1.compizName, (gpointer) names->COMMANDS_COMMAND1.mateName);
3955- g_hash_table_insert (commandsHashTable, (gpointer) names->COMMANDS_COMMAND0.compizName, (gpointer) names->COMMANDS_COMMAND0.mateName);
3956- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_FULLSCREEN_KEY.compizName, (gpointer) names->EXTRAWM_TOGGLE_FULLSCREEN_KEY.mateName);
3957- g_hash_table_insert (extrawmHashTable, (gpointer) names->EXTRAWM_TOGGLE_STICKY_KEY.compizName, (gpointer) names->EXTRAWM_TOGGLE_STICKY_KEY.mateName);
3958- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_PREV_KEY.compizName, (gpointer) names->STATICSWITCHER_PREV_KEY.mateName);
3959- g_hash_table_insert (staticswitcherHashTable, (gpointer) names->STATICSWITCHER_NEXT_KEY.compizName, (gpointer) names->STATICSWITCHER_NEXT_KEY.mateName);
3960- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_FULLSCREEN_VISUAL_BELL.compizName, (gpointer) names->FADE_FULLSCREEN_VISUAL_BELL.mateName);
3961- g_hash_table_insert (fadeHashTable, (gpointer) names->FADE_VISUAL_BELL.compizName, (gpointer) names->FADE_VISUAL_BELL.mateName);
3962- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_RESIZE_WITH_RIGHT_BUTTON.compizName, (gpointer) names->NULL_RESIZE_WITH_RIGHT_BUTTON.mateName);
3963- g_hash_table_insert (specialHashTable, (gpointer) names->NULL_MOUSE_BUTTON_MODIFIER.compizName, (gpointer) names->NULL_MOUSE_BUTTON_MODIFIER.mateName);
3964- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_BUTTON.compizName, (gpointer) names->CORE_WINDOW_MENU_BUTTON.mateName);
3965- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_BUTTON.compizName, (gpointer) names->RESIZE_INITIATE_BUTTON.mateName);
3966- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_BUTTON.compizName, (gpointer) names->MOVE_INITIATE_BUTTON.mateName);
3967- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_WINDOW_MENU_KEY.compizName, (gpointer) names->CORE_WINDOW_MENU_KEY.mateName);
3968- g_hash_table_insert (resizeHashTable, (gpointer) names->RESIZE_INITIATE_KEY.compizName, (gpointer) names->RESIZE_INITIATE_KEY.mateName);
3969- g_hash_table_insert (moveHashTable, (gpointer) names->MOVE_INITIATE_KEY.compizName, (gpointer) names->MOVE_INITIATE_KEY.mateName);
3970- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_SHOW_DESKTOP_KEY.compizName, (gpointer) names->CORE_SHOW_DESKTOP_KEY.mateName);
3971- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_SHADED_KEY.compizName, (gpointer) names->CORE_TOGGLE_WINDOW_SHADED_KEY.mateName);
3972- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_CLOSE_WINDOW_KEY.compizName, (gpointer) names->CORE_CLOSE_WINDOW_KEY.mateName);
3973- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_LOWER_WINDOW_KEY.compizName, (gpointer) names->CORE_LOWER_WINDOW_KEY.mateName);
3974- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_RAISE_WINDOW_KEY.compizName, (gpointer) names->CORE_RAISE_WINDOW_KEY.mateName);
3975- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY.compizName, (gpointer) names->CORE_MAXIMIZE_WINDOW_VERTICALLY_KEY.mateName);
3976- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY.compizName, (gpointer) names->CORE_MAXIMIZE_WINDOW_HORIZONTALLY_KEY.mateName);
3977- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY.compizName, (gpointer) names->CORE_UNMAXIMIZE_OR_MINIMIZE_WINDOW_KEY.mateName);
3978- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MAXIMIZE_WINDOW_KEY.compizName, (gpointer) names->CORE_MAXIMIZE_WINDOW_KEY.mateName);
3979- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_MINIMIZE_WINDOW_KEY.compizName, (gpointer) names->CORE_MINIMIZE_WINDOW_KEY.mateName);
3980- g_hash_table_insert (coreHashTable, (gpointer) names->CORE_TOGGLE_WINDOW_MAXIMIZED_KEY.compizName, (gpointer) names->CORE_TOGGLE_WINDOW_MAXIMIZED_KEY.mateName);
3981- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_TERMINAL_KEY.compizName, (gpointer) names->MATECOMPAT_RUN_COMMAND_TERMINAL_KEY.mateName);
3982- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY.compizName, (gpointer) names->MATECOMPAT_RUN_COMMAND_WINDOW_SCREENSHOT_KEY.mateName);
3983- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY.compizName, (gpointer) names->MATECOMPAT_RUN_COMMAND_SCREENSHOT_KEY.mateName);
3984- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_MAIN_MENU_KEY.compizName, (gpointer) names->MATECOMPAT_MAIN_MENU_KEY.mateName);
3985- g_hash_table_insert (matecompatHashTable, (gpointer) names->MATECOMPAT_RUN_KEY.compizName, (gpointer) names->MATECOMPAT_RUN_KEY.mateName);
3986-
3987- return masterHashTable;
3988-}
3989
3990=== removed directory 'compizconfig/integration/mate/tests'
3991=== removed file 'compizconfig/integration/mate/tests/CMakeLists.txt'
3992--- compizconfig/integration/mate/tests/CMakeLists.txt 2015-07-30 19:56:19 +0000
3993+++ compizconfig/integration/mate/tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
3994@@ -1,46 +0,0 @@
3995-include_directories (${GTEST_INCLUDE_DIRS})
3996-include_directories (${CMAKE_SOURCE_DIR}/include)
3997-include_directories (${CMAKE_SOURCE_DIR}/tests/shared)
3998-include_directories (${CMAKE_SOURCE_DIR}/tests/shared/glib)
3999-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../../mocks/libcompizconfig)
4000-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../../gsettings/tests)
4001-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../../gsettings/mocks)
4002-include_directories (${CMAKE_SOURCE_DIR}/compizconfig/tests)
4003-link_directories (${CMAKE_INSTALL_PREFIX}/lib)
4004-
4005-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
4006-
4007-add_library (compizconfig_ccs_mock_mate_integrated_setting_composition
4008- ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_mock_mate_integrated_setting_composition.c)
4009-
4010-target_link_libraries (compizconfig_ccs_mock_mate_integrated_setting_composition
4011- compizconfig_ccs_integrated_setting_mock
4012- compizconfig_mate_integrated_setting
4013- compizconfig)
4014-
4015-add_executable (compizconfig_test_ccs_mate_integration
4016- ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_mate_integration.cpp)
4017-
4018-target_link_libraries (compizconfig_test_ccs_mate_integration
4019- ${GTEST_BOTH_LIBRARIES}
4020- ${GMOCK_LIBRARY}
4021- ${GMOCK_MAIN_LIBRARY}
4022- ${LIBCOMPIZCONFIG_LIBRARIES}
4023- compizconfig
4024- compizconfig_ccs_context_mock
4025- compizconfig_ccs_backend_mock
4026- compizconfig_ccs_setting_mock
4027- compizconfig_ccs_plugin_mock
4028- compizconfig_ccs_list_wrapper
4029- compizconfig_ccs_setting_value_operators
4030- compizconfig_ccs_setting_value_matcher
4031- compizconfig_ccs_integrated_setting_mock
4032- compizconfig_ccs_integrated_setting_factory_mock
4033- compizconfig_ccs_integrated_setting_storage_mock
4034- compizconfig_ccs_mock_mate_integrated_setting_composition
4035- compizconfig_mate_integration)
4036-
4037-compiz_discover_tests (compizconfig_test_ccs_mate_integration
4038- COVERAGE
4039- compizconfig_mate_integration
4040- compizconfig_mate_integration_constants)
4041
4042=== removed file 'compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.c'
4043--- compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.c 2015-02-04 22:20:18 +0000
4044+++ compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.c 1970-01-01 00:00:00 +0000
4045@@ -1,220 +0,0 @@
4046-/*
4047- * Compiz configuration system library
4048- *
4049- * Copyright (C) 2012 Canonical Ltd.
4050- *
4051- * This library is free software; you can redistribute it and/or
4052- * modify it under the terms of the GNU Lesser General Public
4053- * License as published by the Free Software Foundation; either
4054- * version 2.1 of the License, or (at your option) any later version.
4055-
4056- * This library is distributed in the hope that it will be useful,
4057- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4058- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4059- * Lesser General Public License for more details.
4060-
4061- * You should have received a copy of the GNU Lesser General Public
4062- * License along with this library; if not, write to the Free Software
4063- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4064- *
4065- * Authored By:
4066- * Sam Spilsbury <sam.spilsbury@canonical.com>
4067- */
4068-
4069-#include <ccs.h>
4070-#include <ccs-backend.h>
4071-#include <ccs_mate_integrated_setting.h>
4072-#include "compizconfig_ccs_mock_mate_integrated_setting_composition.h"
4073-
4074-typedef struct _CCSMockMATEIntegratedSettingCompositionPrivate
4075-{
4076- CCSIntegratedSetting *integratedSetting;
4077- CCSMATEIntegratedSettingInfo *mateIntegratedSettingInfo;
4078- CCSIntegratedSettingInfo *integratedSettingInfo;
4079-} CCSMockMATEIntegratedSettingCompositionPrivate;
4080-
4081-static CCSIntegratedSetting *
4082-allocateCCSIntegratedSetting (CCSObjectAllocationInterface *allocator)
4083-{
4084- CCSIntegratedSetting *setting =
4085- (*allocator->calloc_) (allocator->allocator,
4086- 1,
4087- sizeof (CCSIntegratedSetting));
4088-
4089- ccsObjectInit (setting, allocator);
4090-
4091- return setting;
4092-}
4093-
4094-static CCSMockMATEIntegratedSettingCompositionPrivate *
4095-allocatePrivate (CCSIntegratedSetting *integratedSetting,
4096- CCSObjectAllocationInterface *allocator)
4097-{
4098- CCSMockMATEIntegratedSettingCompositionPrivate *priv =
4099- (*allocator->calloc_) (allocator->allocator,
4100- 1,
4101- sizeof (CCSMockMATEIntegratedSettingCompositionPrivate));
4102-
4103- if (!priv)
4104- {
4105- ccsObjectFinalize (integratedSetting);
4106- (*allocator->free_) (allocator->allocator, integratedSetting);
4107- return NULL;
4108- }
4109-
4110- return priv;
4111-}
4112-
4113-static SpecialOptionType
4114-ccsMockCompositionIntegratedSettingGetSpecialOptionType (CCSMATEIntegratedSettingInfo *setting)
4115-{
4116- CCSMockMATEIntegratedSettingCompositionPrivate *priv = GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4117-
4118- return ccsMATEIntegratedSettingInfoGetSpecialOptionType (priv->mateIntegratedSettingInfo);
4119-}
4120-
4121-static const char *
4122-ccsMockCompositionIntegratedSettingGetMATEName (CCSMATEIntegratedSettingInfo *setting)
4123-{
4124- CCSMockMATEIntegratedSettingCompositionPrivate *priv = GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4125-
4126- return ccsMATEIntegratedSettingInfoGetMATEName (priv->mateIntegratedSettingInfo);
4127-}
4128-
4129-static CCSSettingValue *
4130-ccsMockCompositionIntegratedSettingReadValue (CCSIntegratedSetting *setting, CCSSettingType type)
4131-{
4132- CCSMockMATEIntegratedSettingCompositionPrivate *priv =
4133- GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4134-
4135- return ccsIntegratedSettingReadValue (priv->integratedSetting, type);
4136-}
4137-
4138-static void
4139-ccsMockCompositionIntegratedSettingWriteValue (CCSIntegratedSetting *setting, CCSSettingValue *v, CCSSettingType type)
4140-{
4141- CCSMockMATEIntegratedSettingCompositionPrivate *priv =
4142- GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4143-
4144- ccsIntegratedSettingWriteValue (priv->integratedSetting, v, type);
4145-}
4146-
4147-static const char *
4148-ccsMockCompositionIntegratedSettingInfoPluginName (CCSIntegratedSettingInfo *setting)
4149-{
4150- CCSMockMATEIntegratedSettingCompositionPrivate *priv = GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4151-
4152- return ccsIntegratedSettingInfoPluginName (priv->integratedSettingInfo);
4153-}
4154-
4155-static const char *
4156-ccsMockCompositionIntegratedSettingInfoSettingName (CCSIntegratedSettingInfo *setting)
4157-{
4158- CCSMockMATEIntegratedSettingCompositionPrivate *priv = GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4159-
4160- return ccsIntegratedSettingInfoSettingName (priv->integratedSettingInfo);
4161-}
4162-
4163-static CCSSettingType
4164-ccsMockCompositionIntegratedSettingInfoGetType (CCSIntegratedSettingInfo *setting)
4165-{
4166- CCSMockMATEIntegratedSettingCompositionPrivate *priv = GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, setting);
4167-
4168- return ccsIntegratedSettingInfoGetType (priv->integratedSettingInfo);
4169-}
4170-
4171-static void
4172-ccsMockCompositionIntegratedSettingFree (CCSIntegratedSetting *integratedSetting)
4173-{
4174- CCSMockMATEIntegratedSettingCompositionPrivate *priv =
4175- GET_PRIVATE (CCSMockMATEIntegratedSettingCompositionPrivate, integratedSetting);
4176-
4177- ccsIntegratedSettingUnref (priv->integratedSetting);
4178- ccsMATEIntegratedSettingInfoUnref (priv->mateIntegratedSettingInfo);
4179-
4180- ccsObjectFinalize (integratedSetting);
4181- (*integratedSetting->object.object_allocation->free_)
4182- (integratedSetting->object.object_allocation->allocator, integratedSetting);
4183-}
4184-
4185-static void
4186-ccsMockCompositionIntegratedSettingInfoFree (CCSIntegratedSettingInfo *info)
4187-{
4188- return ccsMockCompositionIntegratedSettingFree ((CCSIntegratedSetting *) info);
4189-}
4190-
4191-static void
4192-ccsMockCompositionMATEIntegratedSettingInfoFree (CCSMATEIntegratedSettingInfo *info)
4193-{
4194- return ccsMockCompositionIntegratedSettingFree ((CCSIntegratedSetting *) info);
4195-}
4196-
4197-const CCSMATEIntegratedSettingInfoInterface ccsMockCompositionMATEIntegratedSettingInfo =
4198-{
4199- ccsMockCompositionIntegratedSettingGetSpecialOptionType,
4200- ccsMockCompositionIntegratedSettingGetMATEName,
4201- ccsMockCompositionMATEIntegratedSettingInfoFree
4202-};
4203-
4204-const CCSIntegratedSettingInterface ccsMockCompositionIntegratedSetting =
4205-{
4206- ccsMockCompositionIntegratedSettingReadValue,
4207- ccsMockCompositionIntegratedSettingWriteValue,
4208- ccsMockCompositionIntegratedSettingFree
4209-};
4210-
4211-const CCSIntegratedSettingInfoInterface ccsMockCompositionIntegratedSettingInfo =
4212-{
4213- ccsMockCompositionIntegratedSettingInfoPluginName,
4214- ccsMockCompositionIntegratedSettingInfoSettingName,
4215- ccsMockCompositionIntegratedSettingInfoGetType,
4216- ccsMockCompositionIntegratedSettingInfoFree
4217-};
4218-
4219-CCSIntegratedSetting *
4220-ccsMockCompositionIntegratedSettingNew (CCSIntegratedSetting *integratedSetting,
4221- CCSMATEIntegratedSettingInfo *mateInfo,
4222- CCSIntegratedSettingInfo *settingInfo,
4223- CCSObjectAllocationInterface *allocator)
4224-{
4225- CCSIntegratedSetting *composition = allocateCCSIntegratedSetting (allocator);
4226-
4227- if (!composition)
4228- return NULL;
4229-
4230- CCSMockMATEIntegratedSettingCompositionPrivate *priv = allocatePrivate (composition,
4231- allocator);
4232-
4233- if (!priv)
4234- return NULL;
4235-
4236- const CCSInterface *integratedSettingImpl =
4237- (const CCSInterface *) (&ccsMockCompositionIntegratedSetting);
4238- const CCSInterface *integratedSettingInfoImpl =
4239- (const CCSInterface *) (&ccsMockCompositionIntegratedSettingInfo);
4240- const CCSInterface *mateSettingImpl =
4241- (const CCSInterface *) (&ccsMockCompositionMATEIntegratedSettingInfo);
4242-
4243- priv->integratedSetting = integratedSetting;
4244- priv->mateIntegratedSettingInfo = mateInfo;
4245- priv->integratedSettingInfo = settingInfo;
4246-
4247- ccsIntegratedSettingRef (priv->integratedSetting);
4248- ccsMATEIntegratedSettingInfoRef (priv->mateIntegratedSettingInfo);
4249-
4250- ccsObjectSetPrivate (composition, (CCSPrivate *) (priv));
4251- ccsObjectAddInterface (composition,
4252- integratedSettingImpl,
4253- GET_INTERFACE_TYPE (CCSIntegratedSettingInterface));
4254- ccsObjectAddInterface (composition,
4255- integratedSettingInfoImpl,
4256- GET_INTERFACE_TYPE (CCSIntegratedSettingInfoInterface));
4257- ccsObjectAddInterface (composition,
4258- mateSettingImpl,
4259- GET_INTERFACE_TYPE (CCSMATEIntegratedSettingInfoInterface));
4260-
4261- ccsObjectRef (composition);
4262-
4263- return composition;
4264-}
4265-
4266
4267=== removed file 'compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.h'
4268--- compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.h 2015-02-04 22:20:18 +0000
4269+++ compizconfig/integration/mate/tests/compizconfig_ccs_mock_mate_integrated_setting_composition.h 1970-01-01 00:00:00 +0000
4270@@ -1,41 +0,0 @@
4271-/*
4272- * Compiz configuration system library
4273- *
4274- * Copyright (C) 2012 Canonical Ltd.
4275- *
4276- * This library is free software; you can redistribute it and/or
4277- * modify it under the terms of the GNU Lesser General Public
4278- * License as published by the Free Software Foundation; either
4279- * version 2.1 of the License, or (at your option) any later version.
4280-
4281- * This library is distributed in the hope that it will be useful,
4282- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4283- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4284- * Lesser General Public License for more details.
4285-
4286- * You should have received a copy of the GNU Lesser General Public
4287- * License along with this library; if not, write to the Free Software
4288- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4289- *
4290- * Authored By:
4291- * Sam Spilsbury <sam.spilsbury@canonical.com>
4292- */
4293-#ifndef _COMPIZCONFIG_CCS_MOCK_MATE_INTEGRATED_SETTING_COMPOSITION_H
4294-#define _COMPIZCONFIG_CCS_MOCK_MATE_INTEGRATED_SETTING_COMPOSITION_H
4295-
4296-#include <ccs-defs.h>
4297-#include <ccs-fwd.h>
4298-#include <ccs_mate_fwd.h>
4299-
4300-COMPIZCONFIG_BEGIN_DECLS
4301-
4302-CCSIntegratedSetting *
4303-ccsMockCompositionIntegratedSettingNew (CCSIntegratedSetting *integratedSetting,
4304- CCSMATEIntegratedSettingInfo *mateInfo,
4305- CCSIntegratedSettingInfo *settingInfo,
4306- CCSObjectAllocationInterface *allocator);
4307-
4308-COMPIZCONFIG_END_DECLS
4309-
4310-#endif
4311-
4312
4313=== removed file 'compizconfig/integration/mate/tests/compizconfig_test_ccs_mate_integration.cpp'
4314--- compizconfig/integration/mate/tests/compizconfig_test_ccs_mate_integration.cpp 2015-02-04 22:20:18 +0000
4315+++ compizconfig/integration/mate/tests/compizconfig_test_ccs_mate_integration.cpp 1970-01-01 00:00:00 +0000
4316@@ -1,981 +0,0 @@
4317-/*
4318- * Compiz configuration system library
4319- *
4320- * Copyright (C) 2012 Canonical Ltd.
4321- *
4322- * This library is free software; you can redistribute it and/or
4323- * modify it under the terms of the GNU Lesser General Public
4324- * License as published by the Free Software Foundation; either
4325- * version 2.1 of the License, or (at your option) any later version.
4326-
4327- * This library is distributed in the hope that it will be useful,
4328- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4329- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4330- * Lesser General Public License for more details.
4331-
4332- * You should have received a copy of the GNU Lesser General Public
4333- * License along with this library; if not, write to the Free Software
4334- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4335- *
4336- * Authored By:
4337- * Sam Spilsbury <sam.spilsbury@canonical.com>
4338- */
4339-#include <tr1/tuple>
4340-
4341-#include <gtest/gtest.h>
4342-#include <gmock/gmock.h>
4343-
4344-#include <boost/shared_ptr.hpp>
4345-#include <boost/make_shared.hpp>
4346-
4347-#include <gtest_shared_autodestroy.h>
4348-#include <gtest_unspecified_bool_type_matcher.h>
4349-
4350-#include <compizconfig_ccs_list_wrapper.h>
4351-#include <compizconfig_ccs_setting_value_operators.h>
4352-
4353-#include <ccs.h>
4354-#include <ccs-backend.h>
4355-#include <ccs_mate_integrated_setting.h>
4356-#include <ccs_mate_integration.h>
4357-#include <ccs_mate_integration_constants.h>
4358-#include <compizconfig_ccs_context_mock.h>
4359-#include <compizconfig_ccs_setting_mock.h>
4360-#include <compizconfig_ccs_plugin_mock.h>
4361-#include <compizconfig_ccs_backend_mock.h>
4362-#include <compizconfig_ccs_integrated_setting_factory_mock.h>
4363-#include <compizconfig_ccs_integrated_setting_storage_mock.h>
4364-#include <compizconfig_ccs_integrated_setting_mock.h>
4365-#include "compizconfig_ccs_mock_mate_integrated_setting_composition.h"
4366-#include "compizconfig_ccs_setting_value_matcher.h"
4367-
4368-namespace cc = compiz::config;
4369-namespace cci = compiz::config::impl;
4370-
4371-using ::testing::Pointee;
4372-using ::testing::Eq;
4373-using ::testing::Return;
4374-using ::testing::ReturnNull;
4375-using ::testing::SetArgPointee;
4376-using ::testing::DoAll;
4377-using ::testing::Values;
4378-using ::testing::WithParamInterface;
4379-using ::testing::_;
4380-
4381-namespace
4382-{
4383- typedef std::tr1::tuple <CCSIntegratedSettingGMock &,
4384- boost::shared_ptr <CCSIntegratedSetting> > IntegratedSettingWithMock;
4385-
4386- typedef boost::shared_ptr <IntegratedSettingWithMock> IntegratedSettingWithMockPtr;
4387-
4388- IntegratedSettingWithMockPtr
4389- createIntegratedSettingCompositionFromMock (const std::string &plugin,
4390- const std::string &setting,
4391- CCSSettingType type,
4392- SpecialOptionType mateType,
4393- const std::string &mateName,
4394- CCSObjectAllocationInterface *allocator)
4395- {
4396- CCSIntegratedSettingInfo *integratedSettingInfo =
4397- ccsSharedIntegratedSettingInfoNew (plugin.c_str (),
4398- setting.c_str (),
4399- type,
4400- allocator);
4401- /* This takes ownership of integratedSettingInfo */
4402- CCSMATEIntegratedSettingInfo *mateIntegratedSettingInfo =
4403- ccsMATEIntegratedSettingInfoNew (integratedSettingInfo,
4404- mateType,
4405- mateName.c_str (),
4406- allocator);
4407- CCSIntegratedSetting *integratedSetting =
4408- ccsMockIntegratedSettingNew (allocator);
4409-
4410- CCSIntegratedSettingGMock *mockPtr = GET_PRIVATE (CCSIntegratedSettingGMock, integratedSetting)
4411- CCSIntegratedSettingGMock &mock (*mockPtr);
4412-
4413- boost::shared_ptr <CCSIntegratedSetting> composition =
4414- AutoDestroy (ccsMockCompositionIntegratedSettingNew (integratedSetting,
4415- mateIntegratedSettingInfo,
4416- integratedSettingInfo,
4417- allocator),
4418- ccsIntegratedSettingUnref);
4419-
4420- /* We want the composition to take ownership here, so unref the
4421- * original members of the composition */
4422- ccsMATEIntegratedSettingInfoUnref (mateIntegratedSettingInfo);
4423- ccsIntegratedSettingUnref (integratedSetting);
4424-
4425- return boost::make_shared <IntegratedSettingWithMock> (mock, composition);
4426- }
4427-
4428- CCSIntegratedSettingGMock &
4429- Mock (IntegratedSettingWithMock &integratedSettingWithMocks)
4430- {
4431- return std::tr1::get <0> (integratedSettingWithMocks);
4432- }
4433-
4434- CCSIntegratedSetting *
4435- Real (IntegratedSettingWithMock &integratedSettingWithMocks)
4436- {
4437- return std::tr1::get <1> (integratedSettingWithMocks).get ();
4438- }
4439-
4440- typedef std::tr1::tuple <CCSContextGMock &,
4441- CCSBackendGMock &,
4442- CCSIntegratedSettingsStorageGMock &,
4443- CCSIntegratedSettingFactoryGMock &,
4444- boost::shared_ptr <CCSContext> ,
4445- boost::shared_ptr <CCSBackend> ,
4446- CCSIntegratedSettingsStorage *,
4447- CCSIntegratedSettingFactory *,
4448- boost::shared_ptr <CCSIntegration> > CCSMATEIntegrationWithMocks;
4449-
4450- CCSMATEIntegrationWithMocks
4451- createIntegrationWithMocks (CCSObjectAllocationInterface *ai)
4452- {
4453- boost::shared_ptr <CCSContext> context (AutoDestroy (ccsMockContextNew (),
4454- ccsFreeContext));
4455- boost::shared_ptr <CCSBackend> backend (AutoDestroy (ccsMockBackendNew (),
4456- ccsFreeMockBackend));
4457- /* The MATE Integration backend takes ownership of these two */
4458- CCSIntegratedSettingsStorage *storage (ccsMockIntegratedSettingsStorageNew (ai));
4459- CCSIntegratedSettingFactory *factory (ccsMockIntegratedSettingFactoryNew (ai));
4460- boost::shared_ptr <CCSIntegration> integration (AutoDestroy (ccsMATEIntegrationBackendNew (backend.get (),
4461- context.get (),
4462- factory,
4463- storage,
4464- ai),
4465- ccsIntegrationUnref));
4466-
4467- CCSContextGMock &gmockContext = *(reinterpret_cast <CCSContextGMock *> (ccsObjectGetPrivate (context.get ())));
4468- CCSBackendGMock &gmockBackend = *(reinterpret_cast <CCSBackendGMock *> (ccsObjectGetPrivate (backend.get ())));
4469- CCSIntegratedSettingsStorageGMock &gmockStorage = *(reinterpret_cast <CCSIntegratedSettingsStorageGMock *> (ccsObjectGetPrivate (storage)));
4470- CCSIntegratedSettingFactoryGMock &gmockFactory = *(reinterpret_cast <CCSIntegratedSettingFactoryGMock *> (ccsObjectGetPrivate (factory)));
4471-
4472- return CCSMATEIntegrationWithMocks (gmockContext,
4473- gmockBackend,
4474- gmockStorage,
4475- gmockFactory,
4476- context,
4477- backend,
4478- storage,
4479- factory,
4480- integration);
4481- }
4482-
4483- CCSIntegration *
4484- Real (CCSMATEIntegrationWithMocks &integrationWithMocks)
4485- {
4486- return std::tr1::get <8> (integrationWithMocks).get ();
4487- }
4488-
4489- CCSContextGMock &
4490- MockContext (CCSMATEIntegrationWithMocks &integrationWithMocks)
4491- {
4492- return std::tr1::get <0> (integrationWithMocks);
4493- }
4494-
4495- CCSIntegratedSettingsStorageGMock &
4496- MockStorage (CCSMATEIntegrationWithMocks &integrationWithMocks)
4497- {
4498- return std::tr1::get <2> (integrationWithMocks);
4499- }
4500-
4501- void
4502- IgnoreRegistration (CCSIntegratedSettingsStorageGMock &storage)
4503- {
4504- EXPECT_CALL (storage, empty ()).WillOnce (Return (FALSE));
4505- }
4506-
4507- void
4508- AllowReadability (CCSSettingGMock &setting)
4509- {
4510- EXPECT_CALL (setting, isReadableByBackend ()).WillOnce (Return (TRUE));
4511- }
4512-
4513- void
4514- ExpectWriteSettings (CCSContextGMock &context)
4515- {
4516- EXPECT_CALL (context, writeChangedSettings ());
4517- }
4518-
4519- void
4520- SetNames (CCSSettingGMock &setting,
4521- CCSPluginGMock &plugin,
4522- const std::string &settingName,
4523- const std::string &pluginName)
4524- {
4525- EXPECT_CALL (setting, getName ()).WillOnce (Return (settingName.c_str ()));
4526- EXPECT_CALL (setting, getParent ());
4527- EXPECT_CALL (plugin, getName ()).WillOnce (Return (pluginName.c_str ()));
4528- }
4529-
4530- void
4531- SetTypeInfo (CCSSettingGMock &setting,
4532- CCSSettingType type,
4533- CCSSettingInfo *info)
4534- {
4535- EXPECT_CALL (setting, getType ()).WillOnce (Return (type));
4536- EXPECT_CALL (setting, getInfo ()).WillOnce (Return (info));
4537- }
4538-
4539- CCSSettingValue *
4540- MakeSettingValue ()
4541- {
4542- CCSSettingValue *v = reinterpret_cast <CCSSettingValue *> (calloc (1, sizeof (CCSSettingValue)));
4543- v->parent = NULL;
4544- v->isListChild = FALSE;
4545- v->refCount = 1;
4546-
4547- return v;
4548- }
4549-
4550- boost::shared_ptr <CCSSettingValue>
4551- MakeAutoDestroySettingValue (CCSSettingType type)
4552- {
4553- CCSSettingValue *v = reinterpret_cast <CCSSettingValue *> (calloc (1, sizeof (CCSSettingValue)));
4554- v->parent = NULL;
4555- v->isListChild = FALSE;
4556- v->refCount = 1;
4557-
4558- return boost::shared_ptr <CCSSettingValue> (v,
4559- boost::bind (ccsFreeSettingValueWithType, _1, type));
4560- }
4561-
4562- const std::string MOCK_PLUGIN ("mock");
4563- const std::string MOCK_SETTING ("mock");
4564- const std::string MOCK_MATE_NAME ("mock");
4565- const CCSSettingType MOCK_SETTING_TYPE = TypeInt;
4566- const SpecialOptionType MOCK_MATE_SETTING_TYPE = OptionInt;
4567-}
4568-
4569-TEST (CCSMATEIntegrationTest, TestConstructComposition)
4570-{
4571- IntegratedSettingWithMockPtr settingWithMock (
4572- createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4573- MOCK_SETTING,
4574- MOCK_SETTING_TYPE,
4575- MOCK_MATE_SETTING_TYPE,
4576- MOCK_MATE_NAME,
4577- &ccsDefaultObjectAllocator));
4578-}
4579-
4580-class CCSMATEIntegrationTestWithMocks :
4581- public ::testing::Test
4582-{
4583- public:
4584-
4585- CCSMATEIntegrationTestWithMocks () :
4586- mIntegration (createIntegrationWithMocks (&ccsDefaultObjectAllocator)),
4587- mSetting (AutoDestroy (ccsMockSettingNew (),
4588- ccsSettingUnref)),
4589- mSettingMock ((*(reinterpret_cast <CCSSettingGMock *> (ccsObjectGetPrivate (mSetting.get ()))))),
4590- mIntegratedSetting (),
4591- mPlugin (AutoDestroy (ccsMockPluginNew (),
4592- ccsPluginUnref)),
4593- mPluginMock ((*(reinterpret_cast <CCSPluginGMock *> (ccsObjectGetPrivate (mPlugin.get ())))))
4594- {
4595- ON_CALL (mSettingMock, getParent ()).WillByDefault (Return (mPlugin.get ()));
4596- }
4597-
4598- protected:
4599-
4600- CCSMATEIntegrationWithMocks mIntegration;
4601- boost::shared_ptr <CCSSetting> mSetting;
4602- CCSSettingGMock &mSettingMock;
4603- IntegratedSettingWithMockPtr mIntegratedSetting;
4604- boost::shared_ptr <CCSPlugin> mPlugin;
4605- CCSPluginGMock &mPluginMock;
4606-};
4607-
4608-class CCSMATEIntegrationTestReadIntegrated :
4609- public CCSMATEIntegrationTestWithMocks
4610-{
4611- public:
4612-
4613- virtual void SetUp ()
4614- {
4615- IgnoreRegistration (MockStorage (mIntegration));
4616- AllowReadability (mSettingMock);
4617- }
4618-};
4619-
4620-class CCSMATEIntegrationTestWriteIntegrated :
4621- public CCSMATEIntegrationTestWithMocks
4622-{
4623- public:
4624-
4625- virtual void SetUp ()
4626- {
4627- IgnoreRegistration (MockStorage (mIntegration));
4628- ExpectWriteSettings (MockContext (mIntegration));
4629- }
4630-};
4631-
4632-TEST_F (CCSMATEIntegrationTestWithMocks, TestConstructMATEIntegration)
4633-{
4634-}
4635-
4636-TEST_F (CCSMATEIntegrationTestWithMocks, TestGetIntegratedSettingFromStorage)
4637-{
4638- mIntegratedSetting = createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4639- MOCK_SETTING,
4640- TypeBool,
4641- OptionSpecial,
4642- MOCK_MATE_NAME,
4643- &ccsDefaultObjectAllocator);
4644-
4645- CCSIntegratedSettingList returnIntegratedSettings =
4646- ccsIntegratedSettingListAppend (NULL, Real (*mIntegratedSetting));
4647- CCSIntegratedSettingsStorageGMock &mockStorage (MockStorage (mIntegration));
4648-
4649- EXPECT_CALL (mockStorage, empty ()).WillOnce (Return (FALSE));
4650- EXPECT_CALL (mockStorage, findMatchingSettingsByPluginAndSettingName (Eq (MOCK_PLUGIN),
4651- Eq (MOCK_SETTING)))
4652- .WillOnce (Return (returnIntegratedSettings));
4653-
4654- EXPECT_EQ (Real (*mIntegratedSetting),
4655- ccsIntegrationGetIntegratedSetting (Real (mIntegration),
4656- MOCK_PLUGIN.c_str (),
4657- MOCK_SETTING.c_str ()));
4658-}
4659-
4660-TEST_F (CCSMATEIntegrationTestReadIntegrated, TestReadInKeyOption)
4661-{
4662- CCSSettingValue *v = MakeSettingValue ();
4663- v->value.asString = strdup ("<Control>a");
4664-
4665- mIntegratedSetting = createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4666- MOCK_SETTING,
4667- TypeKey,
4668- OptionKey,
4669- MOCK_MATE_NAME,
4670- &ccsDefaultObjectAllocator);
4671-
4672- CCSSettingKeyValue keyValue;
4673- ASSERT_TRUE (ccsStringToKeyBinding (v->value.asString, &keyValue));
4674- EXPECT_CALL (Mock (*mIntegratedSetting), readValue (TypeKey)).WillOnce (Return (v));
4675- EXPECT_CALL (mSettingMock, setKey (Eq (keyValue), IsTrue ()));
4676-
4677- EXPECT_THAT (ccsIntegrationReadOptionIntoSetting (Real (mIntegration),
4678- NULL,
4679- mSetting.get (),
4680- Real (*mIntegratedSetting)), IsTrue ());
4681-}
4682-
4683-TEST_F (CCSMATEIntegrationTestReadIntegrated, TestReadInSpecialOptionCurrentViewport)
4684-{
4685- const std::string settingName ("current_viewport");
4686- CCSSettingValue *v = MakeSettingValue ();
4687- v->value.asBool = FALSE;
4688-
4689- mIntegratedSetting = createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4690- settingName,
4691- TypeBool,
4692- OptionSpecial,
4693- MOCK_MATE_NAME,
4694- &ccsDefaultObjectAllocator);
4695- SetNames (mSettingMock, mPluginMock, settingName, MOCK_PLUGIN);
4696- EXPECT_CALL (Mock (*mIntegratedSetting), readValue (TypeBool)).WillOnce (Return (v));
4697- EXPECT_CALL (mSettingMock, setBool (IsTrue (), IsTrue ()));
4698-
4699- EXPECT_THAT (ccsIntegrationReadOptionIntoSetting (Real (mIntegration),
4700- NULL,
4701- mSetting.get (),
4702- Real (*mIntegratedSetting)), IsTrue ());
4703-}
4704-
4705-TEST_F (CCSMATEIntegrationTestReadIntegrated, TestReadInSpecialOptionFullscreenVisualBell)
4706-{
4707- const std::string settingName ("fullscreen_visual_bell");
4708- CCSSettingValue *v = MakeSettingValue ();
4709- v->value.asString = strdup ("fullscreen");
4710-
4711- mIntegratedSetting = createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4712- settingName,
4713- TypeString,
4714- OptionSpecial,
4715- MOCK_MATE_NAME,
4716- &ccsDefaultObjectAllocator);
4717- SetNames (mSettingMock, mPluginMock, settingName, MOCK_PLUGIN);
4718- EXPECT_CALL (Mock (*mIntegratedSetting), readValue (TypeString)).WillOnce (Return (v));
4719- EXPECT_CALL (mSettingMock, setBool (IsTrue (), IsTrue ()));
4720-
4721- EXPECT_THAT (ccsIntegrationReadOptionIntoSetting (Real (mIntegration),
4722- NULL,
4723- mSetting.get (),
4724- Real (*mIntegratedSetting)), IsTrue ());
4725-}
4726-
4727-TEST_F (CCSMATEIntegrationTestReadIntegrated, TestReadInSpecialOptionClickToFocus)
4728-{
4729- const std::string settingName ("click_to_focus");
4730- CCSSettingValue *v = MakeSettingValue ();
4731- v->value.asString = strdup ("click");
4732-
4733- mIntegratedSetting = createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4734- settingName,
4735- TypeString,
4736- OptionSpecial,
4737- MOCK_MATE_NAME,
4738- &ccsDefaultObjectAllocator);
4739- SetNames (mSettingMock, mPluginMock, settingName, MOCK_PLUGIN);
4740- EXPECT_CALL (Mock (*mIntegratedSetting), readValue (TypeString)).WillOnce (Return (v));
4741- EXPECT_CALL (mSettingMock, setBool (IsTrue (), IsTrue ()));
4742-
4743- EXPECT_THAT (ccsIntegrationReadOptionIntoSetting (Real (mIntegration),
4744- NULL,
4745- mSetting.get (),
4746- Real (*mIntegratedSetting)), IsTrue ());
4747-}
4748-
4749-namespace
4750-{
4751- struct IntegratedMediaKeysParam
4752- {
4753- public:
4754-
4755- IntegratedMediaKeysParam (const std::string &settingName,
4756- const std::string &integratedName,
4757- const std::string &keyValueString) :
4758- settingName (settingName),
4759- integratedName (integratedName),
4760- keyValueString (keyValueString)
4761- {
4762- EXPECT_TRUE (ccsStringToKeyBinding (keyValueString.c_str (),
4763- &keyValue));
4764- }
4765-
4766- const std::string settingName;
4767- const std::string integratedName;
4768- const std::string keyValueString;
4769- CCSSettingKeyValue keyValue;
4770- };
4771-}
4772-
4773-namespace
4774-{
4775- std::string RUN_COMMAND_SCREENSHOT_KEY ("run_command_screenshot_key");
4776- std::string SCREENSHOT ("screenshot");
4777- std::string SCREENSHOT_BINDING ("<Alt>Print");
4778- std::string RUN_COMMAND_WINDOW_SCREENSHOT_KEY ("run_command_window_screenshot_key");
4779- std::string WINDOW_SCREENSHOT ("window_screenshot");
4780- std::string WINDOW_SCREENSHOT_BINDING ("<Control><Alt>Print");
4781- std::string RUN_COMMAND_TERMINAL_KEY ("run_command_terminal_key");
4782- std::string TERMINAL ("terminal");
4783- std::string TERMINAL_BINDING ("<Control><Alt>t");
4784-}
4785-
4786-class CCSMATEIntegrationTestReadIntegratedMediaKeys :
4787- public CCSMATEIntegrationTestReadIntegrated,
4788- public WithParamInterface <IntegratedMediaKeysParam>
4789-{
4790-};
4791-
4792-TEST_P (CCSMATEIntegrationTestReadIntegratedMediaKeys, TestReadIntegratedMediaKey)
4793-{
4794- const std::string settingName (GetParam ().settingName);
4795- CCSSettingValue *v = MakeSettingValue ();
4796- v->value.asString = strdup (GetParam ().keyValueString.c_str ());
4797-
4798- mIntegratedSetting = createIntegratedSettingCompositionFromMock (MOCK_PLUGIN,
4799- settingName,
4800- TypeString,
4801- OptionSpecial,
4802- MOCK_MATE_NAME,
4803- &ccsDefaultObjectAllocator);
4804- SetNames (mSettingMock, mPluginMock, settingName, MOCK_PLUGIN);
4805- EXPECT_CALL (Mock (*mIntegratedSetting), readValue (TypeString)).WillOnce (Return (v));
4806- EXPECT_CALL (mSettingMock, setKey (Eq (GetParam ().keyValue), IsTrue ()));
4807-
4808- EXPECT_THAT (ccsIntegrationReadOptionIntoSetting (Real (mIntegration),
4809- NULL,
4810- mSetting.get (),
4811- Real (*mIntegratedSetting)), IsTrue ());
4812-}
4813-
4814-INSTANTIATE_TEST_CASE_P (CCSMATEMediaKeys, CCSMATEIntegrationTestReadIntegratedMediaKeys,
4815- Values (IntegratedMediaKeysParam (RUN_COMMAND_SCREENSHOT_KEY,
4816- SCREENSHOT,
4817- SCREENSHOT_BINDING),
4818- IntegratedMediaKeysParam (RUN_COMMAND_WINDOW_SCREENSHOT_KEY,
4819- WINDOW_SCREENSHOT,
4820- WINDOW_SCREENSHOT_BINDING),
4821- IntegratedMediaKeysParam (RUN_COMMAND_TERMINAL_KEY,
4822- TERMINAL,
4823- TERMINAL_BINDING)));
4824-
4825-namespace
4826-{
4827- const std::string DEFAULT_MOUSE_BUTTON_MODIFIERS_STRING ("<Alt>");
4828- const std::string MATE_MOUSE_BUTTON_MODIFIERS_STRING ("<Super>");
4829- const unsigned int DEFAULT_MOUSE_BUTTON_MODIFIERS =
4830- ccsStringToModifiers (DEFAULT_MOUSE_BUTTON_MODIFIERS_STRING.c_str ());
4831- const unsigned int MATE_MOUSE_BUTTON_MODIFIERS =
4832- ccsStringToModifiers (MATE_MOUSE_BUTTON_MODIFIERS_STRING.c_str ());
4833-
4834- const unsigned int LEFT_BUTTON = 1;
4835- const unsigned int MIDDLE_BUTTON = 2;
4836- const unsigned int RIGHT_BUTTON = 3;
4837-}
4838-
4839-class CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers
4840-{
4841- public:
4842-
4843- virtual ~CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers () {}
4844-
4845- CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers () :
4846- mIntegratedSettingMBM (AutoDestroy (ccsMockIntegratedSettingNew (&ccsDefaultObjectAllocator),
4847- ccsIntegratedSettingUnref)),
4848- mIntegratedSettingMBMMock (*(reinterpret_cast <CCSIntegratedSettingGMock *> (ccsObjectGetPrivate (mIntegratedSettingMBM.get ())))),
4849- mIntegratedSettingResizeWithRB (AutoDestroy (ccsMockIntegratedSettingNew (&ccsDefaultObjectAllocator),
4850- ccsIntegratedSettingUnref)),
4851- mIntegratedSettingResizeWithRBMock (*(reinterpret_cast <CCSIntegratedSettingGMock *> (ccsObjectGetPrivate (mIntegratedSettingResizeWithRB.get ()))))
4852- {
4853- memset (&mButtonValue, 0, sizeof (CCSSettingButtonValue));
4854-
4855- mButtonValue.button = MIDDLE_BUTTON;
4856- mButtonValue.buttonModMask = DEFAULT_MOUSE_BUTTON_MODIFIERS;
4857- mButtonValue.edgeMask = 0;
4858- }
4859-
4860- virtual void MateSetUp (CCSMATEIntegrationWithMocks &integration)
4861- {
4862- /* Create new lists as we expect the caller to free them once it
4863- * has retreived them */
4864- CCSIntegratedSettingList integratedSettingsMBM =
4865- ccsIntegratedSettingListAppend (NULL, mIntegratedSettingMBM.get ());
4866- CCSIntegratedSettingList integratedSettingsResizeWithRB =
4867- ccsIntegratedSettingListAppend (NULL, mIntegratedSettingResizeWithRB.get ());
4868-
4869- EXPECT_CALL (MockStorage (integration),
4870- findMatchingSettingsByPluginAndSettingName (Eq (std::string (ccsMATEIntegratedPluginNames.SPECIAL)),
4871- Eq (std::string (ccsMATEIntegratedSettingNames.NULL_MOUSE_BUTTON_MODIFIER.compizName))))
4872- .WillOnce (Return (integratedSettingsMBM));
4873- EXPECT_CALL (MockStorage (integration),
4874- findMatchingSettingsByPluginAndSettingName (Eq (std::string (ccsMATEIntegratedPluginNames.SPECIAL)),
4875- Eq (std::string (ccsMATEIntegratedSettingNames.NULL_RESIZE_WITH_RIGHT_BUTTON.compizName))))
4876- .WillOnce (Return (integratedSettingsResizeWithRB));
4877- }
4878-
4879-
4880- protected:
4881-
4882- boost::shared_ptr <CCSIntegratedSetting> mIntegratedSettingMBM;
4883- CCSIntegratedSettingGMock &mIntegratedSettingMBMMock;
4884- boost::shared_ptr <CCSIntegratedSetting> mIntegratedSettingResizeWithRB;
4885- CCSIntegratedSettingGMock &mIntegratedSettingResizeWithRBMock;
4886- CCSSettingButtonValue mButtonValue;
4887-};
4888-
4889-class CCSMATEIntegrationTestWithMocksReadIntegratedMouseButtonModifiers :
4890- public CCSMATEIntegrationTestReadIntegrated,
4891- public CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers
4892-{
4893- public:
4894-
4895- virtual void SetUp ()
4896- {
4897- CCSSettingValue *vRB = MakeSettingValue ();
4898- CCSSettingValue *vMBM = MakeSettingValue ();
4899- vRB->value.asBool = TRUE;
4900- vMBM->value.asString = strdup (MATE_MOUSE_BUTTON_MODIFIERS_STRING.c_str ());
4901-
4902- CCSMATEIntegrationTestReadIntegrated::SetUp ();
4903- CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers::MateSetUp (mIntegration);
4904-
4905- EXPECT_CALL (mSettingMock, getButton (_))
4906- .WillOnce (DoAll (
4907- SetArgPointee <0> (
4908- mButtonValue),
4909- Return (TRUE)));
4910-
4911- /* Get the MATE Mouse button modifier */
4912- EXPECT_CALL (mIntegratedSettingMBMMock, readValue (TypeString)).WillOnce (Return (vMBM));
4913- EXPECT_CALL (mIntegratedSettingResizeWithRBMock, readValue (TypeBool)).WillOnce (Return (vRB));
4914- }
4915-};
4916-
4917-class CCSMATEIntegrationTestWithMocksWriteIntegratedMouseButtonModifiers :
4918- public CCSMATEIntegrationTestWriteIntegrated,
4919- public CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers
4920-{
4921- public:
4922-
4923- CCSMATEIntegrationTestWithMocksWriteIntegratedMouseButtonModifiers () :
4924- corePlugin (AutoDestroy (ccsMockPluginNew (),
4925- ccsPluginUnref)),
4926- corePluginMock (*(reinterpret_cast <CCSPluginGMock *> (ccsObjectGetPrivate (corePlugin.get ())))),
4927- resizePlugin (AutoDestroy (ccsMockPluginNew (),
4928- ccsPluginUnref)),
4929- resizePluginMock (*(reinterpret_cast <CCSPluginGMock *> (ccsObjectGetPrivate (resizePlugin.get ())))),
4930- movePlugin (AutoDestroy (ccsMockPluginNew (),
4931- ccsPluginUnref)),
4932- movePluginMock (*(reinterpret_cast <CCSPluginGMock *> (ccsObjectGetPrivate (movePlugin.get ())))),
4933- resizeInitiateButtonSetting (AutoDestroy (ccsMockSettingNew (),
4934- ccsSettingUnref)),
4935- resizeInitiateButtonSettingMock (*(reinterpret_cast <CCSSettingGMock *> (ccsObjectGetPrivate (resizeInitiateButtonSetting.get ())))),
4936- moveInitiateButtonSetting (AutoDestroy (ccsMockSettingNew (),
4937- ccsSettingUnref)),
4938- moveInitiateButtonSettingMock (*(reinterpret_cast <CCSSettingGMock *> (ccsObjectGetPrivate (moveInitiateButtonSetting.get ())))),
4939- coreWindowMenuSetting (AutoDestroy (ccsMockSettingNew (),
4940- ccsSettingUnref)),
4941- coreWindowMenuSettingMock (*(reinterpret_cast <CCSSettingGMock *> (ccsObjectGetPrivate (coreWindowMenuSetting.get ())))),
4942- resizeInitiateButton (MakeAutoDestroySettingValue (TypeButton)),
4943- moveInitiateButton (MakeAutoDestroySettingValue (TypeButton)),
4944- coreWindowMenuButton (MakeAutoDestroySettingValue (TypeButton))
4945- {
4946- resizeInitiateButton->value.asButton.button = LEFT_BUTTON;
4947- resizeInitiateButton->value.asButton.buttonModMask = 0;
4948- resizeInitiateButton->value.asButton.edgeMask = 0;
4949- moveInitiateButton->value.asButton.button = LEFT_BUTTON;
4950- moveInitiateButton->value.asButton.buttonModMask = DEFAULT_MOUSE_BUTTON_MODIFIERS;
4951- moveInitiateButton->value.asButton.edgeMask = 0;
4952- coreWindowMenuButton->value.asButton.button = MIDDLE_BUTTON;
4953- coreWindowMenuButton->value.asButton.buttonModMask = 0;
4954- coreWindowMenuButton->value.asButton.edgeMask = 0;
4955- }
4956-
4957- virtual void SetUp ()
4958- {
4959- CCSMATEIntegrationTestWriteIntegrated::SetUp ();
4960- CCSMATEIntegrationTestWithMocksIntegratedMouseButtonModifiers::MateSetUp (mIntegration);
4961- }
4962-
4963- protected:
4964-
4965- boost::shared_ptr <CCSPlugin> corePlugin;
4966- CCSPluginGMock &corePluginMock;
4967- boost::shared_ptr <CCSPlugin> resizePlugin;
4968- CCSPluginGMock &resizePluginMock;
4969- boost::shared_ptr <CCSPlugin> movePlugin;
4970- CCSPluginGMock &movePluginMock;
4971-
4972- boost::shared_ptr <CCSSetting> resizeInitiateButtonSetting;
4973- CCSSettingGMock &resizeInitiateButtonSettingMock;
4974- boost::shared_ptr <CCSSetting> moveInitiateButtonSetting;
4975- CCSSettingGMock &moveInitiateButtonSettingMock;
4976- boost::shared_ptr <CCSSetting> coreWindowMenuSetting;
4977- CCSSettingGMock &coreWindowMenuSettingMock;
4978-
4979- boost::shared_ptr <CCSSettingValue> resizeInitiateButton;
4980- boost::shared_ptr <CCSSettingValue> moveInitiateButton;
4981- boost::shared_ptr <CCSSettingValue> coreWindowMenuButton;
4982-};
4983-
4984-TEST_F (CCSMATEIntegrationTestWithMocksReadIntegratedMouseButtonModifiers, TestReadInSpecialOptionMoveInitiateButton)
4985-{
4986- const std::string settingName ("initiate_button");
4987- const std::string pluginName ("move");
4988-
4989- CCSSettingButtonValue newButtonValue = mButtonValue;
4990- newButtonValue.button = LEFT_BUTTON;
4991- newButtonValue.buttonModMask = MATE_MOUSE_BUTTON_MODIFIERS;
4992-
4993- mIntegratedSetting = createIntegratedSettingCompositionFromMock (pluginName,
4994- settingName,
4995- TypeBool,
4996- OptionSpecial,
4997- MOCK_MATE_NAME,
4998- &ccsDefaultObjectAllocator);
4999- SetNames (mSettingMock, mPluginMock, settingName, pluginName);
5000-
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches