Merge lp:~compiz-team/compiz/compiz.gtk-window-decorator-gsettings.cleanup-1 into lp:compiz/0.9.8

Proposed by Sam Spilsbury
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3418
Merged at revision: 3356
Proposed branch: lp:~compiz-team/compiz/compiz.gtk-window-decorator-gsettings.cleanup-1
Merge into: lp:compiz/0.9.8
Diff against target: 2323 lines (+792/-414)
33 files modified
gtk/window-decorator/CMakeLists.txt (+69/-69)
gtk/window-decorator/frames.c (+1/-2)
gtk/window-decorator/gwd-settings-interface.c (+19/-0)
gtk/window-decorator/gwd-settings-interface.h (+3/-2)
gtk/window-decorator/gwd-settings-notified-interface.c (+19/-0)
gtk/window-decorator/gwd-settings-notified-interface.h (+3/-2)
gtk/window-decorator/gwd-settings-notified.c (+28/-9)
gtk/window-decorator/gwd-settings-notified.h (+2/-1)
gtk/window-decorator/gwd-settings-storage-gconf.c (+65/-27)
gtk/window-decorator/gwd-settings-storage-gconf.h (+2/-1)
gtk/window-decorator/gwd-settings-storage-gsettings.c (+76/-40)
gtk/window-decorator/gwd-settings-storage-gsettings.h (+2/-1)
gtk/window-decorator/gwd-settings-storage-interface.c (+19/-0)
gtk/window-decorator/gwd-settings-storage-interface.h (+4/-3)
gtk/window-decorator/gwd-settings-writable-interface.c (+43/-24)
gtk/window-decorator/gwd-settings-writable-interface.h (+58/-50)
gtk/window-decorator/gwd-settings-xproperty-interface.c (+19/-0)
gtk/window-decorator/gwd-settings-xproperty-interface.h (+3/-2)
gtk/window-decorator/gwd-settings-xproperty-storage.c (+68/-33)
gtk/window-decorator/gwd-settings-xproperty-storage.h (+4/-1)
gtk/window-decorator/gwd-settings.c (+101/-78)
gtk/window-decorator/gwd-settings.h (+4/-5)
gtk/window-decorator/metacity.c (+2/-2)
gtk/window-decorator/tests/CMakeLists.txt (+58/-58)
gtk/window-decorator/tests/compiz_gwd_mock_settings.cpp (+19/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.cpp (+19/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.h (+2/-1)
gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.cpp (+19/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.h (+2/-1)
gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.cpp (+19/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.h (+2/-1)
gtk/window-decorator/tests/compiz_gwd_tests.h.in (+19/-0)
gtk/window-decorator/tests/test_gwd_settings.cpp (+19/-1)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.gtk-window-decorator-gsettings.cleanup-1
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
Daniel van Vugt Pending
jenkins continuous-integration Pending
Review via email: mp+123464@code.launchpad.net

This proposal supersedes a proposal from 2012-09-06.

Commit message

Implements some cleanup that was suggested on the merge for the original port to gsettings

1) aligns variables and functions
2) makes functions static where they should be
3) C89 compliance

Fixes (LP: #1042323)

Description of the change

This implements some cleanup that was suggested on the merge for the original port to gsettings

1) aligns variables and functions
2) makes functions static where they should be
3) C89 compliance

Fixes (LP: #1042323)

The FFe is now acked and this branch can be merged

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Copyrights changed to 2010?

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

I saw at least one C89 conformance issue remaining, but forget that. If and when we tell the compiler to care, it will reveal all such problems for us.

Please just fix the copyright year.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Thanks, I'll do that when I get home. We also need to merge this one into lp:~compiz-team/compiz/compiz.gtk-window-decorator.fix-metacity-cairo (for some reason it didn't get pushed up yesterday)

Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote : Posted in a previous version of this proposal
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Already approved, resubmitted without prereq

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/window-decorator/CMakeLists.txt'
2--- gtk/window-decorator/CMakeLists.txt 2012-08-28 01:26:37 +0000
3+++ gtk/window-decorator/CMakeLists.txt 2012-09-10 00:56:22 +0000
4@@ -24,98 +24,98 @@
5 )
6
7 add_library (gtk_window_decorator_settings_interface STATIC
8- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-interface.c)
9+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-interface.c)
10
11 add_library (gtk_window_decorator_settings STATIC
12- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings.c)
13+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings.c)
14
15 add_library (gtk_window_decorator_settings_storage_interface STATIC
16- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-interface.c)
17+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-interface.c)
18
19 add_library (gtk_window_decorator_settings_storage_xproperty_interface STATIC
20- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-interface.c)
21+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-interface.c)
22
23 add_library (gtk_window_decorator_settings_writable_interface STATIC
24- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-writable-interface.c)
25+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-writable-interface.c)
26
27 add_library (gtk_window_decorator_settings_notified_interface
28- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified-interface.c)
29+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified-interface.c)
30
31 set (GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
32- gtk_window_decorator_settings_notified_interface
33- gtk_window_decorator_settings_interface
34- gtk_window_decorator_settings_writable_interface
35- gtk_window_decorator_settings
36- gtk_window_decorator_settings_storage_interface
37- gtk_window_decorator_settings_storage_xproperty_interface)
38+ gtk_window_decorator_settings_notified_interface
39+ gtk_window_decorator_settings_interface
40+ gtk_window_decorator_settings_writable_interface
41+ gtk_window_decorator_settings
42+ gtk_window_decorator_settings_storage_interface
43+ gtk_window_decorator_settings_storage_xproperty_interface)
44
45 if (USE_GCONF)
46- set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)
47- compiz_translate_xml (
48+ set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)
49+ compiz_translate_xml (
50 ${CMAKE_CURRENT_SOURCE_DIR}/gwd.schemas.in
51 ${gwd_schema}
52 )
53 compiz_install_gconf_schema (${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas ${SCHEMADIR})
54- add_library (gtk_window_decorator_settings_storage_gconf STATIC
55- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gconf.c)
56- list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
57- gtk_window_decorator_settings_storage_gconf)
58+ add_library (gtk_window_decorator_settings_storage_gconf STATIC
59+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gconf.c)
60+ list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
61+ gtk_window_decorator_settings_storage_gconf)
62 endif (USE_GCONF)
63
64 if (USE_GSETTINGS)
65- add_definitions (-DUSE_GSETTINGS)
66- add_library (gtk_window_decorator_settings_storage_gsettings STATIC
67- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gsettings.c)
68-
69- compiz_pkg_check_modules (GSETTINGS gio-2.0 glib-2.0)
70-
71- target_link_libraries (gtk_window_decorator_settings_storage_gsettings
72- ${GSETTINGS_LIBRARIES})
73-
74- list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
75- gtk_window_decorator_settings_storage_gsettings)
76-
77- set (_gwd_gschema_name org.compiz.gwd)
78- set (_gwd_gschema_filename ${_gwd_gschema_name}.gschema.xml)
79- set (_gwd_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_gwd_gschema_filename})
80- set (_gwd_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_gwd_gschema_filename})
81- set (_gwd_gschema_dest ${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/)
82-
83- add_custom_command (OUTPUT ${_gwd_gschema_generated_location}
84- COMMAND cp -r ${_gwd_gschema_filepath} ${_gwd_gschema_generated_location}
85- DEPENDS ${_gwd_gschema_filepath}
86- VERBATIM)
87-
88- add_custom_target (compiz_gwd_gsettings_org_compiz_gwd_schema ALL
89- DEPENDS ${_gwd_gschema_generated_location})
90-
91- add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_compiz_gwd_schema)
92-
93- compiz_install_gsettings_schema (${_gwd_gschema_generated_location}
94- ${_gwd_gschema_dest})
95+ add_definitions (-DUSE_GSETTINGS)
96+ add_library (gtk_window_decorator_settings_storage_gsettings STATIC
97+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gsettings.c)
98+
99+ compiz_pkg_check_modules (GSETTINGS gio-2.0 glib-2.0)
100+
101+ target_link_libraries (gtk_window_decorator_settings_storage_gsettings
102+ ${GSETTINGS_LIBRARIES})
103+
104+ list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
105+ gtk_window_decorator_settings_storage_gsettings)
106+
107+ set (_gwd_gschema_name org.compiz.gwd)
108+ set (_gwd_gschema_filename ${_gwd_gschema_name}.gschema.xml)
109+ set (_gwd_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_gwd_gschema_filename})
110+ set (_gwd_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_gwd_gschema_filename})
111+ set (_gwd_gschema_dest ${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/)
112+
113+ add_custom_command (OUTPUT ${_gwd_gschema_generated_location}
114+ COMMAND cp -r ${_gwd_gschema_filepath} ${_gwd_gschema_generated_location}
115+ DEPENDS ${_gwd_gschema_filepath}
116+ VERBATIM)
117+
118+ add_custom_target (compiz_gwd_gsettings_org_compiz_gwd_schema ALL
119+ DEPENDS ${_gwd_gschema_generated_location})
120+
121+ add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_compiz_gwd_schema)
122+
123+ compiz_install_gsettings_schema (${_gwd_gschema_generated_location}
124+ ${_gwd_gschema_dest})
125 endif (USE_GSETTINGS)
126
127 add_executable (gtk-window-decorator
128- gtk-window-decorator.c
129- blurprops.c
130- decorprops.c
131- cairo.c
132- frames.c
133- gdk.c
134- switcher.c
135- metacity.c
136- events.c
137- forcequit.c
138- tooltip.c
139- actionmenu.c
140- settings.c
141- util.c
142- style.c
143- wnck.c
144- decorator.c
145- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-storage.c
146- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified.c
147- ${gwd_schema}
148+ gtk-window-decorator.c
149+ blurprops.c
150+ decorprops.c
151+ cairo.c
152+ frames.c
153+ gdk.c
154+ switcher.c
155+ metacity.c
156+ events.c
157+ forcequit.c
158+ tooltip.c
159+ actionmenu.c
160+ settings.c
161+ util.c
162+ style.c
163+ wnck.c
164+ decorator.c
165+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-storage.c
166+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified.c
167+ ${gwd_schema}
168 )
169
170 add_dependencies (gtk-window-decorator decoration)
171@@ -127,7 +127,7 @@
172
173 target_link_libraries (
174 gtk-window-decorator
175- decoration
176+ decoration
177 ${GTK_WINDOW_DECORATOR_LIBRARIES}
178 ${GCONF_LIBRARIES}
179 ${DBUS_GLIB_LIBRARIES}
180
181=== modified file 'gtk/window-decorator/frames.c'
182--- gtk/window-decorator/frames.c 2012-08-27 06:39:22 +0000
183+++ gtk/window-decorator/frames.c 2012-09-10 00:56:22 +0000
184@@ -36,14 +36,13 @@
185 {
186 decor_shadow_options_t active_o, inactive_o;
187 decor_shadow_info_t *info;
188+ const gchar *titlebar_font = NULL;
189
190 gwd_decor_frame_ref (frame);
191
192 update_style (frame->style_window_rgba);
193 update_style (frame->style_window_rgb);
194
195- const gchar *titlebar_font = NULL;
196-
197 g_object_get (settings, "titlebar-font", &titlebar_font, NULL);
198
199 set_frame_scale (frame, titlebar_font);
200
201=== modified file 'gtk/window-decorator/gwd-settings-interface.c'
202--- gtk/window-decorator/gwd-settings-interface.c 2012-08-27 06:39:22 +0000
203+++ gtk/window-decorator/gwd-settings-interface.c 2012-09-10 00:56:22 +0000
204@@ -1,3 +1,22 @@
205+/*
206+ * Copyright © 2012 Canonical Ltd
207+ *
208+ * This program is free software; you can redistribute it and/or modify
209+ * it under the terms of the GNU General Public License as published by
210+ * the Free Software Foundation; either version 2 of the License, or
211+ * (at your option) any later version.
212+ *
213+ * This program is distributed in the hope that it will be useful,
214+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
215+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
216+ * GNU General Public License for more details.
217+ *
218+ * You should have received a copy of the GNU General Public License
219+ * along with this program; if not, write to the Free Software Foundation,
220+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
221+ *
222+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
223+ */
224 #include "gwd-settings-interface.h"
225
226 const gboolean USE_TOOLTIPS_DEFAULT = FALSE;
227
228=== modified file 'gtk/window-decorator/gwd-settings-interface.h'
229--- gtk/window-decorator/gwd-settings-interface.h 2012-08-20 13:27:51 +0000
230+++ gtk/window-decorator/gwd-settings-interface.h 2012-09-10 00:56:22 +0000
231@@ -1,5 +1,5 @@
232 /*
233- * Copyright © 2010 Canonical Ltd
234+ * Copyright © 2012 Canonical Ltd
235 *
236 * This program is free software; you can redistribute it and/or modify
237 * it under the terms of the GNU General Public License as published by
238@@ -14,8 +14,9 @@
239 * You should have received a copy of the GNU General Public License
240 * along with this program; if not, write to the Free Software Foundation,
241 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
242+ *
243+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
244 */
245-
246 #ifndef _COMPIZ_GWD_SETTINGS_INTERFACE_H
247 #define _COMPIZ_GWD_SETTINGS_INTERFACE_H
248
249
250=== modified file 'gtk/window-decorator/gwd-settings-notified-interface.c'
251--- gtk/window-decorator/gwd-settings-notified-interface.c 2012-08-22 09:55:00 +0000
252+++ gtk/window-decorator/gwd-settings-notified-interface.c 2012-09-10 00:56:22 +0000
253@@ -1,3 +1,22 @@
254+/*
255+ * Copyright © 2012 Canonical Ltd
256+ *
257+ * This program is free software; you can redistribute it and/or modify
258+ * it under the terms of the GNU General Public License as published by
259+ * the Free Software Foundation; either version 2 of the License, or
260+ * (at your option) any later version.
261+ *
262+ * This program is distributed in the hope that it will be useful,
263+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
264+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
265+ * GNU General Public License for more details.
266+ *
267+ * You should have received a copy of the GNU General Public License
268+ * along with this program; if not, write to the Free Software Foundation,
269+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
270+ *
271+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
272+ */
273 #include "gwd-settings-notified-interface.h"
274
275 static void gwd_settings_notified_interface_default_init (GWDSettingsNotifiedInterface *settings_interface);
276
277=== modified file 'gtk/window-decorator/gwd-settings-notified-interface.h'
278--- gtk/window-decorator/gwd-settings-notified-interface.h 2012-08-22 11:17:43 +0000
279+++ gtk/window-decorator/gwd-settings-notified-interface.h 2012-09-10 00:56:22 +0000
280@@ -1,5 +1,5 @@
281 /*
282- * Copyright © 2010 Canonical Ltd
283+ * Copyright © 2012 Canonical Ltd
284 *
285 * This program is free software; you can redistribute it and/or modify
286 * it under the terms of the GNU General Public License as published by
287@@ -14,8 +14,9 @@
288 * You should have received a copy of the GNU General Public License
289 * along with this program; if not, write to the Free Software Foundation,
290 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
291+ *
292+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
293 */
294-
295 #ifndef _COMPIZ_GWD_SETTINGS_NOTIFIED_INTERFACE_H
296 #define _COMPIZ_GWD_SETTINGS_NOTIFIED_INTERFACE_H
297
298
299=== modified file 'gtk/window-decorator/gwd-settings-notified.c'
300--- gtk/window-decorator/gwd-settings-notified.c 2012-08-31 04:33:02 +0000
301+++ gtk/window-decorator/gwd-settings-notified.c 2012-09-10 00:56:22 +0000
302@@ -1,3 +1,22 @@
303+/*
304+ * Copyright © 2012 Canonical Ltd
305+ *
306+ * This program is free software; you can redistribute it and/or modify
307+ * it under the terms of the GNU General Public License as published by
308+ * the Free Software Foundation; either version 2 of the License, or
309+ * (at your option) any later version.
310+ *
311+ * This program is distributed in the hope that it will be useful,
312+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
314+ * GNU General Public License for more details.
315+ *
316+ * You should have received a copy of the GNU General Public License
317+ * along with this program; if not, write to the Free Software Foundation,
318+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
319+ *
320+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
321+ */
322 #include <glib-object.h>
323
324 #include "gwd-settings-notified-interface.h"
325@@ -244,21 +263,21 @@
326 gwd_settings_notified_impl_new (WnckScreen *screen)
327 {
328 static const guint gwd_settings_notified_impl_n_construction_properties = 1;
329- GValue wnck_screen_value = G_VALUE_INIT;
330+ GValue wnck_screen_value = G_VALUE_INIT;
331+ GParameter params[gwd_settings_notified_impl_n_construction_properties];
332+ GWDSettingsNotified *notified = NULL;
333
334 g_value_init (&wnck_screen_value, G_TYPE_OBJECT);
335 g_value_set_object (&wnck_screen_value, G_OBJECT (screen));
336
337- GParameter params[] =
338- {
339- { "wnck-screen", wnck_screen_value }
340- };
341+ params[0].name = "wnck-screen";
342+ params[0].value = wnck_screen_value;
343
344- GWDSettingsNotified *storage = GWD_SETTINGS_NOTIFIED_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_NOTIFIED,
345- gwd_settings_notified_impl_n_construction_properties,
346- params));
347+ notified = GWD_SETTINGS_NOTIFIED_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_NOTIFIED,
348+ gwd_settings_notified_impl_n_construction_properties,
349+ params));
350
351 g_value_unset (&wnck_screen_value);
352
353- return storage;
354+ return notified;
355 }
356
357=== modified file 'gtk/window-decorator/gwd-settings-notified.h'
358--- gtk/window-decorator/gwd-settings-notified.h 2012-08-27 15:40:30 +0000
359+++ gtk/window-decorator/gwd-settings-notified.h 2012-09-10 00:56:22 +0000
360@@ -14,8 +14,9 @@
361 * You should have received a copy of the GNU General Public License
362 * along with this program; if not, write to the Free Software Foundation,
363 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
364+ *
365+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
366 */
367-
368 #ifndef _COMPIZ_GWD_SETTINGS_NOTIFIED_H
369 #define _COMPIZ_GWD_SETTINGS_NOTIFIED_H
370
371
372=== modified file 'gtk/window-decorator/gwd-settings-storage-gconf.c'
373--- gtk/window-decorator/gwd-settings-storage-gconf.c 2012-08-27 15:15:29 +0000
374+++ gtk/window-decorator/gwd-settings-storage-gconf.c 2012-09-10 00:56:22 +0000
375@@ -1,3 +1,22 @@
376+/*
377+ * Copyright © 2012 Canonical Ltd
378+ *
379+ * This program is free software; you can redistribute it and/or modify
380+ * it under the terms of the GNU General Public License as published by
381+ * the Free Software Foundation; either version 2 of the License, or
382+ * (at your option) any later version.
383+ *
384+ * This program is distributed in the hope that it will be useful,
385+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
386+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
387+ * GNU General Public License for more details.
388+ *
389+ * You should have received a copy of the GNU General Public License
390+ * along with this program; if not, write to the Free Software Foundation,
391+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
392+ *
393+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
394+ */
395 #include <glib-object.h>
396 #include <string.h>
397
398@@ -63,11 +82,12 @@
399
400 typedef struct _GWDSettingsStorageGConfPrivate
401 {
402- GConfClient *client;
403+ GConfClient *client;
404 GWDSettingsWritable *writable;
405 } GWDSettingsStorageGConfPrivate;
406
407-gboolean gwd_settings_storage_gconf_update_use_tooltips (GWDSettingsStorage *settings)
408+static gboolean
409+gwd_settings_storage_gconf_update_use_tooltips (GWDSettingsStorage *settings)
410 {
411 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
412 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
413@@ -78,7 +98,8 @@
414 NULL));
415 }
416
417-gboolean gwd_settings_storage_gconf_update_draggable_border_width (GWDSettingsStorage *settings)
418+static gboolean
419+gwd_settings_storage_gconf_update_draggable_border_width (GWDSettingsStorage *settings)
420 {
421 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
422 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
423@@ -89,7 +110,8 @@
424 NULL));
425 }
426
427-gboolean gwd_settings_storage_gconf_update_attach_modal_dialogs (GWDSettingsStorage *settings)
428+static gboolean
429+gwd_settings_storage_gconf_update_attach_modal_dialogs (GWDSettingsStorage *settings)
430 {
431 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
432 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
433@@ -100,7 +122,8 @@
434 NULL));
435 }
436
437-gboolean gwd_settings_storage_gconf_update_blur (GWDSettingsStorage *settings)
438+static gboolean
439+gwd_settings_storage_gconf_update_blur (GWDSettingsStorage *settings)
440 {
441 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
442 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
443@@ -117,7 +140,8 @@
444 return ret;
445 }
446
447-gboolean gwd_settings_storage_gconf_update_metacity_theme (GWDSettingsStorage *settings)
448+static gboolean
449+gwd_settings_storage_gconf_update_metacity_theme (GWDSettingsStorage *settings)
450 {
451 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
452 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
453@@ -138,7 +162,8 @@
454 return ret;
455 }
456
457-gboolean gwd_settings_storage_gconf_update_opacity (GWDSettingsStorage *settings)
458+static gboolean
459+gwd_settings_storage_gconf_update_opacity (GWDSettingsStorage *settings)
460 {
461 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
462 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
463@@ -158,7 +183,8 @@
464 NULL));
465 }
466
467-gboolean gwd_settings_storage_gconf_update_button_layout (GWDSettingsStorage *settings)
468+static gboolean
469+gwd_settings_storage_gconf_update_button_layout (GWDSettingsStorage *settings)
470 {
471 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
472 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
473@@ -176,7 +202,8 @@
474 return ret;
475 }
476
477-gboolean gwd_settings_storage_gconf_update_font (GWDSettingsStorage *settings)
478+static gboolean
479+gwd_settings_storage_gconf_update_font (GWDSettingsStorage *settings)
480 {
481 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
482 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
483@@ -197,7 +224,8 @@
484 return ret;
485 }
486
487-gboolean gwd_settings_storage_gconf_update_titlebar_actions (GWDSettingsStorage *settings)
488+static gboolean
489+gwd_settings_storage_gconf_update_titlebar_actions (GWDSettingsStorage *settings)
490 {
491 GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
492 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
493@@ -236,7 +264,8 @@
494 return ret;
495 }
496
497-static void gwd_settings_storage_gconf_interface_init (GWDSettingsStorageInterface *interface)
498+static void
499+gwd_settings_storage_gconf_interface_init (GWDSettingsStorageInterface *interface)
500 {
501 interface->update_use_tooltips = gwd_settings_storage_gconf_update_use_tooltips;
502 interface->update_draggable_border_width = gwd_settings_storage_gconf_update_draggable_border_width;
503@@ -249,7 +278,8 @@
504 interface->update_titlebar_actions = gwd_settings_storage_gconf_update_titlebar_actions;
505 }
506
507-static void gwd_settings_storage_gconf_dispose (GObject *object)
508+static void
509+gwd_settings_storage_gconf_dispose (GObject *object)
510 {
511 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (object);
512
513@@ -262,15 +292,17 @@
514 g_object_unref (priv->writable);
515 }
516
517-static void gwd_settings_storage_gconf_finalize (GObject *object)
518+static void
519+gwd_settings_storage_gconf_finalize (GObject *object)
520 {
521 G_OBJECT_CLASS (gwd_settings_storage_gconf_parent_class)->finalize (object);
522 }
523
524-static void gwd_settings_storage_gconf_set_property (GObject *object,
525- guint property_id,
526- const GValue *value,
527- GParamSpec *pspec)
528+static void
529+gwd_settings_storage_gconf_set_property (GObject *object,
530+ guint property_id,
531+ const GValue *value,
532+ GParamSpec *pspec)
533 {
534 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (object);
535
536@@ -285,7 +317,8 @@
537 }
538 }
539
540-static void gwd_settings_storage_gconf_class_init (GWDSettingsStorageGConfClass *klass)
541+static void
542+gwd_settings_storage_gconf_class_init (GWDSettingsStorageGConfClass *klass)
543 {
544 GObjectClass *object_class = G_OBJECT_CLASS (klass);
545
546@@ -342,7 +375,8 @@
547 gwd_settings_storage_update_use_tooltips (storage);
548 }
549
550-void gwd_settings_storage_gconf_init (GWDSettingsStorageGConf *self)
551+void
552+gwd_settings_storage_gconf_init (GWDSettingsStorageGConf *self)
553 {
554 GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (self);
555
556@@ -372,16 +406,20 @@
557 GWDSettingsStorage *
558 gwd_settings_storage_gconf_new (GWDSettingsWritable *writable)
559 {
560- GValue writable_value = G_VALUE_INIT;
561+ GValue writable_value = G_VALUE_INIT;
562+ static const guint gwd_settings_storage_gconf_n_construction_params = 1;
563+ GParameter param[gwd_settings_storage_gconf_n_construction_params];
564+ GWDSettingsStorage *storage = NULL;
565+
566 g_value_init (&writable_value, G_TYPE_POINTER);
567-
568 g_value_set_pointer (&writable_value, writable);
569
570- GParameter param[] =
571- {
572- { "writable-settings", writable_value }
573- };
574-
575- GWDSettingsStorage *storage = GWD_SETTINGS_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_GCONF, 1, param));
576+ param[0].name = "writable-settings";
577+ param[0].value = writable_value;
578+
579+ storage = GWD_SETTINGS_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_GCONF, 1, param));
580+
581+ g_value_unset (&writable_value);
582+
583 return storage;
584 }
585
586=== modified file 'gtk/window-decorator/gwd-settings-storage-gconf.h'
587--- gtk/window-decorator/gwd-settings-storage-gconf.h 2012-08-25 14:08:06 +0000
588+++ gtk/window-decorator/gwd-settings-storage-gconf.h 2012-09-10 00:56:22 +0000
589@@ -14,8 +14,9 @@
590 * You should have received a copy of the GNU General Public License
591 * along with this program; if not, write to the Free Software Foundation,
592 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
593+ *
594+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
595 */
596-
597 #ifndef _COMPIZ_GWD_SETTINGS_STORAGE_GCONF_H
598 #define _COMPIZ_GWD_SETTINGS_STORAGE_GCONF_H
599
600
601=== modified file 'gtk/window-decorator/gwd-settings-storage-gsettings.c'
602--- gtk/window-decorator/gwd-settings-storage-gsettings.c 2012-09-03 08:47:34 +0000
603+++ gtk/window-decorator/gwd-settings-storage-gsettings.c 2012-09-10 00:56:22 +0000
604@@ -1,3 +1,22 @@
605+/*
606+ * Copyright © 2012 Canonical Ltd
607+ *
608+ * This program is free software; you can redistribute it and/or modify
609+ * it under the terms of the GNU General Public License as published by
610+ * the Free Software Foundation; either version 2 of the License, or
611+ * (at your option) any later version.
612+ *
613+ * This program is distributed in the hope that it will be useful,
614+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
615+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
616+ * GNU General Public License for more details.
617+ *
618+ * You should have received a copy of the GNU General Public License
619+ * along with this program; if not, write to the Free Software Foundation,
620+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
621+ *
622+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
623+ */
624 #include <glib-object.h>
625
626 #include <gio/gio.h>
627@@ -72,7 +91,8 @@
628 GWDSettingsWritable *writable;
629 } GWDSettingsStorageGSettingsPrivate;
630
631-gboolean gwd_settings_storage_gsettings_update_use_tooltips (GWDSettingsStorage *settings)
632+static gboolean
633+gwd_settings_storage_gsettings_update_use_tooltips (GWDSettingsStorage *settings)
634 {
635 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
636 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
637@@ -85,7 +105,8 @@
638 ORG_COMPIZ_GWD_KEY_USE_TOOLTIPS));
639 }
640
641-gboolean gwd_settings_storage_gsettings_update_draggable_border_width (GWDSettingsStorage *settings)
642+static gboolean
643+gwd_settings_storage_gsettings_update_draggable_border_width (GWDSettingsStorage *settings)
644 {
645 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
646 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
647@@ -98,7 +119,8 @@
648 ORG_GNOME_MUTTER_DRAGGABLE_BORDER_WIDTH));
649 }
650
651-gboolean gwd_settings_storage_gsettings_update_attach_modal_dialogs (GWDSettingsStorage *settings)
652+static gboolean
653+gwd_settings_storage_gsettings_update_attach_modal_dialogs (GWDSettingsStorage *settings)
654 {
655 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
656 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
657@@ -111,7 +133,8 @@
658 ORG_GNOME_MUTTER_ATTACH_MODAL_DIALOGS));
659 }
660
661-gboolean gwd_settings_storage_gsettings_update_blur (GWDSettingsStorage *settings)
662+static gboolean
663+gwd_settings_storage_gsettings_update_blur (GWDSettingsStorage *settings)
664 {
665 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
666 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
667@@ -124,7 +147,8 @@
668 ORG_COMPIZ_GWD_KEY_BLUR_TYPE));
669 }
670
671-gboolean gwd_settings_storage_gsettings_update_metacity_theme (GWDSettingsStorage *settings)
672+static gboolean
673+gwd_settings_storage_gsettings_update_metacity_theme (GWDSettingsStorage *settings)
674 {
675 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
676 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
677@@ -142,7 +166,8 @@
678 ORG_GNOME_DESKTOP_WM_PREFERENCES_THEME));
679 }
680
681-gboolean gwd_settings_storage_gsettings_update_opacity (GWDSettingsStorage *settings)
682+static gboolean
683+gwd_settings_storage_gsettings_update_opacity (GWDSettingsStorage *settings)
684 {
685 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
686 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
687@@ -161,7 +186,8 @@
688 ORG_COMPIZ_GWD_KEY_METACITY_THEME_INACTIVE_SHADE_OPACITY));
689 }
690
691-gboolean gwd_settings_storage_gsettings_update_button_layout (GWDSettingsStorage *settings)
692+static gboolean
693+gwd_settings_storage_gsettings_update_button_layout (GWDSettingsStorage *settings)
694 {
695 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
696 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
697@@ -174,7 +200,8 @@
698 ORG_GNOME_DESKTOP_WM_PREFERENCES_BUTTON_LAYOUT));
699 }
700
701-gboolean gwd_settings_storage_gsettings_update_font (GWDSettingsStorage *settings)
702+static gboolean
703+gwd_settings_storage_gsettings_update_font (GWDSettingsStorage *settings)
704 {
705 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
706 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
707@@ -189,7 +216,7 @@
708 ORG_GNOME_DESKTOP_WM_PREFERENCES_TITLEBAR_FONT));
709 }
710
711-static gchar *
712+static inline gchar *
713 translate_dashes_to_underscores (const gchar *original)
714 {
715 gint i = 0;
716@@ -207,7 +234,8 @@
717 return copy;
718 }
719
720-gboolean gwd_settings_storage_gsettings_update_titlebar_actions (GWDSettingsStorage *settings)
721+static gboolean
722+gwd_settings_storage_gsettings_update_titlebar_actions (GWDSettingsStorage *settings)
723 {
724 GWDSettingsStorageGSettings *storage = GWD_SETTINGS_STORAGE_GSETTINGS (settings);
725 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (storage);
726@@ -242,7 +270,8 @@
727 g_free (right_click_action);
728 }
729
730-static void gwd_settings_storage_gsettings_interface_init (GWDSettingsStorageInterface *interface)
731+static void
732+gwd_settings_storage_gsettings_interface_init (GWDSettingsStorageInterface *interface)
733 {
734 interface->update_use_tooltips = gwd_settings_storage_gsettings_update_use_tooltips;
735 interface->update_draggable_border_width = gwd_settings_storage_gsettings_update_draggable_border_width;
736@@ -255,10 +284,11 @@
737 interface->update_titlebar_actions = gwd_settings_storage_gsettings_update_titlebar_actions;
738 }
739
740-static void gwd_settings_storage_gsettings_set_property (GObject *object,
741- guint property_id,
742- const GValue *value,
743- GParamSpec *pspec)
744+static void
745+gwd_settings_storage_gsettings_set_property (GObject *object,
746+ guint property_id,
747+ const GValue *value,
748+ GParamSpec *pspec)
749 {
750 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (object);
751
752@@ -290,7 +320,8 @@
753 }
754 }
755
756-static void gwd_settings_storage_gsettings_dispose (GObject *object)
757+static void
758+gwd_settings_storage_gsettings_dispose (GObject *object)
759 {
760 GWDSettingsStorageGSettingsPrivate *priv = GET_PRIVATE (object);
761
762@@ -306,22 +337,17 @@
763 g_object_unref (priv->gwd);
764 }
765
766-static void gwd_settings_storage_gsettings_finalize (GObject *object)
767+static void
768+gwd_settings_storage_gsettings_finalize (GObject *object)
769 {
770 G_OBJECT_CLASS (gwd_settings_storage_gsettings_parent_class)->finalize (object);
771 }
772
773-static void gwd_settings_storage_gsettings_class_init (GWDSettingsStorageGSettingsClass *klass)
774+static void
775+gwd_settings_storage_gsettings_class_init (GWDSettingsStorageGSettingsClass *klass)
776 {
777 GObjectClass *object_class = G_OBJECT_CLASS (klass);
778-
779- g_type_class_add_private (klass, sizeof (GWDSettingsStorageGSettingsPrivate));
780-
781- object_class->dispose = gwd_settings_storage_gsettings_dispose;
782- object_class->finalize = gwd_settings_storage_gsettings_finalize;
783- object_class->set_property = gwd_settings_storage_gsettings_set_property;
784-
785- GParamSpec * properties[] =
786+ GParamSpec *properties[] =
787 {
788 NULL,
789 g_param_spec_object ("desktop-gsettings",
790@@ -345,6 +371,12 @@
791 G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)
792 };
793
794+ g_type_class_add_private (klass, sizeof (GWDSettingsStorageGSettingsPrivate));
795+
796+ object_class->dispose = gwd_settings_storage_gsettings_dispose;
797+ object_class->finalize = gwd_settings_storage_gsettings_finalize;
798+ object_class->set_property = gwd_settings_storage_gsettings_set_property;
799+
800 g_object_class_install_properties (object_class,
801 sizeof (properties) / sizeof (properties[0]),
802 properties);
803@@ -361,12 +393,15 @@
804 GWDSettingsWritable *writable)
805 {
806 static const guint gwd_settings_storage_gsettings_n_construction_params = 4;
807+ GParameter param[gwd_settings_storage_gsettings_n_construction_params];
808
809 GValue desktop_value = G_VALUE_INIT;
810 GValue mutter_value = G_VALUE_INIT;
811 GValue gwd_value = G_VALUE_INIT;
812 GValue writable_value = G_VALUE_INIT;
813
814+ GWDSettingsStorage *storage = NULL;
815+
816 g_return_val_if_fail (writable != NULL, NULL);
817
818 g_value_init (&desktop_value, G_TYPE_OBJECT);
819@@ -379,17 +414,18 @@
820 g_value_take_object (&gwd_value, gwd);
821 g_value_set_pointer (&writable_value, writable);
822
823- GParameter param[] =
824- {
825- { "desktop-gsettings", desktop_value },
826- { "mutter-gsettings", mutter_value },
827- { "gwd-gsettings", gwd_value },
828- { "writable-settings", writable_value }
829- };
830+ param[0].name = "desktop-gsettings";
831+ param[0].value = desktop_value;
832+ param[1].name = "mutter-gsettings";
833+ param[1].value = mutter_value;
834+ param[2].name = "gwd-gsettings";
835+ param[2].value = gwd_value;
836+ param[3].name = "writable-settings";
837+ param[3].value = writable_value;
838
839- GWDSettingsStorage *storage = GWD_SETTINGS_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_GSETTINGS,
840- gwd_settings_storage_gsettings_n_construction_params,
841- param));
842+ storage = GWD_SETTINGS_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_GSETTINGS,
843+ gwd_settings_storage_gsettings_n_construction_params,
844+ param));
845
846 g_value_unset (&desktop_value);
847 g_value_unset (&mutter_value);
848@@ -410,12 +446,12 @@
849 static inline GSettings *
850 get_settings_no_abort (const gchar *schema)
851 {
852- static GOnce get_settings_once = G_ONCE_INIT;
853+ static GOnce get_settings_once = G_ONCE_INIT;
854+ const gchar * const * schemas;
855+ guint i = 0;
856
857 g_once (&get_settings_once, list_all_schemas, NULL);
858-
859- const gchar * const * schemas = (const gchar * const *) get_settings_once.retval;
860- guint i = 0;
861+ schemas = (const gchar * const *) get_settings_once.retval;
862
863 for (; schemas[i]; i++)
864 if (g_strcmp0 (schema, schemas[i]) == 0)
865
866=== modified file 'gtk/window-decorator/gwd-settings-storage-gsettings.h'
867--- gtk/window-decorator/gwd-settings-storage-gsettings.h 2012-08-31 04:33:02 +0000
868+++ gtk/window-decorator/gwd-settings-storage-gsettings.h 2012-09-10 00:56:22 +0000
869@@ -14,8 +14,9 @@
870 * You should have received a copy of the GNU General Public License
871 * along with this program; if not, write to the Free Software Foundation,
872 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
873+ *
874+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
875 */
876-
877 #ifndef _COMPIZ_GWD_SETTINGS_STORAGE_GSETTINGS_H
878 #define _COMPIZ_GWD_SETTINGS_STORAGE_GSETTINGS_H
879
880
881=== modified file 'gtk/window-decorator/gwd-settings-storage-interface.c'
882--- gtk/window-decorator/gwd-settings-storage-interface.c 2012-08-21 13:39:45 +0000
883+++ gtk/window-decorator/gwd-settings-storage-interface.c 2012-09-10 00:56:22 +0000
884@@ -1,3 +1,22 @@
885+/*
886+ * Copyright © 2012 Canonical Ltd
887+ *
888+ * This program is free software; you can redistribute it and/or modify
889+ * it under the terms of the GNU General Public License as published by
890+ * the Free Software Foundation; either version 2 of the License, or
891+ * (at your option) any later version.
892+ *
893+ * This program is distributed in the hope that it will be useful,
894+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
895+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
896+ * GNU General Public License for more details.
897+ *
898+ * You should have received a copy of the GNU General Public License
899+ * along with this program; if not, write to the Free Software Foundation,
900+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
901+ *
902+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
903+ */
904 #include "gwd-settings-storage-interface.h"
905
906 static void gwd_settings_storage_interface_default_init (GWDSettingsStorageInterface *settings_interface);
907
908=== modified file 'gtk/window-decorator/gwd-settings-storage-interface.h'
909--- gtk/window-decorator/gwd-settings-storage-interface.h 2012-08-21 13:09:27 +0000
910+++ gtk/window-decorator/gwd-settings-storage-interface.h 2012-09-10 00:56:22 +0000
911@@ -1,5 +1,5 @@
912 /*
913- * Copyright © 2010 Canonical Ltd
914+ * Copyright © 2012 Canonical Ltd
915 *
916 * This program is free software; you can redistribute it and/or modify
917 * it under the terms of the GNU General Public License as published by
918@@ -14,8 +14,9 @@
919 * You should have received a copy of the GNU General Public License
920 * along with this program; if not, write to the Free Software Foundation,
921 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
922+ *
923+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
924 */
925-
926 #ifndef _COMPIZ_GWD_SETTINGS_STORAGE_INTERFACE_H
927 #define _COMPIZ_GWD_SETTINGS_STORAGE_INTERFACE_H
928
929@@ -26,7 +27,7 @@
930 #define GWD_SETTINGS_STORAGE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
931 GWD_TYPE_SETTINGS_STORAGE_INTERFACE, \
932 GWDSettingsStorage))
933-#define GWD_SETTINGS_STORAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE(obj, \
934+#define GWD_SETTINGS_STORAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE (obj, \
935 GWD_TYPE_SETTINGS_STORAGE_INTERFACE, \
936 GWDSettingsStorageInterface))
937 #define GWD_TYPE_SETTINGS_STORAGE_INTERFACE (gwd_settings_storage_interface_get_type ())
938
939=== modified file 'gtk/window-decorator/gwd-settings-writable-interface.c'
940--- gtk/window-decorator/gwd-settings-writable-interface.c 2012-08-27 14:38:32 +0000
941+++ gtk/window-decorator/gwd-settings-writable-interface.c 2012-09-10 00:56:22 +0000
942@@ -1,3 +1,22 @@
943+/*
944+ * Copyright © 2012 Canonical Ltd
945+ *
946+ * This program is free software; you can redistribute it and/or modify
947+ * it under the terms of the GNU General Public License as published by
948+ * the Free Software Foundation; either version 2 of the License, or
949+ * (at your option) any later version.
950+ *
951+ * This program is distributed in the hope that it will be useful,
952+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
953+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
954+ * GNU General Public License for more details.
955+ *
956+ * You should have received a copy of the GNU General Public License
957+ * along with this program; if not, write to the Free Software Foundation,
958+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
959+ *
960+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
961+ */
962 #include "gwd-settings-writable-interface.h"
963
964 static void gwd_settings_writable_interface_default_init (GWDSettingsWritableInterface *settings_interface);
965@@ -24,16 +43,16 @@
966
967 gboolean
968 gwd_settings_writable_shadow_property_changed (GWDSettingsWritable *settings,
969- gdouble active_shadow_radius,
970- gdouble active_shadow_opacity,
971- gdouble active_shadow_offset_x,
972- gdouble active_shadow_offset_y,
973- const gchar *active_shadow_color,
974- gdouble inactive_shadow_radius,
975- gdouble inactive_shadow_opacity,
976- gdouble inactive_shadow_offset_x,
977- gdouble inactive_shadow_offset_y,
978- const gchar *inactive_shadow_color)
979+ gdouble active_shadow_radius,
980+ gdouble active_shadow_opacity,
981+ gdouble active_shadow_offset_x,
982+ gdouble active_shadow_offset_y,
983+ const gchar *active_shadow_color,
984+ gdouble inactive_shadow_radius,
985+ gdouble inactive_shadow_opacity,
986+ gdouble inactive_shadow_offset_x,
987+ gdouble inactive_shadow_offset_y,
988+ const gchar *inactive_shadow_color)
989 {
990 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
991 return (*iface->shadow_property_changed) (settings,
992@@ -51,7 +70,7 @@
993
994 gboolean
995 gwd_settings_writable_use_tooltips_changed (GWDSettingsWritable *settings,
996- gboolean use_tooltips)
997+ gboolean use_tooltips)
998 {
999 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1000 return (*iface->use_tooltips_changed) (settings, use_tooltips);
1001@@ -59,7 +78,7 @@
1002
1003 gboolean
1004 gwd_settings_writable_draggable_border_width_changed (GWDSettingsWritable *settings,
1005- gint draggable_border_width)
1006+ gint draggable_border_width)
1007 {
1008 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1009 return (*iface->draggable_border_width_changed) (settings, draggable_border_width);
1010@@ -67,7 +86,7 @@
1011
1012 gboolean
1013 gwd_settings_writable_attach_modal_dialogs_changed (GWDSettingsWritable *settings,
1014- gboolean attach_modal_dialogs)
1015+ gboolean attach_modal_dialogs)
1016 {
1017 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1018 return (*iface->attach_modal_dialogs_changed) (settings, attach_modal_dialogs);
1019@@ -83,8 +102,8 @@
1020
1021 gboolean
1022 gwd_settings_writable_metacity_theme_changed (GWDSettingsWritable *settings,
1023- gboolean use_metacity_theme,
1024- const gchar *metacity_theme)
1025+ gboolean use_metacity_theme,
1026+ const gchar *metacity_theme)
1027 {
1028 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1029 return (*iface->metacity_theme_changed) (settings, use_metacity_theme, metacity_theme);
1030@@ -92,10 +111,10 @@
1031
1032 gboolean
1033 gwd_settings_writable_opacity_changed (GWDSettingsWritable *settings,
1034- gdouble active_opacity,
1035- gdouble inactive_opacity,
1036- gboolean active_shade_opacity,
1037- gboolean inactive_shade_opacity)
1038+ gdouble active_opacity,
1039+ gdouble inactive_opacity,
1040+ gboolean active_shade_opacity,
1041+ gboolean inactive_shade_opacity)
1042 {
1043 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1044 return (*iface->opacity_changed) (settings, active_opacity, inactive_opacity, active_shade_opacity, inactive_shade_opacity);
1045@@ -103,7 +122,7 @@
1046
1047 gboolean
1048 gwd_settings_writable_button_layout_changed (GWDSettingsWritable *settings,
1049- const gchar *button_layout)
1050+ const gchar *button_layout)
1051 {
1052 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1053 return (*iface->button_layout_changed) (settings, button_layout);
1054@@ -120,10 +139,10 @@
1055
1056 gboolean
1057 gwd_settings_writable_titlebar_actions_changed (GWDSettingsWritable *settings,
1058- const gchar *action_double_click_titlebar,
1059- const gchar *action_middle_click_titlebar,
1060- const gchar *action_right_click_titlebar,
1061- const gchar *mouse_wheel_action)
1062+ const gchar *action_double_click_titlebar,
1063+ const gchar *action_middle_click_titlebar,
1064+ const gchar *action_right_click_titlebar,
1065+ const gchar *mouse_wheel_action)
1066 {
1067 GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
1068 return (*iface->titlebar_actions_changed) (settings,
1069
1070=== modified file 'gtk/window-decorator/gwd-settings-writable-interface.h'
1071--- gtk/window-decorator/gwd-settings-writable-interface.h 2012-08-27 14:38:32 +0000
1072+++ gtk/window-decorator/gwd-settings-writable-interface.h 2012-09-10 00:56:22 +0000
1073@@ -1,5 +1,5 @@
1074 /*
1075- * Copyright © 2010 Canonical Ltd
1076+ * Copyright © 2012 Canonical Ltd
1077 *
1078 * This program is free software; you can redistribute it and/or modify
1079 * it under the terms of the GNU General Public License as published by
1080@@ -14,8 +14,9 @@
1081 * You should have received a copy of the GNU General Public License
1082 * along with this program; if not, write to the Free Software Foundation,
1083 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1084+ *
1085+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1086 */
1087-
1088 #ifndef _COMPIZ_GWD_SETTINGS_WRITABLE_INTERFACE_H
1089 #define _COMPIZ_GWD_SETTINGS_WRITABLE_INTERFACE_H
1090
1091@@ -26,9 +27,9 @@
1092 #define GWD_SETTINGS_WRITABLE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
1093 GWD_TYPE_WRITABLE_SETTINGS_INTERFACE, \
1094 GWDSettingsWritable))
1095-#define GWD_SETTINGS_WRITABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE(obj, \
1096- GWD_TYPE_WRITABLE_SETTINGS_INTERFACE, \
1097- GWDSettingsWritableInterface))
1098+#define GWD_SETTINGS_WRITABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE (obj, \
1099+ GWD_TYPE_WRITABLE_SETTINGS_INTERFACE, \
1100+ GWDSettingsWritableInterface))
1101 #define GWD_TYPE_WRITABLE_SETTINGS_INTERFACE (gwd_settings_writable_interface_get_type ())
1102
1103 typedef struct _GWDSettingsWritable GWDSettingsWritable;
1104@@ -41,27 +42,34 @@
1105 void (*freeze_updates) (GWDSettingsWritable *settings);
1106 void (*thaw_updates) (GWDSettingsWritable *settings);
1107 gboolean (*shadow_property_changed) (GWDSettingsWritable *settings,
1108- gdouble active_shadow_radius,
1109- gdouble active_shadow_opacity,
1110- gdouble active_shadow_offset_x,
1111- gdouble active_shadow_offset_y,
1112- const gchar *active_shadow_color,
1113- gdouble inactive_shadow_radius,
1114- gdouble inactive_shadow_opacity,
1115- gdouble inactive_shadow_offset_x,
1116- gdouble inactive_shadow_offset_y,
1117- const gchar *inactive_shadow_color);
1118- gboolean (*use_tooltips_changed) (GWDSettingsWritable *settings, gboolean new_value);
1119- gboolean (*draggable_border_width_changed) (GWDSettingsWritable *settings, gint new_value);
1120- gboolean (*attach_modal_dialogs_changed) (GWDSettingsWritable *settings, gboolean new_value);
1121- gboolean (*blur_changed) (GWDSettingsWritable *settings, const gchar *type);
1122- gboolean (*metacity_theme_changed) (GWDSettingsWritable *settings, gboolean use_metacity_theme, const gchar *metacity_theme);
1123+ gdouble active_shadow_radius,
1124+ gdouble active_shadow_opacity,
1125+ gdouble active_shadow_offset_x,
1126+ gdouble active_shadow_offset_y,
1127+ const gchar *active_shadow_color,
1128+ gdouble inactive_shadow_radius,
1129+ gdouble inactive_shadow_opacity,
1130+ gdouble inactive_shadow_offset_x,
1131+ gdouble inactive_shadow_offset_y,
1132+ const gchar *inactive_shadow_color);
1133+ gboolean (*use_tooltips_changed) (GWDSettingsWritable *settings,
1134+ gboolean new_value);
1135+ gboolean (*draggable_border_width_changed) (GWDSettingsWritable *settings,
1136+ gint new_value);
1137+ gboolean (*attach_modal_dialogs_changed) (GWDSettingsWritable *settings,
1138+ gboolean new_value);
1139+ gboolean (*blur_changed) (GWDSettingsWritable *settings,
1140+ const gchar *type);
1141+ gboolean (*metacity_theme_changed) (GWDSettingsWritable *settings,
1142+ gboolean use_metacity_theme,
1143+ const gchar *metacity_theme);
1144 gboolean (*opacity_changed) (GWDSettingsWritable *settings,
1145- gdouble active_opacity,
1146- gdouble inactive_opacity,
1147- gboolean active_shade_opacity,
1148- gboolean inactive_shade_opacity);
1149- gboolean (*button_layout_changed) (GWDSettingsWritable *settings, const gchar *button_layout);
1150+ gdouble active_opacity,
1151+ gdouble inactive_opacity,
1152+ gboolean active_shade_opacity,
1153+ gboolean inactive_shade_opacity);
1154+ gboolean (*button_layout_changed) (GWDSettingsWritable *settings,
1155+ const gchar *button_layout);
1156 gboolean (*font_changed) (GWDSettingsWritable *settings,
1157 gboolean titlebar_uses_system_font,
1158 const gchar *titlebar_font);
1159@@ -80,48 +88,48 @@
1160
1161 gboolean
1162 gwd_settings_writable_shadow_property_changed (GWDSettingsWritable *settings,
1163- gdouble active_shadow_radius,
1164- gdouble active_shadow_opacity,
1165- gdouble active_shadow_offset_x,
1166- gdouble active_shadow_offset_y,
1167- const gchar *active_shadow_color,
1168- gdouble inactive_shadow_radius,
1169- gdouble inactive_shadow_opacity,
1170- gdouble inactive_shadow_offset_x,
1171- gdouble inactive_shadow_offset_y,
1172- const gchar *inactive_shadow_color);
1173+ gdouble active_shadow_radius,
1174+ gdouble active_shadow_opacity,
1175+ gdouble active_shadow_offset_x,
1176+ gdouble active_shadow_offset_y,
1177+ const gchar *active_shadow_color,
1178+ gdouble inactive_shadow_radius,
1179+ gdouble inactive_shadow_opacity,
1180+ gdouble inactive_shadow_offset_x,
1181+ gdouble inactive_shadow_offset_y,
1182+ const gchar *inactive_shadow_color);
1183
1184 gboolean
1185 gwd_settings_writable_use_tooltips_changed (GWDSettingsWritable *settings,
1186- gboolean use_tooltips);
1187+ gboolean use_tooltips);
1188
1189 gboolean
1190 gwd_settings_writable_draggable_border_width_changed (GWDSettingsWritable *settings,
1191- gint draggable_border_width);
1192+ gint draggable_border_width);
1193
1194 gboolean
1195 gwd_settings_writable_attach_modal_dialogs_changed (GWDSettingsWritable *settings,
1196- gboolean attach_modal_dialogs);
1197+ gboolean attach_modal_dialogs);
1198
1199 gboolean
1200 gwd_settings_writable_blur_changed (GWDSettingsWritable *settings,
1201- const gchar *blur_type);
1202+ const gchar *blur_type);
1203
1204 gboolean
1205 gwd_settings_writable_metacity_theme_changed (GWDSettingsWritable *settings,
1206- gboolean use_metacity_theme,
1207- const gchar *metacity_theme);
1208+ gboolean use_metacity_theme,
1209+ const gchar *metacity_theme);
1210
1211 gboolean
1212 gwd_settings_writable_opacity_changed (GWDSettingsWritable *settings,
1213- gdouble active_opacity,
1214- gdouble inactive_opacity,
1215- gboolean active_shade_opacity,
1216- gboolean inactive_shade_opacity);
1217+ gdouble active_opacity,
1218+ gdouble inactive_opacity,
1219+ gboolean active_shade_opacity,
1220+ gboolean inactive_shade_opacity);
1221
1222 gboolean
1223 gwd_settings_writable_button_layout_changed (GWDSettingsWritable *settings,
1224- const gchar *button_layout);
1225+ const gchar *button_layout);
1226
1227 gboolean
1228 gwd_settings_writable_font_changed (GWDSettingsWritable *settings,
1229@@ -130,10 +138,10 @@
1230
1231 gboolean
1232 gwd_settings_writable_titlebar_actions_changed (GWDSettingsWritable *settings,
1233- const gchar *action_double_click_titlebar,
1234- const gchar *action_middle_click_titlebar,
1235- const gchar *action_right_click_titlebar,
1236- const gchar *mouse_wheel_action);
1237+ const gchar *action_double_click_titlebar,
1238+ const gchar *action_middle_click_titlebar,
1239+ const gchar *action_right_click_titlebar,
1240+ const gchar *mouse_wheel_action);
1241
1242 GType gwd_settings_writable_interface_get_type (void);
1243
1244
1245=== modified file 'gtk/window-decorator/gwd-settings-xproperty-interface.c'
1246--- gtk/window-decorator/gwd-settings-xproperty-interface.c 2012-08-28 04:45:17 +0000
1247+++ gtk/window-decorator/gwd-settings-xproperty-interface.c 2012-09-10 00:56:22 +0000
1248@@ -1,3 +1,22 @@
1249+/*
1250+ * Copyright © 2012 Canonical Ltd
1251+ *
1252+ * This program is free software; you can redistribute it and/or modify
1253+ * it under the terms of the GNU General Public License as published by
1254+ * the Free Software Foundation; either version 2 of the License, or
1255+ * (at your option) any later version.
1256+ *
1257+ * This program is distributed in the hope that it will be useful,
1258+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1259+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1260+ * GNU General Public License for more details.
1261+ *
1262+ * You should have received a copy of the GNU General Public License
1263+ * along with this program; if not, write to the Free Software Foundation,
1264+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1265+ *
1266+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1267+ */
1268 #include "gwd-settings-xproperty-interface.h"
1269
1270 static void gwd_settings_xproperty_storage_interface_default_init (GWDSettingsXPropertyStorageInterface *settings_interface);
1271
1272=== modified file 'gtk/window-decorator/gwd-settings-xproperty-interface.h'
1273--- gtk/window-decorator/gwd-settings-xproperty-interface.h 2012-08-28 04:45:17 +0000
1274+++ gtk/window-decorator/gwd-settings-xproperty-interface.h 2012-09-10 00:56:22 +0000
1275@@ -1,5 +1,5 @@
1276 /*
1277- * Copyright © 2010 Canonical Ltd
1278+ * Copyright © 2012 Canonical Ltd
1279 *
1280 * This program is free software; you can redistribute it and/or modify
1281 * it under the terms of the GNU General Public License as published by
1282@@ -14,8 +14,9 @@
1283 * You should have received a copy of the GNU General Public License
1284 * along with this program; if not, write to the Free Software Foundation,
1285 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1286+ *
1287+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1288 */
1289-
1290 #ifndef _COMPIZ_GWD_SETTINGS_XPROPERTY_STORAGE_INTERFACE_H
1291 #define _COMPIZ_GWD_SETTINGS_XPROPERTY_STORAGE_INTERFACE_H
1292
1293
1294=== modified file 'gtk/window-decorator/gwd-settings-xproperty-storage.c'
1295--- gtk/window-decorator/gwd-settings-xproperty-storage.c 2012-08-31 04:33:02 +0000
1296+++ gtk/window-decorator/gwd-settings-xproperty-storage.c 2012-09-10 00:56:22 +0000
1297@@ -1,3 +1,22 @@
1298+/*
1299+ * Copyright © 2012 Canonical Ltd
1300+ *
1301+ * This program is free software; you can redistribute it and/or modify
1302+ * it under the terms of the GNU General Public License as published by
1303+ * the Free Software Foundation; either version 2 of the License, or
1304+ * (at your option) any later version.
1305+ *
1306+ * This program is distributed in the hope that it will be useful,
1307+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1308+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1309+ * GNU General Public License for more details.
1310+ *
1311+ * You should have received a copy of the GNU General Public License
1312+ * along with this program; if not, write to the Free Software Foundation,
1313+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1314+ *
1315+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1316+ */
1317 #include <glib-object.h>
1318 #include <string.h>
1319
1320@@ -40,34 +59,35 @@
1321
1322 typedef struct _GWDSettingsStorageXPropPrivate
1323 {
1324- Display *xdpy;
1325- Window root;
1326+ Display *xdpy;
1327+ Window root;
1328 GWDSettingsWritable *writable;
1329
1330 } GWDSettingsStorageXPropPrivate;
1331
1332-static gboolean gwd_settings_storage_xprop_update_all (GWDSettingsXPropertyStorage *storage)
1333+static gboolean
1334+gwd_settings_storage_xprop_update_all (GWDSettingsXPropertyStorage *storage)
1335 {
1336- GWDSettingsStorageXProp *xprop = GWD_SETTINGS_STORAGE_XPROP (storage);
1337+ GWDSettingsStorageXProp *xprop = GWD_SETTINGS_STORAGE_XPROP (storage);
1338 GWDSettingsStorageXPropPrivate *priv = GET_PRIVATE (xprop);
1339
1340- Atom actual;
1341- int result, format;
1342+ Atom actual;
1343+ int result, format;
1344 unsigned long n, left;
1345 unsigned char *prop_data;
1346 XTextProperty shadow_color_xtp;
1347
1348 gdouble aradius;
1349 gdouble aopacity;
1350- gint ax_off;
1351- gint ay_off;
1352- char *active_shadow_color = NULL;
1353+ gint ax_off;
1354+ gint ay_off;
1355+ char *active_shadow_color = NULL;
1356
1357 gdouble iradius;
1358 gdouble iopacity;
1359- gint ix_off;
1360- gint iy_off;
1361- char *inactive_shadow_color = NULL;
1362+ gint ix_off;
1363+ gint iy_off;
1364+ char *inactive_shadow_color = NULL;
1365
1366 result = XGetWindowProperty (priv->xdpy, priv->root, compiz_shadow_info_atom,
1367 0, 32768, 0, XA_INTEGER, &actual,
1368@@ -143,12 +163,14 @@
1369 inactive_shadow_color);
1370 }
1371
1372-static void gwd_settings_storage_xprop_interface_init (GWDSettingsXPropertyStorageInterface *interface)
1373+static void
1374+gwd_settings_storage_xprop_interface_init (GWDSettingsXPropertyStorageInterface *interface)
1375 {
1376 interface->update_all = gwd_settings_storage_xprop_update_all;
1377 }
1378
1379-static void gwd_settings_storage_xprop_dispose (GObject *object)
1380+static void
1381+gwd_settings_storage_xprop_dispose (GObject *object)
1382 {
1383 GWDSettingsStorageXPropPrivate *priv = GET_PRIVATE (object);
1384
1385@@ -158,15 +180,17 @@
1386 g_object_unref (priv->writable);
1387 }
1388
1389-static void gwd_settings_storage_xprop_finalize (GObject *object)
1390+static void
1391+gwd_settings_storage_xprop_finalize (GObject *object)
1392 {
1393 G_OBJECT_CLASS (gwd_settings_storage_xprop_parent_class)->finalize (object);
1394 }
1395
1396-static void gwd_settings_storage_xprop_set_property (GObject *object,
1397- guint property_id,
1398- const GValue *value,
1399- GParamSpec *pspec)
1400+static void
1401+gwd_settings_storage_xprop_set_property (GObject *object,
1402+ guint property_id,
1403+ const GValue *value,
1404+ GParamSpec *pspec)
1405 {
1406 GWDSettingsStorageXPropPrivate *priv = GET_PRIVATE (object);
1407
1408@@ -189,7 +213,8 @@
1409 }
1410 }
1411
1412-static void gwd_settings_storage_xprop_class_init (GWDSettingsStorageXPropClass *klass)
1413+static void
1414+gwd_settings_storage_xprop_class_init (GWDSettingsStorageXPropClass *klass)
1415 {
1416 GObjectClass *object_class = G_OBJECT_CLASS (klass);
1417
1418@@ -225,7 +250,8 @@
1419 G_PARAM_CONSTRUCT_ONLY));
1420 }
1421
1422-void gwd_settings_storage_xprop_init (GWDSettingsStorageXProp *self)
1423+static void
1424+gwd_settings_storage_xprop_init (GWDSettingsStorageXProp *self)
1425 {
1426 }
1427
1428@@ -234,9 +260,15 @@
1429 Window root,
1430 GWDSettingsWritable *writable)
1431 {
1432+ static const guint gwd_settings_xprop_storage_n_construction_params = 3;
1433+ GParameter param[gwd_settings_xprop_storage_n_construction_params];
1434+ GWDSettingsXPropertyStorage *storage = NULL;
1435+
1436 GValue display_value = G_VALUE_INIT;
1437 GValue root_window_value = G_VALUE_INIT;
1438 GValue writable_value = G_VALUE_INIT;
1439+
1440+
1441 g_value_init (&display_value, G_TYPE_POINTER);
1442 g_value_init (&root_window_value, G_TYPE_INT);
1443 g_value_init (&writable_value, G_TYPE_POINTER);
1444@@ -245,17 +277,20 @@
1445 g_value_set_int (&root_window_value, root);
1446 g_value_set_pointer (&writable_value, writable);
1447
1448- static const guint gwd_settings_xprop_storage_n_construction_params = 3;
1449-
1450- GParameter param[] =
1451- {
1452- { "writable-settings", writable_value },
1453- { "display", display_value },
1454- { "root-window", root_window_value }
1455- };
1456-
1457- GWDSettingsXPropertyStorage *storage = GWD_SETTINGS_XPROPERTY_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_XPROP,
1458- gwd_settings_xprop_storage_n_construction_params,
1459- param));
1460+ param[0].name = "writable-settings";
1461+ param[0].value = writable_value;
1462+ param[1].name = "display";
1463+ param[1].value = display_value;
1464+ param[2].name = "root-window";
1465+ param[2].value = root_window_value;
1466+
1467+ storage = GWD_SETTINGS_XPROPERTY_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_XPROP,
1468+ gwd_settings_xprop_storage_n_construction_params,
1469+ param));
1470+
1471+ g_value_unset (&display_value);
1472+ g_value_unset (&root_window_value);
1473+ g_value_unset (&writable_value);
1474+
1475 return storage;
1476 }
1477
1478=== modified file 'gtk/window-decorator/gwd-settings-xproperty-storage.h'
1479--- gtk/window-decorator/gwd-settings-xproperty-storage.h 2012-08-28 04:45:17 +0000
1480+++ gtk/window-decorator/gwd-settings-xproperty-storage.h 2012-09-10 00:56:22 +0000
1481@@ -14,8 +14,9 @@
1482 * You should have received a copy of the GNU General Public License
1483 * along with this program; if not, write to the Free Software Foundation,
1484 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1485+ *
1486+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1487 */
1488-
1489 #ifndef _COMPIZ_GWD_SETTINGS_STORAGE_XPROP_H
1490 #define _COMPIZ_GWD_SETTINGS_STORAGE_XPROP_H
1491
1492@@ -23,6 +24,8 @@
1493
1494 typedef struct _GWDSettingsWritable GWDSettingsWritable;
1495 typedef struct _GWDSettingsXPropertyStorage GWDSettingsXPropertyStorage;
1496+typedef struct _XDisplay Display;
1497+typedef unsigned long Window;
1498
1499 G_BEGIN_DECLS
1500
1501
1502=== modified file 'gtk/window-decorator/gwd-settings.c'
1503--- gtk/window-decorator/gwd-settings.c 2012-09-03 08:47:34 +0000
1504+++ gtk/window-decorator/gwd-settings.c 2012-09-10 00:56:22 +0000
1505@@ -1,3 +1,22 @@
1506+/*
1507+ * Copyright © 2012 Canonical Ltd
1508+ *
1509+ * This program is free software; you can redistribute it and/or modify
1510+ * it under the terms of the GNU General Public License as published by
1511+ * the Free Software Foundation; either version 2 of the License, or
1512+ * (at your option) any later version.
1513+ *
1514+ * This program is distributed in the hope that it will be useful,
1515+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1516+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1517+ * GNU General Public License for more details.
1518+ *
1519+ * You should have received a copy of the GNU General Public License
1520+ * along with this program; if not, write to the Free Software Foundation,
1521+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1522+ *
1523+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1524+ */
1525 #include <glib-object.h>
1526
1527 #include <stdlib.h>
1528@@ -65,10 +84,6 @@
1529 CMDLINE_THEME = (1 << 1)
1530 };
1531
1532-/* Always N command line parameters + 2 for command line
1533- * options enum & notified */
1534-const guint GWD_SETTINGS_IMPL_N_CONSTRUCTION_PARAMS = 4;
1535-
1536 typedef gboolean (*NotifyFunc) (GWDSettingsNotified *);
1537
1538 typedef struct _GWDSettingsImplPrivate
1539@@ -147,12 +162,12 @@
1540 gdouble inactive_shadow_offset_y,
1541 const gchar *inactive_shadow_color)
1542 {
1543- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1544+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1545 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1546
1547 decor_shadow_options_t active_shadow, inactive_shadow;
1548-
1549- unsigned int c[4];
1550+ unsigned int c[4];
1551+ gboolean changed = FALSE;
1552
1553 active_shadow.shadow_radius = active_shadow_radius;
1554 active_shadow.shadow_opacity = active_shadow_opacity;
1555@@ -186,8 +201,6 @@
1556 inactive_shadow.shadow_offset_x = inactive_shadow_offset_x;
1557 inactive_shadow.shadow_offset_y = inactive_shadow_offset_y;
1558
1559- gboolean changed = FALSE;
1560-
1561 if (decor_shadow_options_cmp (&priv->inactive_shadow,
1562 &inactive_shadow))
1563 {
1564@@ -211,11 +224,11 @@
1565 return changed;
1566 }
1567
1568-gboolean
1569+static gboolean
1570 gwd_settings_use_tooltips_changed (GWDSettingsWritable *settings,
1571- gboolean use_tooltips)
1572+ gboolean use_tooltips)
1573 {
1574- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1575+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1576 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1577
1578 if (priv->use_tooltips != use_tooltips)
1579@@ -229,11 +242,11 @@
1580 return FALSE;
1581 }
1582
1583-gboolean
1584+static gboolean
1585 gwd_settings_draggable_border_width_changed (GWDSettingsWritable *settings,
1586- gint draggable_border_width)
1587+ gint draggable_border_width)
1588 {
1589- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1590+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1591 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1592
1593 if (priv->draggable_border_width != draggable_border_width)
1594@@ -247,11 +260,11 @@
1595 return FALSE;
1596 }
1597
1598-gboolean
1599+static gboolean
1600 gwd_settings_attach_modal_dialogs_changed (GWDSettingsWritable *settings,
1601- gboolean attach_modal_dialogs)
1602+ gboolean attach_modal_dialogs)
1603 {
1604- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1605+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1606 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1607
1608 if (priv->attach_modal_dialogs != attach_modal_dialogs)
1609@@ -265,12 +278,12 @@
1610 return FALSE;
1611 }
1612
1613-gboolean
1614+static gboolean
1615 gwd_settings_blur_changed (GWDSettingsWritable *settings,
1616- const gchar *type)
1617+ const gchar *type)
1618
1619 {
1620- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1621+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1622 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1623 gint new_type = -1;
1624
1625@@ -302,7 +315,7 @@
1626 free_and_set_metacity_theme (GWDSettingsWritable *settings,
1627 const gchar *metacity_theme)
1628 {
1629- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1630+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1631 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1632
1633 if (priv->metacity_theme)
1634@@ -311,12 +324,12 @@
1635 priv->metacity_theme = g_strdup (metacity_theme);
1636 }
1637
1638-gboolean
1639+static gboolean
1640 gwd_settings_metacity_theme_changed (GWDSettingsWritable *settings,
1641- gboolean use_metacity_theme,
1642- const gchar *metacity_theme)
1643+ gboolean use_metacity_theme,
1644+ const gchar *metacity_theme)
1645 {
1646- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1647+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1648 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1649
1650 if (priv->cmdline_opts & CMDLINE_THEME)
1651@@ -342,14 +355,14 @@
1652 return TRUE;
1653 }
1654
1655-gboolean
1656+static gboolean
1657 gwd_settings_opacity_changed (GWDSettingsWritable *settings,
1658- gdouble inactive_opacity,
1659- gdouble active_opacity,
1660- gboolean inactive_shade_opacity,
1661- gboolean active_shade_opacity)
1662+ gdouble inactive_opacity,
1663+ gdouble active_opacity,
1664+ gboolean inactive_shade_opacity,
1665+ gboolean active_shade_opacity)
1666 {
1667- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1668+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1669 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1670
1671 if (priv->metacity_active_opacity == active_opacity &&
1672@@ -369,11 +382,11 @@
1673 return TRUE;
1674 }
1675
1676-gboolean
1677+static gboolean
1678 gwd_settings_button_layout_changed (GWDSettingsWritable *settings,
1679- const gchar *button_layout)
1680+ const gchar *button_layout)
1681 {
1682- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1683+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1684 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1685
1686 if (!button_layout)
1687@@ -394,20 +407,20 @@
1688 return TRUE;
1689 }
1690
1691-gboolean
1692+static gboolean
1693 gwd_settings_font_changed (GWDSettingsWritable *settings,
1694- gboolean titlebar_uses_system_font,
1695- const gchar *titlebar_font)
1696+ gboolean titlebar_uses_system_font,
1697+ const gchar *titlebar_font)
1698 {
1699- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1700+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1701 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1702
1703- if (!titlebar_font)
1704- return FALSE;
1705-
1706 const gchar *no_font = NULL;
1707 const gchar *use_font = NULL;
1708
1709+ if (!titlebar_font)
1710+ return FALSE;
1711+
1712 if (titlebar_uses_system_font)
1713 use_font = no_font;
1714 else
1715@@ -489,14 +502,14 @@
1716 return TRUE;
1717 }
1718
1719-gboolean
1720+static gboolean
1721 gwd_settings_actions_changed (GWDSettingsWritable *settings,
1722- const gchar *action_double_click_titlebar,
1723- const gchar *action_middle_click_titlebar,
1724- const gchar *action_right_click_titlebar,
1725- const gchar *mouse_wheel_action)
1726+ const gchar *action_double_click_titlebar,
1727+ const gchar *action_middle_click_titlebar,
1728+ const gchar *action_right_click_titlebar,
1729+ const gchar *mouse_wheel_action)
1730 {
1731- GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1732+ GWDSettingsImpl *settings_impl = GWD_SETTINGS_IMPL (settings);
1733 GWDSettingsImplPrivate *priv = GET_PRIVATE (settings_impl);
1734
1735 gboolean ret = FALSE;
1736@@ -517,13 +530,15 @@
1737 return ret;
1738 }
1739
1740-static void gwd_settings_freeze_updates (GWDSettingsWritable *writable)
1741+static void
1742+gwd_settings_freeze_updates (GWDSettingsWritable *writable)
1743 {
1744 GWDSettingsImplPrivate *priv = GET_PRIVATE (writable);
1745 priv->freeze_count++;
1746 }
1747
1748-static void gwd_settings_thaw_updates (GWDSettingsWritable *writable)
1749+static void
1750+gwd_settings_thaw_updates (GWDSettingsWritable *writable)
1751 {
1752 GWDSettingsImplPrivate *priv = GET_PRIVATE (writable);
1753
1754@@ -533,7 +548,8 @@
1755 release_notify_funcs (GWD_SETTINGS_IMPL (writable));
1756 }
1757
1758-static void gwd_settings_writable_interface_init (GWDSettingsWritableInterface *interface)
1759+static void
1760+gwd_settings_writable_interface_init (GWDSettingsWritableInterface *interface)
1761 {
1762 interface->shadow_property_changed = gwd_settings_shadow_property_changed;
1763 interface->use_tooltips_changed = gwd_settings_use_tooltips_changed;
1764@@ -549,16 +565,19 @@
1765 interface->thaw_updates = gwd_settings_thaw_updates;
1766 }
1767
1768-static void gwd_settings_interface_init (GWDSettingsInterface *interface)
1769+static void
1770+gwd_settings_interface_init (GWDSettingsInterface *interface)
1771 {
1772 }
1773
1774-static void gwd_settings_dispose (GObject *object)
1775+static void
1776+gwd_settings_dispose (GObject *object)
1777 {
1778 G_OBJECT_CLASS (gwd_settings_impl_parent_class)->dispose (object);
1779 }
1780
1781-static void gwd_settings_finalize (GObject *object)
1782+static void
1783+gwd_settings_finalize (GObject *object)
1784 {
1785 GWDSettingsImplPrivate *priv = GET_PRIVATE (object);
1786 G_OBJECT_CLASS (gwd_settings_impl_parent_class)->finalize (object);
1787@@ -588,10 +607,11 @@
1788 }
1789 }
1790
1791-static void gwd_settings_set_property (GObject *object,
1792- guint property_id,
1793- const GValue *value,
1794- GParamSpec *pspec)
1795+static void
1796+gwd_settings_set_property (GObject *object,
1797+ guint property_id,
1798+ const GValue *value,
1799+ GParamSpec *pspec)
1800 {
1801 GWDSettingsImplPrivate *priv = GET_PRIVATE (object);
1802
1803@@ -617,10 +637,11 @@
1804 }
1805 }
1806
1807-static void gwd_settings_get_property (GObject *object,
1808- guint property_id,
1809- GValue *value,
1810- GParamSpec *pspec)
1811+static void
1812+gwd_settings_get_property (GObject *object,
1813+ guint property_id,
1814+ GValue *value,
1815+ GParamSpec *pspec)
1816 {
1817 GWDSettingsImplPrivate *priv = GET_PRIVATE (object);
1818
1819@@ -683,7 +704,8 @@
1820 }
1821 }
1822
1823-static void gwd_settings_impl_class_init (GWDSettingsImplClass *klass)
1824+static void
1825+gwd_settings_impl_class_init (GWDSettingsImplClass *klass)
1826 {
1827 GObjectClass *object_class = G_OBJECT_CLASS (klass);
1828
1829@@ -804,7 +826,6 @@
1830
1831 /* Append all notify funcs so that external state can be updated in case
1832 * the settings backend can't do it itself */
1833-
1834 append_to_notify_funcs (self, gwd_settings_notified_update_metacity_theme);
1835 append_to_notify_funcs (self, gwd_settings_notified_metacity_button_layout);
1836 append_to_notify_funcs (self, gwd_settings_notified_update_frames);
1837@@ -831,8 +852,8 @@
1838
1839 static gboolean
1840 set_metacity_theme_construction_value (const gchar **metacity_theme,
1841- GParameter *params,
1842- GValue *metacity_theme_value)
1843+ GParameter *params,
1844+ GValue *metacity_theme_value)
1845 {
1846 if (metacity_theme)
1847 {
1848@@ -848,7 +869,9 @@
1849 }
1850
1851 static guint
1852-set_flag_and_increment (guint n_param, guint *flags, guint flag)
1853+set_flag_and_increment (guint n_param,
1854+ guint *flags,
1855+ guint flag)
1856 {
1857 if (!flags)
1858 return n_param;
1859@@ -858,13 +881,18 @@
1860 }
1861
1862 GWDSettings *
1863-gwd_settings_impl_new (gint *blur,
1864- const gchar **metacity_theme,
1865+gwd_settings_impl_new (gint *blur,
1866+ const gchar **metacity_theme,
1867 GWDSettingsNotified *notified)
1868 {
1869- int n_param = 0;
1870+ /* Always N command line parameters + 2 for command line
1871+ * options enum & notified */
1872+ const guint gwd_settings_impl_n_construction_params = 4;
1873+ GParameter param[gwd_settings_impl_n_construction_params];
1874+ GWDSettings *settings = NULL;
1875+
1876+ int n_param = 0;
1877 guint cmdline_opts = 0;
1878- GParameter param[GWD_SETTINGS_IMPL_N_CONSTRUCTION_PARAMS];
1879
1880 GValue blur_value = G_VALUE_INIT;
1881 GValue metacity_theme_value = G_VALUE_INIT;
1882@@ -896,16 +924,11 @@
1883
1884 n_param++;
1885
1886- GWDSettingsImpl *settings = GWD_SETTINGS_IMPL (g_object_newv (GWD_TYPE_SETTINGS_IMPL, n_param, param));
1887+ settings = GWD_SETTINGS_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_IMPL, n_param, param));
1888
1889 g_value_unset (&blur_value);
1890 g_value_unset (&metacity_theme_value);
1891 g_value_unset (&cmdline_opts_value);
1892
1893- return GWD_SETTINGS_INTERFACE (settings);
1894+ return settings;
1895 }
1896-
1897-
1898-
1899-
1900-
1901
1902=== modified file 'gtk/window-decorator/gwd-settings.h'
1903--- gtk/window-decorator/gwd-settings.h 2012-08-27 06:39:22 +0000
1904+++ gtk/window-decorator/gwd-settings.h 2012-09-10 00:56:22 +0000
1905@@ -14,8 +14,9 @@
1906 * You should have received a copy of the GNU General Public License
1907 * along with this program; if not, write to the Free Software Foundation,
1908 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1909+ *
1910+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
1911 */
1912-
1913 #ifndef _COMPIZ_GWD_SETTINGS_H
1914 #define _COMPIZ_GWD_SETTINGS_H
1915
1916@@ -30,12 +31,10 @@
1917 GType gwd_settings_impl_get_type ();
1918
1919 GWDSettings *
1920-gwd_settings_impl_new (gint *blur,
1921- const gchar **metacity_theme,
1922+gwd_settings_impl_new (gint *blur,
1923+ const gchar **metacity_theme,
1924 GWDSettingsNotified *notified);
1925
1926-extern const guint GWD_SETTINGS_IMPL_N_CONSTRUCTION_PARAMS;
1927-
1928 G_END_DECLS
1929
1930 #endif
1931
1932=== modified file 'gtk/window-decorator/metacity.c'
1933--- gtk/window-decorator/metacity.c 2012-08-27 06:39:22 +0000
1934+++ gtk/window-decorator/metacity.c 2012-09-10 00:56:22 +0000
1935@@ -52,11 +52,11 @@
1936 gint bottom_stretch_offset;
1937 gint left_stretch_offset;
1938 gint right_stretch_offset;
1939+ gint mutter_draggable_border_width = 0;
1940+
1941 win_extents = frame_win_extents = d->frame->win_extents;
1942 max_win_extents = frame_max_win_extents = d->frame->max_win_extents;
1943
1944- gint mutter_draggable_border_width = 0;
1945-
1946 g_object_get (settings, "draggable-border-width", &mutter_draggable_border_width, NULL);
1947
1948 /* Add the invisible grab area padding, but only for
1949
1950=== modified file 'gtk/window-decorator/tests/CMakeLists.txt'
1951--- gtk/window-decorator/tests/CMakeLists.txt 2012-09-05 15:28:59 +0000
1952+++ gtk/window-decorator/tests/CMakeLists.txt 2012-09-10 00:56:22 +0000
1953@@ -1,15 +1,15 @@
1954 include (CompizGSettings)
1955
1956 include_directories (${CMAKE_CURRENT_SOURCE_DIR}
1957- ${CMAKE_CURRENT_SOURCE_DIR}/../
1958+ ${CMAKE_CURRENT_SOURCE_DIR}/../
1959 ${CMAKE_CURRENT_BINARY_DIR})
1960
1961 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_tests.h.in
1962- ${CMAKE_CURRENT_BINARY_DIR}/compiz_gwd_tests.h)
1963+ ${CMAKE_CURRENT_BINARY_DIR}/compiz_gwd_tests.h)
1964
1965 pkg_check_modules (COMPIZ_TEST_GTK_WINDOW_DECORATOR
1966 glib-2.0>=2.28
1967- gio-2.0>=2.25.0)
1968+ gio-2.0>=2.25.0)
1969
1970 if (COMPIZ_TEST_GTK_WINDOW_DECORATOR_FOUND)
1971
1972@@ -23,16 +23,16 @@
1973 gtk_window_decorator_settings_storage_interface)
1974
1975 add_library (gtk_window_decorator_mock_settings STATIC
1976- ${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_mock_settings.cpp)
1977+ ${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_mock_settings.cpp)
1978
1979 target_link_libraries (gtk_window_decorator_mock_settings
1980- gtk_window_decorator_settings_interface)
1981+ gtk_window_decorator_settings_interface)
1982
1983 add_library (gtk_window_decorator_mock_settings_writable STATIC
1984- ${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_mock_settings_writable.cpp)
1985+ ${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_mock_settings_writable.cpp)
1986
1987 target_link_libraries (gtk_window_decorator_mock_settings_writable
1988- gtk_window_decorator_settings_writable_interface)
1989+ gtk_window_decorator_settings_writable_interface)
1990
1991 add_library (gtk_window_decorator_mock_settings_notified STATIC
1992 ${CMAKE_CURRENT_SOURCE_DIR}/compiz_gwd_mock_settings_notified.cpp)
1993@@ -44,71 +44,71 @@
1994 ${CMAKE_CURRENT_SOURCE_DIR}/test_gwd_settings.cpp)
1995
1996 set (COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES
1997- gtk_window_decorator_settings
1998- gtk_window_decorator_mock_settings
1999- gtk_window_decorator_mock_settings_writable
2000- gtk_window_decorator_mock_settings_storage
2001- gtk_window_decorator_mock_settings_notified)
2002+ gtk_window_decorator_settings
2003+ gtk_window_decorator_mock_settings
2004+ gtk_window_decorator_mock_settings_writable
2005+ gtk_window_decorator_mock_settings_storage
2006+ gtk_window_decorator_mock_settings_notified)
2007
2008 set (COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS
2009- gtk_window_decorator_settings
2010- gtk_window_decorator_settings_interface
2011- gtk_window_decorator_settings_storage_interface
2012- gtk_window_decorator_settings_notified_interface)
2013+ gtk_window_decorator_settings
2014+ gtk_window_decorator_settings_interface
2015+ gtk_window_decorator_settings_storage_interface
2016+ gtk_window_decorator_settings_notified_interface)
2017
2018 if (USE_GSETTINGS)
2019- add_definitions (-DUSE_GSETTINGS)
2020- set (_desktop_gschema_name org.gnome.desktop.wm.preferences)
2021- set (_desktop_gschema_filename ${_desktop_gschema_name}.gschema.xml)
2022- set (_desktop_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_desktop_gschema_filename})
2023- set (_desktop_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_desktop_gschema_filename})
2024-
2025- add_custom_command (OUTPUT ${_desktop_gschema_generated_location}
2026- COMMAND cp -r ${_desktop_gschema_filepath} ${_desktop_gschema_generated_location}
2027- DEPENDS ${_desktop_gschema_filepath}
2028- VERBATIM)
2029-
2030- add_custom_target (compiz_gwd_gsettings_org_gnome_desktop_wm_preferences_schema ALL
2031- DEPENDS ${_desktop_gschema_generated_location})
2032-
2033- add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_gnome_desktop_wm_preferences_schema)
2034-
2035- set (_mutter_gschema_name org.gnome.mutter)
2036- set (_mutter_gschema_filename ${_mutter_gschema_name}.gschema.xml)
2037- set (_mutter_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_mutter_gschema_filename})
2038- set (_mutter_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_mutter_gschema_filename})
2039-
2040- add_custom_command (OUTPUT ${_mutter_gschema_generated_location}
2041- COMMAND cp -r ${_mutter_gschema_filepath} ${_mutter_gschema_generated_location}
2042- DEPENDS ${_mutter_gschema_filepath}
2043- VERBATIM)
2044-
2045- add_custom_target (compiz_gwd_gsettings_org_gnome_mutter_schema ALL
2046- DEPENDS ${_mutter_gschema_generated_location})
2047-
2048- add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_gnome_mutter_schema)
2049-
2050- set (COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES
2051- ${COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES}
2052- gtk_window_decorator_settings_storage_gsettings)
2053-
2054- set (COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS
2055- ${COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS}
2056- gtk_window_decorator_settings_storage_gsettings)
2057+ add_definitions (-DUSE_GSETTINGS)
2058+ set (_desktop_gschema_name org.gnome.desktop.wm.preferences)
2059+ set (_desktop_gschema_filename ${_desktop_gschema_name}.gschema.xml)
2060+ set (_desktop_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_desktop_gschema_filename})
2061+ set (_desktop_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_desktop_gschema_filename})
2062+
2063+ add_custom_command (OUTPUT ${_desktop_gschema_generated_location}
2064+ COMMAND cp -r ${_desktop_gschema_filepath} ${_desktop_gschema_generated_location}
2065+ DEPENDS ${_desktop_gschema_filepath}
2066+ VERBATIM)
2067+
2068+ add_custom_target (compiz_gwd_gsettings_org_gnome_desktop_wm_preferences_schema ALL
2069+ DEPENDS ${_desktop_gschema_generated_location})
2070+
2071+ add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_gnome_desktop_wm_preferences_schema)
2072+
2073+ set (_mutter_gschema_name org.gnome.mutter)
2074+ set (_mutter_gschema_filename ${_mutter_gschema_name}.gschema.xml)
2075+ set (_mutter_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_mutter_gschema_filename})
2076+ set (_mutter_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_mutter_gschema_filename})
2077+
2078+ add_custom_command (OUTPUT ${_mutter_gschema_generated_location}
2079+ COMMAND cp -r ${_mutter_gschema_filepath} ${_mutter_gschema_generated_location}
2080+ DEPENDS ${_mutter_gschema_filepath}
2081+ VERBATIM)
2082+
2083+ add_custom_target (compiz_gwd_gsettings_org_gnome_mutter_schema ALL
2084+ DEPENDS ${_mutter_gschema_generated_location})
2085+
2086+ add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_gnome_mutter_schema)
2087+
2088+ set (COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES
2089+ ${COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES}
2090+ gtk_window_decorator_settings_storage_gsettings)
2091+
2092+ set (COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS
2093+ ${COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS}
2094+ gtk_window_decorator_settings_storage_gsettings)
2095 endif (USE_GSETTINGS)
2096
2097
2098 target_link_libraries (compiz_test_gwd_settings
2099- ${COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES}
2100+ ${COMPIZ_TEST_GWD_SETTINGS_ADDITIONAL_LIBRARIES}
2101 decoration
2102- ${COMPIZ_TEST_GTK_WINDOW_DECORATOR_LIBRARIES}
2103+ ${COMPIZ_TEST_GTK_WINDOW_DECORATOR_LIBRARIES}
2104 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
2105- ${GTEST_BOTH_LIBRARIES}
2106+ ${GTEST_BOTH_LIBRARIES}
2107 ${GMOCK_LIBRARY}
2108 ${GMOCK_MAIN_LIBRARY})
2109
2110 compiz_discover_tests (compiz_test_gwd_settings
2111 COVERAGE
2112- ${COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS})
2113+ ${COMPIZ_TEST_GWD_SETTINGS_COVERAGE_TARGETS})
2114
2115 endif (COMPIZ_TEST_GTK_WINDOW_DECORATOR_FOUND)
2116
2117=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings.cpp'
2118--- gtk/window-decorator/tests/compiz_gwd_mock_settings.cpp 2012-08-21 05:37:34 +0000
2119+++ gtk/window-decorator/tests/compiz_gwd_mock_settings.cpp 2012-09-10 00:56:22 +0000
2120@@ -1,3 +1,22 @@
2121+/*
2122+ * Copyright © 2012 Canonical Ltd
2123+ *
2124+ * This program is free software; you can redistribute it and/or modify
2125+ * it under the terms of the GNU General Public License as published by
2126+ * the Free Software Foundation; either version 2 of the License, or
2127+ * (at your option) any later version.
2128+ *
2129+ * This program is distributed in the hope that it will be useful,
2130+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2131+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2132+ * GNU General Public License for more details.
2133+ *
2134+ * You should have received a copy of the GNU General Public License
2135+ * along with this program; if not, write to the Free Software Foundation,
2136+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2137+ *
2138+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2139+ */
2140 #include <gtest/gtest.h>
2141 #include <gmock/gmock.h>
2142
2143
2144=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.cpp'
2145--- gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.cpp 2012-08-22 11:17:43 +0000
2146+++ gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.cpp 2012-09-10 00:56:22 +0000
2147@@ -1,3 +1,22 @@
2148+/*
2149+ * Copyright © 2012 Canonical Ltd
2150+ *
2151+ * This program is free software; you can redistribute it and/or modify
2152+ * it under the terms of the GNU General Public License as published by
2153+ * the Free Software Foundation; either version 2 of the License, or
2154+ * (at your option) any later version.
2155+ *
2156+ * This program is distributed in the hope that it will be useful,
2157+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2158+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2159+ * GNU General Public License for more details.
2160+ *
2161+ * You should have received a copy of the GNU General Public License
2162+ * along with this program; if not, write to the Free Software Foundation,
2163+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2164+ *
2165+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2166+ */
2167 #include <gtest/gtest.h>
2168 #include <gmock/gmock.h>
2169
2170
2171=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.h'
2172--- gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.h 2012-08-22 11:17:43 +0000
2173+++ gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.h 2012-09-10 00:56:22 +0000
2174@@ -14,8 +14,9 @@
2175 * You should have received a copy of the GNU General Public License
2176 * along with this program; if not, write to the Free Software Foundation,
2177 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2178+ *
2179+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2180 */
2181-
2182 #ifndef _COMPIZ_GWD_MOCK_SETTINGS_NOTIFIED_H
2183 #define _COMPIZ_GWD_MOCK_SETTINGS_NOTIFIED_H
2184
2185
2186=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.cpp'
2187--- gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.cpp 2012-08-21 13:09:27 +0000
2188+++ gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.cpp 2012-09-10 00:56:22 +0000
2189@@ -1,3 +1,22 @@
2190+/*
2191+ * Copyright © 2012 Canonical Ltd
2192+ *
2193+ * This program is free software; you can redistribute it and/or modify
2194+ * it under the terms of the GNU General Public License as published by
2195+ * the Free Software Foundation; either version 2 of the License, or
2196+ * (at your option) any later version.
2197+ *
2198+ * This program is distributed in the hope that it will be useful,
2199+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2200+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2201+ * GNU General Public License for more details.
2202+ *
2203+ * You should have received a copy of the GNU General Public License
2204+ * along with this program; if not, write to the Free Software Foundation,
2205+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2206+ *
2207+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2208+ */
2209 #include <gtest/gtest.h>
2210 #include <gmock/gmock.h>
2211
2212
2213=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.h'
2214--- gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.h 2012-08-21 13:09:27 +0000
2215+++ gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.h 2012-09-10 00:56:22 +0000
2216@@ -14,8 +14,9 @@
2217 * You should have received a copy of the GNU General Public License
2218 * along with this program; if not, write to the Free Software Foundation,
2219 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2220+ *
2221+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2222 */
2223-
2224 #ifndef _COMPIZ_GWD_MOCK_SETTINGS_STORAGE_H
2225 #define _COMPIZ_GWD_MOCK_SETTINGS_STORAGE_H
2226
2227
2228=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.cpp'
2229--- gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.cpp 2012-08-27 14:38:32 +0000
2230+++ gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.cpp 2012-09-10 00:56:22 +0000
2231@@ -1,3 +1,22 @@
2232+/*
2233+ * Copyright © 2012 Canonical Ltd
2234+ *
2235+ * This program is free software; you can redistribute it and/or modify
2236+ * it under the terms of the GNU General Public License as published by
2237+ * the Free Software Foundation; either version 2 of the License, or
2238+ * (at your option) any later version.
2239+ *
2240+ * This program is distributed in the hope that it will be useful,
2241+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2242+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2243+ * GNU General Public License for more details.
2244+ *
2245+ * You should have received a copy of the GNU General Public License
2246+ * along with this program; if not, write to the Free Software Foundation,
2247+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2248+ *
2249+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2250+ */
2251 #include <gtest/gtest.h>
2252 #include <gmock/gmock.h>
2253
2254
2255=== modified file 'gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.h'
2256--- gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.h 2012-08-27 14:38:32 +0000
2257+++ gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.h 2012-09-10 00:56:22 +0000
2258@@ -14,8 +14,9 @@
2259 * You should have received a copy of the GNU General Public License
2260 * along with this program; if not, write to the Free Software Foundation,
2261 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2262+ *
2263+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2264 */
2265-
2266 #ifndef _COMPIZ_GWD_MOCK_SETTINGS_WRITABLE_H
2267 #define _COMPIZ_GWD_MOCK_SETTINGS_WRITABLE_H
2268
2269
2270=== modified file 'gtk/window-decorator/tests/compiz_gwd_tests.h.in'
2271--- gtk/window-decorator/tests/compiz_gwd_tests.h.in 2012-08-22 11:17:43 +0000
2272+++ gtk/window-decorator/tests/compiz_gwd_tests.h.in 2012-09-10 00:56:22 +0000
2273@@ -1,3 +1,22 @@
2274+/*
2275+ * Copyright © 2012 Canonical Ltd
2276+ *
2277+ * This program is free software; you can redistribute it and/or modify
2278+ * it under the terms of the GNU General Public License as published by
2279+ * the Free Software Foundation; either version 2 of the License, or
2280+ * (at your option) any later version.
2281+ *
2282+ * This program is distributed in the hope that it will be useful,
2283+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2284+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2285+ * GNU General Public License for more details.
2286+ *
2287+ * You should have received a copy of the GNU General Public License
2288+ * along with this program; if not, write to the Free Software Foundation,
2289+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2290+ *
2291+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2292+ */
2293 #ifndef _COMPIZ_GWD_TESTS_CONFIG_H
2294 #define _COMPIZ_GWD_TESTS_CONFIG_H
2295
2296
2297=== modified file 'gtk/window-decorator/tests/test_gwd_settings.cpp'
2298--- gtk/window-decorator/tests/test_gwd_settings.cpp 2012-09-03 11:38:26 +0000
2299+++ gtk/window-decorator/tests/test_gwd_settings.cpp 2012-09-10 00:56:22 +0000
2300@@ -1,5 +1,23 @@
2301+/*
2302+ * Copyright © 2012 Canonical Ltd
2303+ *
2304+ * This program is free software; you can redistribute it and/or modify
2305+ * it under the terms of the GNU General Public License as published by
2306+ * the Free Software Foundation; either version 2 of the License, or
2307+ * (at your option) any later version.
2308+ *
2309+ * This program is distributed in the hope that it will be useful,
2310+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2311+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2312+ * GNU General Public License for more details.
2313+ *
2314+ * You should have received a copy of the GNU General Public License
2315+ * along with this program; if not, write to the Free Software Foundation,
2316+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2317+ *
2318+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
2319+ */
2320 #include <cstring>
2321-#include <cstdio>
2322
2323 #include <tr1/tuple>
2324

Subscribers

People subscribed via source and target branches