Merge lp:~muktupavels/compiz/gwd-improve-settings-storage into lp:compiz/0.9.12
- gwd-improve-settings-storage
- Merge into 0.9.12
Proposed by
Alberts Muktupāvels
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | 4053 |
Merged at revision: | 4048 |
Proposed branch: | lp:~muktupavels/compiz/gwd-improve-settings-storage |
Merge into: | lp:compiz/0.9.12 |
Prerequisite: | lp:~muktupavels/compiz/gwd-meta-theme-get-title-scale-removed |
Diff against target: |
619 lines (+147/-275) 8 files modified
gtk/window-decorator/gwd-settings-storage.c (+145/-60) gtk/window-decorator/gwd-settings-storage.h (+2/-0) gtk/window-decorator/tests/CMakeLists.txt (+0/-48) gtk/window-decorator/tests/compiz_gwd_tests.h.in (+0/-31) gtk/window-decorator/tests/org.gnome.desktop.wm.preferences.gschema.xml (+0/-72) gtk/window-decorator/tests/org.gnome.metacity.gschema.xml (+0/-10) gtk/window-decorator/tests/org.mate.marco.gschema.xml (+0/-53) gtk/window-decorator/tests/test_gwd_settings.cpp (+0/-1) |
To merge this branch: | bzr merge lp:~muktupavels/compiz/gwd-improve-settings-storage |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Approve | ||
Review via email: mp+296207@code.launchpad.net |
Commit message
gtk-window-
- Remove unused GSettings schemas from tests.
- If gtk-window-
- Don't create GSettings objects for schemas that is not needed in current desktop.
Description of the change
- Remove unused GSettings schemas from tests.
- If gtk-window-
- Don't create GSettings objects for schemas that is not needed in current desktop.
To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) : | # |
Revision history for this message
Sam Spilsbury (smspillaz) wrote : | # |
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Good one
review:
Approve
Revision history for this message
Alberts Muktupāvels (muktupavels) : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'gtk/window-decorator/gwd-settings-storage.c' |
2 | --- gtk/window-decorator/gwd-settings-storage.c 2016-05-21 10:36:31 +0000 |
3 | +++ gtk/window-decorator/gwd-settings-storage.c 2016-06-01 13:36:56 +0000 |
4 | @@ -1,3 +1,5 @@ |
5 | +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*- */ |
6 | + |
7 | /* |
8 | * Copyright © 2012 Canonical Ltd |
9 | * |
10 | @@ -18,16 +20,18 @@ |
11 | * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com> |
12 | */ |
13 | |
14 | -#include <glib-object.h> |
15 | -#include <glib.h> |
16 | - |
17 | -#include <gio/gio.h> |
18 | - |
19 | -#include <string.h> |
20 | +#include "config.h" |
21 | + |
22 | +#include <gtk/gtk.h> |
23 | |
24 | #include "gwd-settings.h" |
25 | #include "gwd-settings-storage.h" |
26 | |
27 | +static const gchar * ORG_COMPIZ_GWD = "org.compiz.gwd"; |
28 | +static const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES = "org.gnome.desktop.wm.preferences"; |
29 | +static const gchar * ORG_GNOME_METACITY = "org.gnome.metacity"; |
30 | +static const gchar * ORG_MATE_MARCO_GENERAL = "org.mate.Marco.general"; |
31 | + |
32 | static const gchar * ORG_COMPIZ_GWD_KEY_USE_TOOLTIPS = "use-tooltips"; |
33 | static const gchar * ORG_COMPIZ_GWD_KEY_BLUR_TYPE = "blur-type"; |
34 | static const gchar * ORG_COMPIZ_GWD_KEY_METACITY_THEME_ACTIVE_OPACITY = "metacity-theme-active-opacity"; |
35 | @@ -55,18 +59,27 @@ |
36 | static const gchar * ORG_MATE_MARCO_GENERAL_TITLEBAR_FONT = "titlebar-font"; |
37 | static const gchar * ORG_MATE_MARCO_GENERAL_BUTTON_LAYOUT = "button-layout"; |
38 | |
39 | +typedef enum |
40 | +{ |
41 | + GWD_DESKTOP_GNOME, |
42 | + GWD_DESKTOP_GNOME_FLASHBACK, |
43 | + GWD_DESKTOP_MATE |
44 | +} GWDDesktop; |
45 | + |
46 | struct _GWDSettingsStorage |
47 | { |
48 | GObject parent; |
49 | |
50 | GWDSettings *settings; |
51 | |
52 | + GWDDesktop current_desktop; |
53 | + |
54 | GSettings *gwd; |
55 | GSettings *desktop; |
56 | GSettings *metacity; |
57 | GSettings *marco; |
58 | |
59 | - gboolean is_mate_desktop; |
60 | + gulong gtk_decoration_layout_id; |
61 | }; |
62 | |
63 | enum |
64 | @@ -82,14 +95,48 @@ |
65 | |
66 | G_DEFINE_TYPE (GWDSettingsStorage, gwd_settings_storage, G_TYPE_OBJECT) |
67 | |
68 | +static gchar * |
69 | +button_layout_from_gtk_decoration_layout (const gchar *gtk_decoration_layout) |
70 | +{ |
71 | + gchar **sides = g_strsplit (gtk_decoration_layout, ":", -1); |
72 | + gchar *button_layout; |
73 | + gint i; |
74 | + |
75 | + for (i = 0; sides[i]; i++) { |
76 | + gchar **buttons = g_strsplit (sides[i], ",", -1); |
77 | + gint j; |
78 | + |
79 | + for (j = 0; buttons[j]; j++) { |
80 | + const gchar *button = NULL; |
81 | + |
82 | + if (g_strcmp0 (buttons[j], "icon") == 0) |
83 | + button = "menu"; |
84 | + else if (g_strcmp0 (buttons[j], "menu") == 0) |
85 | + button = "appmenu"; |
86 | + |
87 | + if (button) { |
88 | + g_free (buttons[j]); |
89 | + buttons[j] = g_strdup (button); |
90 | + } |
91 | + } |
92 | + |
93 | + g_free (sides[i]); |
94 | + sides[i] = g_strjoinv (",", buttons); |
95 | + |
96 | + g_strfreev (buttons); |
97 | + } |
98 | + |
99 | + button_layout = g_strjoinv (":", sides); |
100 | + g_strfreev (sides); |
101 | + |
102 | + return button_layout; |
103 | +} |
104 | + |
105 | static inline GSettings * |
106 | get_settings_no_abort (const gchar *schema) |
107 | { |
108 | - GSettingsSchemaSource *source; |
109 | - GSettings *settings; |
110 | - |
111 | - source = g_settings_schema_source_get_default (); |
112 | - settings = NULL; |
113 | + GSettingsSchemaSource *source = g_settings_schema_source_get_default (); |
114 | + GSettings *settings = NULL; |
115 | |
116 | if (g_settings_schema_source_lookup (source, schema, TRUE)) |
117 | settings = g_settings_new (schema); |
118 | @@ -145,12 +192,15 @@ |
119 | |
120 | use_metacity_theme = g_settings_get_boolean (storage->gwd, ORG_COMPIZ_GWD_KEY_USE_METACITY_THEME); |
121 | |
122 | - if (storage->is_mate_desktop) |
123 | + if (storage->current_desktop == GWD_DESKTOP_MATE && storage->marco) { |
124 | theme = g_settings_get_string (storage->marco, ORG_MATE_MARCO_GENERAL_THEME); |
125 | - else if (storage->metacity) |
126 | + } else if (storage->current_desktop == GWD_DESKTOP_GNOME_FLASHBACK && storage->metacity) { |
127 | theme = g_settings_get_string (storage->metacity, ORG_GNOME_METACITY_THEME); |
128 | - else |
129 | + } else if (storage->desktop) { |
130 | + theme = g_settings_get_string (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_THEME); |
131 | + } else { |
132 | return; |
133 | + } |
134 | |
135 | gwd_settings_metacity_theme_changed (storage->settings, use_metacity_theme, theme); |
136 | g_free (theme); |
137 | @@ -181,12 +231,21 @@ |
138 | { |
139 | gchar *button_layout; |
140 | |
141 | - if (storage->is_mate_desktop) |
142 | + if (storage->current_desktop == GWD_DESKTOP_MATE && storage->marco) { |
143 | button_layout = g_settings_get_string (storage->marco, ORG_MATE_MARCO_GENERAL_BUTTON_LAYOUT); |
144 | - else if (storage->desktop) |
145 | + } else if (storage->current_desktop == GWD_DESKTOP_GNOME_FLASHBACK) { |
146 | + GtkSettings *settings = gtk_settings_get_default (); |
147 | + gchar *gtk_decoration_layout = NULL; |
148 | + |
149 | + g_object_get (settings, "gtk-decoration-layout", >k_decoration_layout, NULL); |
150 | + |
151 | + button_layout = button_layout_from_gtk_decoration_layout (gtk_decoration_layout); |
152 | + g_free (gtk_decoration_layout); |
153 | + } else if (storage->desktop) { |
154 | button_layout = g_settings_get_string (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_BUTTON_LAYOUT); |
155 | - else |
156 | + } else { |
157 | return; |
158 | + } |
159 | |
160 | gwd_settings_button_layout_changed (storage->settings, button_layout); |
161 | g_free (button_layout); |
162 | @@ -195,17 +254,18 @@ |
163 | void |
164 | update_font (GWDSettingsStorage *storage) |
165 | { |
166 | + gboolean titlebar_system_font; |
167 | gchar *titlebar_font; |
168 | - gboolean titlebar_system_font; |
169 | |
170 | - if (storage->is_mate_desktop) { |
171 | + if (storage->current_desktop == GWD_DESKTOP_MATE && storage->marco) { |
172 | + titlebar_system_font = g_settings_get_boolean (storage->marco, ORG_MATE_MARCO_GENERAL_TITLEBAR_USES_SYSTEM_FONT); |
173 | titlebar_font = g_settings_get_string (storage->marco, ORG_MATE_MARCO_GENERAL_TITLEBAR_FONT); |
174 | - titlebar_system_font = g_settings_get_boolean (storage->marco, ORG_MATE_MARCO_GENERAL_TITLEBAR_USES_SYSTEM_FONT); |
175 | } else if (storage->desktop) { |
176 | + titlebar_system_font = g_settings_get_boolean (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_TITLEBAR_USES_SYSTEM_FONT); |
177 | titlebar_font = g_settings_get_string (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_TITLEBAR_FONT); |
178 | - titlebar_system_font = g_settings_get_boolean (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_TITLEBAR_USES_SYSTEM_FONT); |
179 | - } else |
180 | + } else { |
181 | return; |
182 | + } |
183 | |
184 | gwd_settings_font_changed (storage->settings, titlebar_system_font, titlebar_font); |
185 | g_free (titlebar_font); |
186 | @@ -222,7 +282,7 @@ |
187 | if (!storage->gwd) |
188 | return; |
189 | |
190 | - if (storage->is_mate_desktop) { |
191 | + if (storage->current_desktop == GWD_DESKTOP_MATE && storage->marco) { |
192 | double_click_action = g_settings_get_string (storage->marco, ORG_MATE_MARCO_GENERAL_ACTION_DOUBLE_CLICK_TITLEBAR); |
193 | middle_click_action = g_settings_get_string (storage->marco, ORG_MATE_MARCO_GENERAL_ACTION_MIDDLE_CLICK_TITLEBAR); |
194 | right_click_action = g_settings_get_string (storage->marco, ORG_MATE_MARCO_GENERAL_ACTION_RIGHT_CLICK_TITLEBAR); |
195 | @@ -230,8 +290,9 @@ |
196 | double_click_action = g_settings_get_string (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_DOUBLE_CLICK_TITLEBAR); |
197 | middle_click_action = g_settings_get_string (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_MIDDLE_CLICK_TITLEBAR); |
198 | right_click_action = g_settings_get_string (storage->desktop, ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_RIGHT_CLICK_TITLEBAR); |
199 | - } else |
200 | + } else { |
201 | return; |
202 | + } |
203 | |
204 | translate_dashes_to_underscores (double_click_action); |
205 | translate_dashes_to_underscores (middle_click_action); |
206 | @@ -319,11 +380,17 @@ |
207 | } |
208 | |
209 | static void |
210 | +gtk_decoration_layout_changed (GtkSettings *settings, |
211 | + GParamSpec *pspec, |
212 | + GWDSettingsStorage *storage) |
213 | +{ |
214 | + update_button_layout (storage); |
215 | +} |
216 | + |
217 | +static void |
218 | gwd_settings_storage_constructed (GObject *object) |
219 | { |
220 | - GWDSettingsStorage *storage; |
221 | - |
222 | - storage = GWD_SETTINGS_STORAGE (object); |
223 | + GWDSettingsStorage *storage = GWD_SETTINGS_STORAGE (object); |
224 | |
225 | G_OBJECT_CLASS (gwd_settings_storage_parent_class)->constructed (object); |
226 | |
227 | @@ -363,9 +430,7 @@ |
228 | static void |
229 | gwd_settings_storage_dispose (GObject *object) |
230 | { |
231 | - GWDSettingsStorage *storage; |
232 | - |
233 | - storage = GWD_SETTINGS_STORAGE (object); |
234 | + GWDSettingsStorage *storage = GWD_SETTINGS_STORAGE (object); |
235 | |
236 | g_clear_object (&storage->settings); |
237 | |
238 | @@ -374,6 +439,13 @@ |
239 | g_clear_object (&storage->metacity); |
240 | g_clear_object (&storage->marco); |
241 | |
242 | + if (storage->gtk_decoration_layout_id > 0) { |
243 | + GtkSettings *settings = gtk_settings_get_default (); |
244 | + |
245 | + g_signal_handler_disconnect (settings, storage->gtk_decoration_layout_id); |
246 | + storage->gtk_decoration_layout_id = 0; |
247 | + } |
248 | + |
249 | G_OBJECT_CLASS (gwd_settings_storage_parent_class)->dispose (object); |
250 | } |
251 | |
252 | @@ -383,9 +455,7 @@ |
253 | const GValue *value, |
254 | GParamSpec *pspec) |
255 | { |
256 | - GWDSettingsStorage *storage; |
257 | - |
258 | - storage = GWD_SETTINGS_STORAGE (object); |
259 | + GWDSettingsStorage *storage = GWD_SETTINGS_STORAGE (object); |
260 | |
261 | switch (property_id) { |
262 | case PROP_SETTINGS: |
263 | @@ -401,9 +471,7 @@ |
264 | static void |
265 | gwd_settings_storage_class_init (GWDSettingsStorageClass *storage_class) |
266 | { |
267 | - GObjectClass *object_class; |
268 | - |
269 | - object_class = G_OBJECT_CLASS (storage_class); |
270 | + GObjectClass *object_class = G_OBJECT_CLASS (storage_class); |
271 | |
272 | object_class->constructed = gwd_settings_storage_constructed; |
273 | object_class->dispose = gwd_settings_storage_dispose; |
274 | @@ -422,31 +490,48 @@ |
275 | void |
276 | gwd_settings_storage_init (GWDSettingsStorage *storage) |
277 | { |
278 | - storage->gwd = get_settings_no_abort ("org.compiz.gwd"); |
279 | - storage->desktop = get_settings_no_abort ("org.gnome.desktop.wm.preferences"); |
280 | - storage->metacity = get_settings_no_abort ("org.gnome.metacity"); |
281 | - storage->marco = get_settings_no_abort ("org.mate.Marco.general"); |
282 | - |
283 | - if (storage->marco) { |
284 | - const gchar *xdg_current_desktop; |
285 | - |
286 | - xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP"); |
287 | - |
288 | - if (xdg_current_desktop) { |
289 | - gchar **desktops; |
290 | - gint i; |
291 | - |
292 | - desktops = g_strsplit (xdg_current_desktop, ":", -1); |
293 | - |
294 | - for (i = 0; desktops[i] != NULL; i++) { |
295 | - if (g_strcmp0 (desktops[i], "MATE") == 0) { |
296 | - storage->is_mate_desktop = TRUE; |
297 | - break; |
298 | - } |
299 | + const gchar *xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP"); |
300 | + |
301 | + storage->current_desktop = GWD_DESKTOP_GNOME; |
302 | + |
303 | + if (xdg_current_desktop != NULL) { |
304 | + gchar **desktops = g_strsplit (xdg_current_desktop, ":", -1); |
305 | + gint i; |
306 | + |
307 | + for (i = 0; desktops[i] != NULL; i++) { |
308 | + if (g_strcmp0 (desktops[i], "GNOME-Flashback") == 0) { |
309 | + storage->current_desktop = GWD_DESKTOP_GNOME_FLASHBACK; |
310 | + break; |
311 | + } else if (g_strcmp0 (desktops[i], "MATE") == 0) { |
312 | + storage->current_desktop = GWD_DESKTOP_MATE; |
313 | + break; |
314 | } |
315 | - |
316 | - g_strfreev (desktops); |
317 | } |
318 | + |
319 | + g_strfreev (desktops); |
320 | + } |
321 | + |
322 | + switch (storage->current_desktop) { |
323 | + case GWD_DESKTOP_GNOME_FLASHBACK: |
324 | + storage->gwd = get_settings_no_abort (ORG_COMPIZ_GWD); |
325 | + storage->desktop = get_settings_no_abort (ORG_GNOME_DESKTOP_WM_PREFERENCES); |
326 | + storage->metacity = get_settings_no_abort (ORG_GNOME_METACITY); |
327 | + |
328 | + storage->gtk_decoration_layout_id = |
329 | + g_signal_connect (gtk_settings_get_default (), "notify::gtk-decoration-layout", |
330 | + G_CALLBACK (gtk_decoration_layout_changed), storage); |
331 | + break; |
332 | + |
333 | + case GWD_DESKTOP_MATE: |
334 | + storage->gwd = get_settings_no_abort (ORG_COMPIZ_GWD); |
335 | + storage->marco = get_settings_no_abort (ORG_MATE_MARCO_GENERAL); |
336 | + break; |
337 | + |
338 | + case GWD_DESKTOP_GNOME: |
339 | + default: |
340 | + storage->gwd = get_settings_no_abort (ORG_COMPIZ_GWD); |
341 | + storage->desktop = get_settings_no_abort (ORG_GNOME_DESKTOP_WM_PREFERENCES); |
342 | + break; |
343 | } |
344 | } |
345 | |
346 | |
347 | === modified file 'gtk/window-decorator/gwd-settings-storage.h' |
348 | --- gtk/window-decorator/gwd-settings-storage.h 2016-05-20 23:30:30 +0000 |
349 | +++ gtk/window-decorator/gwd-settings-storage.h 2016-06-01 13:36:56 +0000 |
350 | @@ -1,3 +1,5 @@ |
351 | +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*- */ |
352 | + |
353 | /* |
354 | * Copyright © 2012 Canonical Ltd |
355 | * |
356 | |
357 | === modified file 'gtk/window-decorator/tests/CMakeLists.txt' |
358 | --- gtk/window-decorator/tests/CMakeLists.txt 2016-05-21 11:06:24 +0000 |
359 | +++ gtk/window-decorator/tests/CMakeLists.txt 2016-06-01 13:36:56 +0000 |
360 | @@ -6,9 +6,6 @@ |
361 | ${CMAKE_SOURCE_DIR}/tests/shared |
362 | ${CMAKE_SOURCE_DIR}/tests/shared/glib) |
363 | |
364 | -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_tests.h.in |
365 | - ${CMAKE_CURRENT_BINARY_DIR}/compiz_gwd_tests.h) |
366 | - |
367 | pkg_check_modules (COMPIZ_TEST_GTK_WINDOW_DECORATOR |
368 | glib-2.0>=2.28 |
369 | gio-2.0>=2.25.0) |
370 | @@ -27,51 +24,6 @@ |
371 | set (COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS |
372 | gtk_window_decorator_settings) |
373 | |
374 | - set (_desktop_gschema_name org.gnome.desktop.wm.preferences) |
375 | - set (_desktop_gschema_filename ${_desktop_gschema_name}.gschema.xml) |
376 | - set (_desktop_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_desktop_gschema_filename}) |
377 | - set (_desktop_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_desktop_gschema_filename}) |
378 | - |
379 | - add_custom_command (OUTPUT ${_desktop_gschema_generated_location} |
380 | - COMMAND cp -r ${_desktop_gschema_filepath} ${_desktop_gschema_generated_location} |
381 | - DEPENDS ${_desktop_gschema_filepath} |
382 | - VERBATIM) |
383 | - |
384 | - add_custom_target (compiz_gwd_gsettings_org_gnome_desktop_wm_preferences_schema ALL |
385 | - DEPENDS ${_desktop_gschema_generated_location}) |
386 | - |
387 | - add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_gnome_desktop_wm_preferences_schema) |
388 | - |
389 | - set (_metacity_gschema_name org.gnome.metacity) |
390 | - set (_metacity_gschema_filename ${_metacity_gschema_name}.gschema.xml) |
391 | - set (_metacity_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_metacity_gschema_filename}) |
392 | - set (_metacity_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_metacity_gschema_filename}) |
393 | - |
394 | - add_custom_command (OUTPUT ${_metacity_gschema_generated_location} |
395 | - COMMAND cp -r ${_metacity_gschema_filepath} ${_metacity_gschema_generated_location} |
396 | - DEPENDS ${_metacity_gschema_filepath} |
397 | - VERBATIM) |
398 | - |
399 | - add_custom_target (compiz_gwd_gsettings_org_gnome_metacity_schema ALL |
400 | - DEPENDS ${_metacity_gschema_generated_location}) |
401 | - |
402 | - add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_gnome_metacity_schema) |
403 | - |
404 | - set (_marco_gschema_name org.mate.marco) |
405 | - set (_marco_gschema_filename ${_marco_gschema_name}.gschema.xml) |
406 | - set (_marco_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_marco_gschema_filename}) |
407 | - set (_marco_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_marco_gschema_filename}) |
408 | - |
409 | - add_custom_command (OUTPUT ${_marco_gschema_generated_location} |
410 | - COMMAND cp -r ${_marco_gschema_filepath} ${_marco_gschema_generated_location} |
411 | - DEPENDS ${_marco_gschema_filepath} |
412 | - VERBATIM) |
413 | - |
414 | - add_custom_target (compiz_gwd_gsettings_org_mate_marco_schema ALL |
415 | - DEPENDS ${_marco_gschema_generated_location}) |
416 | - |
417 | - add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_mate_marco_schema) |
418 | - |
419 | set (COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES |
420 | ${COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES} |
421 | gtk_window_decorator_settings_storage_gsettings) |
422 | |
423 | === removed file 'gtk/window-decorator/tests/compiz_gwd_tests.h.in' |
424 | --- gtk/window-decorator/tests/compiz_gwd_tests.h.in 2012-09-06 10:08:25 +0000 |
425 | +++ gtk/window-decorator/tests/compiz_gwd_tests.h.in 1970-01-01 00:00:00 +0000 |
426 | @@ -1,31 +0,0 @@ |
427 | -/* |
428 | - * Copyright © 2012 Canonical Ltd |
429 | - * |
430 | - * This program is free software; you can redistribute it and/or modify |
431 | - * it under the terms of the GNU General Public License as published by |
432 | - * the Free Software Foundation; either version 2 of the License, or |
433 | - * (at your option) any later version. |
434 | - * |
435 | - * This program is distributed in the hope that it will be useful, |
436 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
437 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
438 | - * GNU General Public License for more details. |
439 | - * |
440 | - * You should have received a copy of the GNU General Public License |
441 | - * along with this program; if not, write to the Free Software Foundation, |
442 | - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
443 | - * |
444 | - * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com> |
445 | - */ |
446 | -#ifndef _COMPIZ_GWD_TESTS_CONFIG_H |
447 | -#define _COMPIZ_GWD_TESTS_CONFIG_H |
448 | - |
449 | -#define MOCK_SCHEMA_PATH "@CMAKE_BINARY_DIR@/generated/glib-2.0/schemas" |
450 | - |
451 | -namespace |
452 | -{ |
453 | -const std::string MOCK_PATH (MOCK_SCHEMA_PATH); |
454 | -} |
455 | - |
456 | -#endif |
457 | - |
458 | |
459 | === removed file 'gtk/window-decorator/tests/org.gnome.desktop.wm.preferences.gschema.xml' |
460 | --- gtk/window-decorator/tests/org.gnome.desktop.wm.preferences.gschema.xml 2012-08-22 07:29:26 +0000 |
461 | +++ gtk/window-decorator/tests/org.gnome.desktop.wm.preferences.gschema.xml 1970-01-01 00:00:00 +0000 |
462 | @@ -1,72 +0,0 @@ |
463 | -<?xml version="1.0" encoding="UTF-8"?> |
464 | -<schemalist> |
465 | - <enum id='org.gnome.desktop.GDesktopTitlebarAction'> |
466 | - <value nick='toggle-shade' value='0'/> |
467 | - <value nick='toggle-maximize' value='1'/> |
468 | - <value nick='toggle-maximize-horizontally' value='2'/> |
469 | - <value nick='toggle-maximize-vertically' value='3'/> |
470 | - <value nick='minimize' value='4'/> |
471 | - <value nick='none' value='5'/> |
472 | - <value nick='lower' value='6'/> |
473 | - <value nick='menu' value='7'/> |
474 | - </enum> |
475 | - <schema path="/org/gnome/desktop/wm/preferences/" id="org.gnome.desktop.wm.preferences" gettext-domain="gsettings-desktop-schemas"> |
476 | - <key type="s" name="button-layout"> |
477 | - <default>':minimize,maximize,close'</default> |
478 | - <summary>Arrangement of buttons on the titlebar</summary> |
479 | - <description>Arrangement of buttons on the titlebar. The value should be a string, such as "menu:minimize,maximize,spacer,close"; the colon separates the left corner of the window from the right corner, and the button names are comma-separated. Duplicate buttons are not allowed. Unknown button names are silently ignored so that buttons can be added in future metacity versions without breaking older versions. A special spacer tag can be used to insert some space between two adjacent buttons.</description> |
480 | - </key> |
481 | - <key name="action-double-click-titlebar" enum="org.gnome.desktop.GDesktopTitlebarAction"> |
482 | - <default>'toggle-maximize'</default> |
483 | - <summary>Action on title bar double-click</summary> |
484 | - <description>This option determines the effects of double-clicking on the title bar. Current valid options are 'toggle-shade', which will shade/unshade the window, 'toggle-maximize' which will maximize/unmaximize the window, 'toggle-maximize-horizontally' and 'toggle-maximize-vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything.</description> |
485 | - |
486 | - <aliases> |
487 | - <alias value="toggle_shade" target="toggle-shade"/> |
488 | - <alias value="toggle_maximize" target="toggle-maximize"/> |
489 | - <alias value="toggle_maximize_horizontally" target="toggle-maximize-horizontally"/> |
490 | - <alias value="toggle_maximize_vertically" target="toggle-maximize-vertically"/> |
491 | - </aliases> |
492 | - </key> |
493 | - <key name="action-middle-click-titlebar" enum="org.gnome.desktop.GDesktopTitlebarAction"> |
494 | - <default>'lower'</default> |
495 | - <summary>Action on title bar middle-click</summary> |
496 | - <description>This option determines the effects of middle-clicking on the title bar. Current valid options are 'toggle-shade', which will shade/unshade the window, 'toggle-maximize' which will maximize/unmaximize the window, 'toggle-maximize-horizontally' and 'toggle-maximize-vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything.</description> |
497 | - |
498 | - <aliases> |
499 | - <alias value="toggle_shade" target="toggle-shade"/> |
500 | - <alias value="toggle_maximize" target="toggle-maximize"/> |
501 | - <alias value="toggle_maximize_horizontally" target="toggle-maximize-horizontally"/> |
502 | - <alias value="toggle_maximize_vertically" target="toggle-maximize-vertically"/> |
503 | - </aliases> |
504 | - </key> |
505 | - <key name="action-right-click-titlebar" enum="org.gnome.desktop.GDesktopTitlebarAction"> |
506 | - <default>'menu'</default> |
507 | - <summary>Action on title bar right-click</summary> |
508 | - <description>This option determines the effects of right-clicking on the title bar. Current valid options are 'toggle-shade', which will shade/unshade the window, 'toggle-maximize' which will maximize/unmaximize the window, 'toggle-maximize-horizontally' and 'toggle-maximize-vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything.</description> |
509 | - |
510 | - <aliases> |
511 | - <alias value="toggle_shade" target="toggle-shade"/> |
512 | - <alias value="toggle_maximize" target="toggle-maximize"/> |
513 | - <alias value="toggle_maximize_horizontally" target="toggle-maximize-horizontally"/> |
514 | - <alias value="toggle_maximize_vertically" target="toggle-maximize-vertically"/> |
515 | - </aliases> |
516 | - </key> |
517 | - <key type="s" name="theme"> |
518 | - <default>'Adwaita'</default> |
519 | - <summary>Current theme</summary> |
520 | - <description>The theme determines the appearance of window borders, titlebar, and so forth.</description> |
521 | - </key> |
522 | - <key type="b" name="titlebar-uses-system-font"> |
523 | - <default>false</default> |
524 | - <summary>Use standard system font in window titles</summary> |
525 | - <description>If true, ignore the titlebar-font option, and use the standard application font for window titles.</description> |
526 | - </key> |
527 | - <key type="s" name="titlebar-font"> |
528 | - <default>'Cantarell Bold 11'</default> |
529 | - <summary>Window title font</summary> |
530 | - <description>A font description string describing a font for window titlebars. The size from the description will only be used if the titlebar-font-size option is set to 0. Also, this option is disabled if the titlebar-uses-desktop-font option is set to true.</description> |
531 | - </key> |
532 | - </schema> |
533 | - |
534 | -</schemalist> |
535 | |
536 | === removed file 'gtk/window-decorator/tests/org.gnome.metacity.gschema.xml' |
537 | --- gtk/window-decorator/tests/org.gnome.metacity.gschema.xml 2015-04-06 17:34:00 +0000 |
538 | +++ gtk/window-decorator/tests/org.gnome.metacity.gschema.xml 1970-01-01 00:00:00 +0000 |
539 | @@ -1,10 +0,0 @@ |
540 | -<?xml version="1.0" encoding="UTF-8"?> |
541 | -<schemalist> |
542 | - <schema path="/org/gnome/metacity/" id="org.gnome.metacity" gettext-domain="@GETTEXT_DOMAIN"> |
543 | - <key type="s" name="theme"> |
544 | - <default>'Adwaita'</default> |
545 | - <summary>Current theme</summary> |
546 | - <description>The theme determines the appearance of window borders, titlebar, and so forth.</description> |
547 | - </key> |
548 | - </schema> |
549 | -</schemalist> |
550 | |
551 | === removed file 'gtk/window-decorator/tests/org.mate.marco.gschema.xml' |
552 | --- gtk/window-decorator/tests/org.mate.marco.gschema.xml 2016-03-02 16:42:14 +0000 |
553 | +++ gtk/window-decorator/tests/org.mate.marco.gschema.xml 1970-01-01 00:00:00 +0000 |
554 | @@ -1,53 +0,0 @@ |
555 | -<schemalist> |
556 | - <enum id="org.mate.Marco.ActionTitlebar"> |
557 | - <value nick="toggle_shade" value="0"/> |
558 | - <value nick="toggle_maximize" value="1"/> |
559 | - <value nick="toggle_maximize_horizontally" value="2"/> |
560 | - <value nick="toggle_maximize_vertically" value="3"/> |
561 | - <value nick="minimize" value="4"/> |
562 | - <value nick="none" value="5"/> |
563 | - <value nick="lower" value="6"/> |
564 | - <value nick="menu" value="7"/> |
565 | - <value nick="last" value="8"/> |
566 | - </enum> |
567 | - <schema id="org.mate.Marco" path="/org/mate/marco/"> |
568 | - <child name="general" schema="org.mate.Marco.general"/> |
569 | - </schema> |
570 | - <schema id="org.mate.Marco.general" path="/org/mate/marco/general/"> |
571 | - <key name="button-layout" type="s"> |
572 | - <default>'menu:minimize,maximize,close'</default> |
573 | - <summary>Arrangement of buttons on the titlebar</summary> |
574 | - <description>Arrangement of buttons on the titlebar. The value should be a string, such as "menu:minimize,maximize,spacer,close"; the colon separates the left corner of the window from the right corner, and the button names are comma-separated. Duplicate buttons are not allowed. Unknown button names are silently ignored so that buttons can be added in future marco versions without breaking older versions. A special spacer tag can be used to insert some space between two adjacent buttons.</description> |
575 | - </key> |
576 | - <key name="action-double-click-titlebar" enum="org.mate.Marco.ActionTitlebar"> |
577 | - <default>'toggle_maximize'</default> |
578 | - <summary>Action on title bar double-click</summary> |
579 | - <description>This option determines the effects of double-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything.</description> |
580 | - </key> |
581 | - <key name="action-middle-click-titlebar" enum="org.mate.Marco.ActionTitlebar"> |
582 | - <default>'lower'</default> |
583 | - <summary>Action on title bar middle-click</summary> |
584 | - <description>This option determines the effects of middle-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything.</description> |
585 | - </key> |
586 | - <key name="action-right-click-titlebar" enum="org.mate.Marco.ActionTitlebar"> |
587 | - <default>'menu'</default> |
588 | - <summary>Action on title bar right-click</summary> |
589 | - <description>This option determines the effects of right-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything.</description> |
590 | - </key> |
591 | - <key name="theme" type="s"> |
592 | - <default>'Menta'</default> |
593 | - <summary>Current theme</summary> |
594 | - <description>The theme determines the appearance of window borders, titlebar, and so forth.</description> |
595 | - </key> |
596 | - <key name="titlebar-uses-system-font" type="b"> |
597 | - <default>false</default> |
598 | - <summary>Use standard system font in window titles</summary> |
599 | - <description>If true, ignore the titlebar_font option, and use the standard application font for window titles.</description> |
600 | - </key> |
601 | - <key name="titlebar-font" type="s"> |
602 | - <default>'Sans Bold 10'</default> |
603 | - <summary>Window title font</summary> |
604 | - <description>A font description string describing a font for window titlebars. The size from the description will only be used if the titlebar_font_size option is set to 0. Also, this option is disabled if the titlebar_uses_desktop_font option is set to true.</description> |
605 | - </key> |
606 | - </schema> |
607 | -</schemalist> |
608 | |
609 | === modified file 'gtk/window-decorator/tests/test_gwd_settings.cpp' |
610 | --- gtk/window-decorator/tests/test_gwd_settings.cpp 2016-05-21 20:34:55 +0000 |
611 | +++ gtk/window-decorator/tests/test_gwd_settings.cpp 2016-06-01 13:36:56 +0000 |
612 | @@ -42,7 +42,6 @@ |
613 | #include "compiz_gwd_tests.h" |
614 | |
615 | #include "gwd-settings.h" |
616 | -#include "gwd-settings-storage.h" |
617 | |
618 | using ::testing::Eq; |
619 | using ::testing::Action; |
Have some minor nits and questions