Merge lp:~muktupavels/compiz/gtk-window-decorator-2 into lp:compiz/0.9.12

Proposed by Alberts Muktupāvels
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3876
Merged at revision: 3881
Proposed branch: lp:~muktupavels/compiz/gtk-window-decorator-2
Merge into: lp:compiz/0.9.12
Diff against target: 742 lines (+0/-658)
7 files modified
gtk/config.h.gtk.in (+0/-3)
gtk/window-decorator/CMakeLists.txt (+0/-15)
gtk/window-decorator/gtk-window-decorator.h (+0/-60)
gtk/window-decorator/gwd-settings-storage-gconf.c (+0/-425)
gtk/window-decorator/gwd-settings-storage-gconf.h (+0/-54)
gtk/window-decorator/gwd.schemas.in (+0/-92)
gtk/window-decorator/settings.c (+0/-9)
To merge this branch: bzr merge lp:~muktupavels/compiz/gtk-window-decorator-2
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Stephen M. Webb Needs Fixing
Review via email: mp+223006@code.launchpad.net

Commit message

Remove gconf from gtk-window-decorator.

Description of the change

Remove gconf from gtk-window-decorator. Metacity and Mutter is not using gconf anymore. That makes some part of gconf settings useless. Also most settings stored for gwd are referring to metacity theme, but using gconf metacity theme will not be loaded.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This is fine, but you should probably include also a migration-script (see examples in debian/compiz-gnome.migrations for users that are coming from gconf (and old metacity) in order to make them to keep their settings (when possible).

Not sure this is something that should go inside metacity itself or here, but for sure compiz should care about migrating its own decorator settings.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Hmm, any reason to drop support for older GNOME versions (< 3)? I'm not
sure if desktops like MATE are still using GConf . This code is all
conditionally compiled so it shouldn't be too much of a problem as is,
right?

On Wed, Jun 18, 2014 at 9:41 PM, Marco Trevisan (Treviño) <mail@3v1n0.net>
wrote:

> This is fine, but you should probably include also a migration-script (see
> examples in debian/compiz-gnome.migrations for users that are coming from
> gconf (and old metacity) in order to make them to keep their settings (when
> possible).
>
> Not sure this is something that should go inside metacity itself or here,
> but for sure compiz should care about migrating its own decorator settings.
> --
>
> https://code.launchpad.net/~albertsmuktupavels/compiz/gtk-window-decorator-2/+merge/223006
> Your team Compiz Maintainers is requested to review the proposed merge of
> lp:~albertsmuktupavels/compiz/gtk-window-decorator-2 into lp:compiz.
>

--
Sam Spilsbury

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

When gwd will be ported to gtk+3 then it will work only with Gnome 3.

But you are right, this is not problem.

If newest compiz versions is still used with old metacity versions and with gconf than this branch should not be merged.

I just was thinking that this part is dead and not used. If users are using old versions of other programs than probably they are using older compiz version too.

Metaciy does not use gconf since 2.34.2 and last ubuntu version with metacity < 2.34.2 is 12.04.

> Hmm, any reason to drop support for older GNOME versions (< 3)? I'm not
> sure if desktops like MATE are still using GConf . This code is all
> conditionally compiled so it shouldn't be too much of a problem as is,
> right?
>
>
> On Wed, Jun 18, 2014 at 9:41 PM, Marco Trevisan (Treviño) <mail@3v1n0.net>
> wrote:
>
> > This is fine, but you should probably include also a migration-script (see
> > examples in debian/compiz-gnome.migrations for users that are coming from
> > gconf (and old metacity) in order to make them to keep their settings (when
> > possible).
> >
> > Not sure this is something that should go inside metacity itself or here,
> > but for sure compiz should care about migrating its own decorator settings.
> > --
> >
> > https://code.launchpad.net/~albertsmuktupavels/compiz/gtk-window-
> decorator-2/+merge/223006
> > Your team Compiz Maintainers is requested to review the proposed merge of
> > lp:~albertsmuktupavels/compiz/gtk-window-decorator-2 into lp:compiz.
> >
>
>
>
> --
> Sam Spilsbury

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

> This is fine, but you should probably include also a migration-script (see
> examples in debian/compiz-gnome.migrations for users that are coming from
> gconf (and old metacity) in order to make them to keep their settings (when
> possible).
>
> Not sure this is something that should go inside metacity itself or here, but
> for sure compiz should care about migrating its own decorator settings.

Should not settings be already migrated? gwd has gsettings since 2012-09-07
http://bazaar.launchpad.net/~compiz-team/compiz/0.9.12/changes?filter_file_id=org.compiz.gwd.gsche-20120822052812-mda3pvsosfpyy0vi-1

Also trying to migrate now could cause problems for users. For example user is using gwd and has changed configuration in gsettings. Also user have old gconf configration (he has not deleted it or simply has old installation). Installing new compiz version migration script will overwrite his settings with old settings from gconf. Or this is not how migration scripts works?

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

On Wed, Jun 18, 2014 at 11:07 PM, Alberts Muktupāvels <
<email address hidden>> wrote:

> When gwd will be ported to gtk+3 then it will work only with Gnome 3.
>
> But you are right, this is not problem.
>
> If newest compiz versions is still used with old metacity versions and
> with gconf than this branch should not be merged.
>
> I just was thinking that this part is dead and not used. If users are
> using old versions of other programs than probably they are using older
> compiz version too.
>
> Metaciy does not use gconf since 2.34.2 and last ubuntu version with
> metacity < 2.34.2 is 12.04.
>

Looks like MATE is using GSettings now:
http://wiki.mate-desktop.org/docs:gsettings

If Metacity is also using GSettings then we can probably drop this codepath
- just wanted to clarify that.

>
> > Hmm, any reason to drop support for older GNOME versions (< 3)? I'm not
> > sure if desktops like MATE are still using GConf . This code is all
> > conditionally compiled so it shouldn't be too much of a problem as is,
> > right?
> >
> >
> > On Wed, Jun 18, 2014 at 9:41 PM, Marco Trevisan (Treviño) <
> mail@3v1n0.net>
> > wrote:
> >
> > > This is fine, but you should probably include also a migration-script
> (see
> > > examples in debian/compiz-gnome.migrations for users that are coming
> from
> > > gconf (and old metacity) in order to make them to keep their settings
> (when
> > > possible).
> > >
> > > Not sure this is something that should go inside metacity itself or
> here,
> > > but for sure compiz should care about migrating its own decorator
> settings.
> > > --
> > >
> > > https://code.launchpad.net/~albertsmuktupavels/compiz/gtk-window-
> > decorator-2/+merge/223006
> > > Your team Compiz Maintainers is requested to review the proposed merge
> of
> > > lp:~albertsmuktupavels/compiz/gtk-window-decorator-2 into lp:compiz.
> > >
> >
> >
> >
> > --
> > Sam Spilsbury
> --
>
> https://code.launchpad.net/~albertsmuktupavels/compiz/gtk-window-decorator-2/+merge/223006
> Your team Compiz Maintainers is requested to review the proposed merge of
> lp:~albertsmuktupavels/compiz/gtk-window-decorator-2 into lp:compiz.
>

--
Sam Spilsbury

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok, so I think we agree we can move on with this...

review: Approve
Revision history for this message
Stephen M. Webb (bregma) wrote :

This MP has a merge conflict with lp:~albertsmuktupavels/compiz/gtk-window-decorator-1 please either fix and resubmit with that branch as a prerequisite or wait until that branch lands and then fix.

review: Needs Fixing
3876. By Alberts Muktupāvels

Merge with lp:compiz

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

> This MP has a merge conflict with lp:~albertsmuktupavels/compiz/gtk-window-
> decorator-1 please either fix and resubmit with that branch as a prerequisite
> or wait until that branch lands and then fix.

Fixed.

Can somebody review gtk-window-decorator-5 and merge it? It is small fix and does not require other parts merged.

https://code.launchpad.net/~albertsmuktupavels/compiz/gtk-window-decorator-5/+merge/224651

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

I have fixed this. Can someone review this again and merge it?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok, looks fine

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/config.h.gtk.in'
2--- gtk/config.h.gtk.in 2014-06-12 21:26:33 +0000
3+++ gtk/config.h.gtk.in 2014-07-09 10:48:45 +0000
4@@ -1,7 +1,4 @@
5 /* Define to 1 if Metacity support is enabled */
6 #cmakedefine USE_METACITY 1
7
8-/* Define to 1 if Gconf support is enabled */
9-#cmakedefine USE_GCONF 1
10-
11 #define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}"
12
13=== modified file 'gtk/window-decorator/CMakeLists.txt'
14--- gtk/window-decorator/CMakeLists.txt 2012-10-06 16:11:05 +0000
15+++ gtk/window-decorator/CMakeLists.txt 2014-07-09 10:48:45 +0000
16@@ -10,7 +10,6 @@
17 ${CMAKE_BINARY_DIR}/gtk
18 ${GTK_WINDOW_DECORATOR_INCLUDE_DIRS}
19 ${METACITY_INCLUDE_DIRS}
20- ${GCONF_INCLUDE_DIRS}
21 ${DBUS_GLIB_INCLUDE_DIRS}
22 )
23
24@@ -58,19 +57,6 @@
25 gtk_window_decorator_metacity_window_decoration_util
26 gtk_window_decorator_cairo_window_decoration_util)
27
28- if (USE_GCONF)
29- set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)
30- compiz_translate_xml (
31- ${CMAKE_CURRENT_SOURCE_DIR}/gwd.schemas.in
32- ${gwd_schema}
33- )
34- compiz_install_gconf_schema (${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas ${SCHEMADIR})
35- add_library (gtk_window_decorator_settings_storage_gconf STATIC
36- ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gconf.c)
37- list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
38- gtk_window_decorator_settings_storage_gconf)
39- endif (USE_GCONF)
40-
41 if (USE_GSETTINGS)
42 add_definitions (-DUSE_GSETTINGS)
43 add_library (gtk_window_decorator_settings_storage_gsettings STATIC
44@@ -138,7 +124,6 @@
45 gtk-window-decorator
46 decoration
47 ${GTK_WINDOW_DECORATOR_LIBRARIES}
48- ${GCONF_LIBRARIES}
49 ${DBUS_GLIB_LIBRARIES}
50 ${metacitylibs}
51 ${GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES}
52
53=== modified file 'gtk/window-decorator/gtk-window-decorator.h'
54--- gtk/window-decorator/gtk-window-decorator.h 2014-06-12 21:26:33 +0000
55+++ gtk/window-decorator/gtk-window-decorator.h 2014-07-09 10:48:45 +0000
56@@ -65,10 +65,6 @@
57 #include <gdk/gdkx.h>
58 #include <gdk/gdk.h>
59
60-#ifdef USE_GCONF
61-#include <gconf/gconf-client.h>
62-#endif
63-
64 #ifdef USE_DBUS_GLIB
65 #define DBUS_API_SUBJECT_TO_CHANGE
66 #include <dbus/dbus.h>
67@@ -107,62 +103,6 @@
68
69 #include <gwd-fwd.h>
70
71-#define METACITY_GCONF_DIR "/apps/metacity/general"
72-#define MUTTER_GCONF_DIR "/apps/mutter/general"
73-
74-#define COMPIZ_USE_SYSTEM_FONT_KEY \
75-METACITY_GCONF_DIR "/titlebar_uses_system_font"
76-
77-#define COMPIZ_TITLEBAR_FONT_KEY \
78-METACITY_GCONF_DIR "/titlebar_font"
79-
80-#define COMPIZ_DOUBLE_CLICK_TITLEBAR_KEY \
81-METACITY_GCONF_DIR "/action_double_click_titlebar"
82-
83-#define COMPIZ_MIDDLE_CLICK_TITLEBAR_KEY \
84-METACITY_GCONF_DIR "/action_middle_click_titlebar"
85-
86-#define COMPIZ_RIGHT_CLICK_TITLEBAR_KEY \
87-METACITY_GCONF_DIR "/action_right_click_titlebar"
88-
89-#define MUTTER_DRAGGABLE_BORDER_WIDTH_KEY \
90-MUTTER_GCONF_DIR "/draggable_border_width"
91-
92-#define MUTTER_ATTACH_MODAL_DIALOGS_KEY \
93-MUTTER_GCONF_DIR "/attach_modal_dialogs"
94-
95-#define META_THEME_KEY \
96-METACITY_GCONF_DIR "/theme"
97-
98-#define META_BUTTON_LAYOUT_KEY \
99-METACITY_GCONF_DIR "/button_layout"
100-
101-#define GCONF_DIR "/apps/gwd"
102-
103-#define USE_META_THEME_KEY \
104-GCONF_DIR "/use_metacity_theme"
105-
106-#define META_THEME_OPACITY_KEY \
107-GCONF_DIR "/metacity_theme_opacity"
108-
109-#define META_THEME_SHADE_OPACITY_KEY \
110-GCONF_DIR "/metacity_theme_shade_opacity"
111-
112-#define META_THEME_ACTIVE_OPACITY_KEY \
113-GCONF_DIR "/metacity_theme_active_opacity"
114-
115-#define META_THEME_ACTIVE_SHADE_OPACITY_KEY \
116-GCONF_DIR "/metacity_theme_active_shade_opacity"
117-
118-#define BLUR_TYPE_KEY \
119-GCONF_DIR "/blur_type"
120-
121-#define WHEEL_ACTION_KEY \
122-GCONF_DIR "/mouse_wheel_action"
123-
124-#define USE_TOOLTIPS_KEY \
125-GCONF_DIR "/use_tooltips"
126-
127 #define DBUS_DEST "org.freedesktop.compiz"
128 #define DBUS_PATH "/org/freedesktop/compiz/decor/screen0"
129 #define DBUS_INTERFACE "org.freedesktop.compiz"
130
131=== removed file 'gtk/window-decorator/gwd-settings-storage-gconf.c'
132--- gtk/window-decorator/gwd-settings-storage-gconf.c 2012-09-06 10:08:25 +0000
133+++ gtk/window-decorator/gwd-settings-storage-gconf.c 1970-01-01 00:00:00 +0000
134@@ -1,425 +0,0 @@
135-/*
136- * Copyright © 2012 Canonical Ltd
137- *
138- * This program is free software; you can redistribute it and/or modify
139- * it under the terms of the GNU General Public License as published by
140- * the Free Software Foundation; either version 2 of the License, or
141- * (at your option) any later version.
142- *
143- * This program is distributed in the hope that it will be useful,
144- * but WITHOUT ANY WARRANTY; without even the implied warranty of
145- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
146- * GNU General Public License for more details.
147- *
148- * You should have received a copy of the GNU General Public License
149- * along with this program; if not, write to the Free Software Foundation,
150- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
151- *
152- * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
153- */
154-#include <glib-object.h>
155-#include <string.h>
156-
157-#include <gconf/gconf-client.h>
158-
159-#include "gwd-settings-writable-interface.h"
160-#include "gwd-settings-storage-interface.h"
161-#include "gwd-settings-storage-gconf.h"
162-
163-#define GWD_SETTINGS_STORAGE_GCONF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GWD_TYPE_SETTINGS_STORAGE_GCONF, GWDSettingsStorageGConf));
164-#define GWD_SETTINGS_STORAGE_GCONF_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GWD_TYPE_SETTINGS_STORAGE_GCONF, GWDSettingsStorageGConfClass));
165-#define GWD_IS_MOCK_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GWD_TYPE_SETTINGS_STORAGE_GCONF));
166-#define GWD_IS_MOCK_SETTINGS_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GWD_TYPE_SETTINGS_STORAGE_GCONF));
167-#define GWD_SETTINGS_STORAGE_GCONF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GWD_TYPE_SETTINGS_STORAGE_GCONF, GWDSettingsStorageGConfClass));
168-
169-#define MUTTER_GCONF_DEF "/apps/mutter/general"
170-#define METACITY_GCONF_DEF "/apps/metacity/general"
171-#define COMPIZ_GCONF_DEF "/apps/gwd"
172-
173-const gchar * METACITY_GCONF_DIR = METACITY_GCONF_DEF;
174-const gchar * MUTTER_GCONF_DIR = MUTTER_GCONF_DEF;
175-const gchar * COMPIZ_GCONF_DIR = COMPIZ_GCONF_DEF;
176-const gchar * COMPIZ_USE_SYSTEM_FONT_KEY = METACITY_GCONF_DEF "/titlebar_uses_system_font";
177-const gchar * COMPIZ_TITLEBAR_FONT_KEY = METACITY_GCONF_DEF "/titlebar_font";
178-const gchar * COMPIZ_DOUBLE_CLICK_TITLEBAR_KEY = METACITY_GCONF_DEF "/action_double_click_titlebar";
179-const gchar * COMPIZ_MIDDLE_CLICK_TITLEBAR_KEY = METACITY_GCONF_DEF "/action_middle_click_titlebar";
180-const gchar * COMPIZ_RIGHT_CLICK_TITLEBAR_KEY = METACITY_GCONF_DEF "/action_right_click_titlebar";
181-const gchar * MUTTER_DRAGGABLE_BORDER_WIDTH_KEY = MUTTER_GCONF_DEF "/draggable_border_width";
182-const gchar * MUTTER_ATTACH_MODAL_DIALOGS_KEY = MUTTER_GCONF_DEF "/attach_modal_dialogs";
183-const gchar * META_THEME_KEY = METACITY_GCONF_DEF "/theme";
184-const gchar * META_BUTTON_LAYOUT_KEY = METACITY_GCONF_DEF "/button_layout";
185-const gchar * COMPIZ_USE_META_THEME_KEY = COMPIZ_GCONF_DEF "/use_metacity_theme";
186-const gchar * COMPIZ_META_THEME_OPACITY_KEY = COMPIZ_GCONF_DEF "/metacity_theme_opacity";
187-const gchar * COMPIZ_META_THEME_ACTIVE_OPACITY_KEY = COMPIZ_GCONF_DEF "/metacity_theme_active_opacity";
188-const gchar * COMPIZ_META_THEME_ACTIVE_OPACITY_SHADE_KEY = COMPIZ_GCONF_DEF "/metacity_theme_active_shade_opacity";
189-const gchar * COMPIZ_META_THEME_OPACITY_SHADE_KEY = COMPIZ_GCONF_DEF "/metacity_theme_shade_opacity";
190-const gchar * COMPIZ_BLUR_TYPE_KEY = COMPIZ_GCONF_DEF "/blur_type";
191-const gchar * COMPIZ_WHEEL_ACTION_KEY = COMPIZ_GCONF_DEF "/mouse_wheel_action";
192-const gchar * COMPIZ_USE_TOOLTIPS_KEY = COMPIZ_GCONF_DEF "/use_tooltips";
193-
194-typedef struct _GWDSettingsStorageGConf
195-{
196- GObject parent;
197-} GWDSettingsStorageGConf;
198-
199-typedef struct _GWDSettingsStorageGConfClass
200-{
201- GObjectClass parent_class;
202-} GWDSettingsStorageGConfClass;
203-
204-static void gwd_settings_storage_gconf_interface_init (GWDSettingsStorageInterface *interface);
205-
206-G_DEFINE_TYPE_WITH_CODE (GWDSettingsStorageGConf, gwd_settings_storage_gconf, G_TYPE_OBJECT,
207- G_IMPLEMENT_INTERFACE (GWD_TYPE_SETTINGS_STORAGE_INTERFACE,
208- gwd_settings_storage_gconf_interface_init))
209-
210-#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GWD_TYPE_SETTINGS_STORAGE_GCONF, GWDSettingsStorageGConfPrivate))
211-
212-enum
213-{
214- GWD_SETTINGS_STORAGE_GCONF_PROPERTY_WRITABLE_SETTINGS = 1
215-};
216-
217-typedef struct _GWDSettingsStorageGConfPrivate
218-{
219- GConfClient *client;
220- GWDSettingsWritable *writable;
221-} GWDSettingsStorageGConfPrivate;
222-
223-static gboolean
224-gwd_settings_storage_gconf_update_use_tooltips (GWDSettingsStorage *settings)
225-{
226- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
227- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
228-
229- return gwd_settings_writable_use_tooltips_changed (priv->writable,
230- gconf_client_get_bool (priv->client,
231- COMPIZ_USE_TOOLTIPS_KEY,
232- NULL));
233-}
234-
235-static gboolean
236-gwd_settings_storage_gconf_update_draggable_border_width (GWDSettingsStorage *settings)
237-{
238- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
239- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
240-
241- return gwd_settings_writable_draggable_border_width_changed (priv->writable,
242- gconf_client_get_int (priv->client,
243- MUTTER_DRAGGABLE_BORDER_WIDTH_KEY,
244- NULL));
245-}
246-
247-static gboolean
248-gwd_settings_storage_gconf_update_attach_modal_dialogs (GWDSettingsStorage *settings)
249-{
250- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
251- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
252-
253- return gwd_settings_writable_attach_modal_dialogs_changed (priv->writable,
254- gconf_client_get_bool (priv->client,
255- MUTTER_ATTACH_MODAL_DIALOGS_KEY,
256- NULL));
257-}
258-
259-static gboolean
260-gwd_settings_storage_gconf_update_blur (GWDSettingsStorage *settings)
261-{
262- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
263- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
264-
265- gchar *value = gconf_client_get_string (priv->client,
266- COMPIZ_BLUR_TYPE_KEY,
267- NULL);
268-
269- gboolean ret = gwd_settings_writable_blur_changed (priv->writable, value);
270-
271- if (value)
272- g_free (value);
273-
274- return ret;
275-}
276-
277-static gboolean
278-gwd_settings_storage_gconf_update_metacity_theme (GWDSettingsStorage *settings)
279-{
280- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
281- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
282-
283- gchar *theme = gconf_client_get_string (priv->client,
284- META_THEME_KEY,
285- NULL);
286-
287- gboolean ret = gwd_settings_writable_metacity_theme_changed (priv->writable,
288- gconf_client_get_bool (priv->client,
289- COMPIZ_USE_META_THEME_KEY,
290- NULL),
291- theme);
292-
293- if (theme)
294- g_free (theme);
295-
296- return ret;
297-}
298-
299-static gboolean
300-gwd_settings_storage_gconf_update_opacity (GWDSettingsStorage *settings)
301-{
302- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
303- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
304-
305- return gwd_settings_writable_opacity_changed (priv->writable,
306- gconf_client_get_float (priv->client,
307- COMPIZ_META_THEME_ACTIVE_OPACITY_KEY,
308- NULL),
309- gconf_client_get_float (priv->client,
310- COMPIZ_META_THEME_OPACITY_KEY,
311- NULL),
312- gconf_client_get_bool (priv->client,
313- COMPIZ_META_THEME_ACTIVE_OPACITY_SHADE_KEY,
314- NULL),
315- gconf_client_get_bool (priv->client,
316- COMPIZ_META_THEME_OPACITY_SHADE_KEY,
317- NULL));
318-}
319-
320-static gboolean
321-gwd_settings_storage_gconf_update_button_layout (GWDSettingsStorage *settings)
322-{
323- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
324- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
325-
326- gchar *button_layout = gconf_client_get_string (priv->client,
327- META_BUTTON_LAYOUT_KEY,
328- NULL);
329-
330- gboolean ret = gwd_settings_writable_button_layout_changed (priv->writable,
331- button_layout);
332-
333- if (button_layout)
334- g_free (button_layout);
335-
336- return ret;
337-}
338-
339-static gboolean
340-gwd_settings_storage_gconf_update_font (GWDSettingsStorage *settings)
341-{
342- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
343- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
344-
345- gchar *font = gconf_client_get_string (priv->client,
346- COMPIZ_TITLEBAR_FONT_KEY,
347- NULL);
348-
349- gboolean ret = gwd_settings_writable_font_changed (priv->writable,
350- gconf_client_get_bool (priv->client,
351- COMPIZ_USE_SYSTEM_FONT_KEY,
352- NULL),
353- font);
354-
355- if (font)
356- g_free (font);
357-
358- return ret;
359-}
360-
361-static gboolean
362-gwd_settings_storage_gconf_update_titlebar_actions (GWDSettingsStorage *settings)
363-{
364- GWDSettingsStorageGConf *storage = GWD_SETTINGS_STORAGE_GCONF (settings);
365- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (storage);
366-
367- gchar *double_click_action = gconf_client_get_string (priv->client,
368- COMPIZ_DOUBLE_CLICK_TITLEBAR_KEY,
369- NULL);
370- gchar *middle_click_action = gconf_client_get_string (priv->client,
371- COMPIZ_MIDDLE_CLICK_TITLEBAR_KEY,
372- NULL);
373- gchar *right_click_action = gconf_client_get_string (priv->client,
374- COMPIZ_DOUBLE_CLICK_TITLEBAR_KEY,
375- NULL);
376- gchar *mouse_wheel_action = gconf_client_get_string (priv->client,
377- COMPIZ_WHEEL_ACTION_KEY,
378- NULL);
379-
380- gboolean ret = gwd_settings_writable_titlebar_actions_changed (priv->writable,
381- double_click_action,
382- middle_click_action,
383- right_click_action,
384- mouse_wheel_action);
385-
386- if (double_click_action)
387- g_free (double_click_action);
388-
389- if (middle_click_action)
390- g_free (middle_click_action);
391-
392- if (right_click_action)
393- g_free (right_click_action);
394-
395- if (mouse_wheel_action)
396- g_free (mouse_wheel_action);
397-
398- return ret;
399-}
400-
401-static void
402-gwd_settings_storage_gconf_interface_init (GWDSettingsStorageInterface *interface)
403-{
404- interface->update_use_tooltips = gwd_settings_storage_gconf_update_use_tooltips;
405- interface->update_draggable_border_width = gwd_settings_storage_gconf_update_draggable_border_width;
406- interface->update_attach_modal_dialogs = gwd_settings_storage_gconf_update_attach_modal_dialogs;
407- interface->update_blur = gwd_settings_storage_gconf_update_blur;
408- interface->update_metacity_theme = gwd_settings_storage_gconf_update_metacity_theme;
409- interface->update_opacity = gwd_settings_storage_gconf_update_opacity;
410- interface->update_button_layout = gwd_settings_storage_gconf_update_button_layout;
411- interface->update_font = gwd_settings_storage_gconf_update_font;
412- interface->update_titlebar_actions = gwd_settings_storage_gconf_update_titlebar_actions;
413-}
414-
415-static void
416-gwd_settings_storage_gconf_dispose (GObject *object)
417-{
418- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (object);
419-
420- G_OBJECT_CLASS (gwd_settings_storage_gconf_parent_class)->dispose (object);
421-
422- if (priv->client)
423- g_object_unref (priv->client);
424-
425- if (priv->writable)
426- g_object_unref (priv->writable);
427-}
428-
429-static void
430-gwd_settings_storage_gconf_finalize (GObject *object)
431-{
432- G_OBJECT_CLASS (gwd_settings_storage_gconf_parent_class)->finalize (object);
433-}
434-
435-static void
436-gwd_settings_storage_gconf_set_property (GObject *object,
437- guint property_id,
438- const GValue *value,
439- GParamSpec *pspec)
440-{
441- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (object);
442-
443- switch (property_id)
444- {
445- case GWD_SETTINGS_STORAGE_GCONF_PROPERTY_WRITABLE_SETTINGS:
446- g_return_if_fail (!priv->writable);
447- priv->writable = g_value_get_pointer (value);
448- break;
449- default:
450- break;
451- }
452-}
453-
454-static void
455-gwd_settings_storage_gconf_class_init (GWDSettingsStorageGConfClass *klass)
456-{
457- GObjectClass *object_class = G_OBJECT_CLASS (klass);
458-
459- g_type_class_add_private (klass, sizeof (GWDSettingsStorageGConfPrivate));
460-
461- object_class->dispose = gwd_settings_storage_gconf_dispose;
462- object_class->finalize = gwd_settings_storage_gconf_finalize;
463- object_class->set_property = gwd_settings_storage_gconf_set_property;
464-
465- g_object_class_install_property (object_class,
466- GWD_SETTINGS_STORAGE_GCONF_PROPERTY_WRITABLE_SETTINGS,
467- g_param_spec_pointer ("writable-settings",
468- "GWDSettingsWritable",
469- "An object that implements GWDSettingsWritable",
470- G_PARAM_WRITABLE |
471- G_PARAM_CONSTRUCT_ONLY));
472-}
473-
474-static void
475-value_changed (GConfClient *client,
476- const gchar *key,
477- GConfValue *value,
478- void *data)
479-{
480- GWDSettingsStorage *storage = GWD_SETTINGS_STORAGE_INTERFACE (data);
481-
482- if (strcmp (key, COMPIZ_USE_SYSTEM_FONT_KEY) == 0 ||
483- strcmp (key, COMPIZ_TITLEBAR_FONT_KEY) == 0)
484- gwd_settings_storage_update_font (storage);
485- else if (strcmp (key, COMPIZ_TITLEBAR_FONT_KEY) == 0)
486- gwd_settings_storage_update_font (storage);
487- else if (strcmp (key, COMPIZ_DOUBLE_CLICK_TITLEBAR_KEY) == 0 ||
488- strcmp (key, COMPIZ_MIDDLE_CLICK_TITLEBAR_KEY) == 0 ||
489- strcmp (key, COMPIZ_RIGHT_CLICK_TITLEBAR_KEY) == 0 ||
490- strcmp (key, COMPIZ_WHEEL_ACTION_KEY) == 0)
491- gwd_settings_storage_update_titlebar_actions (storage);
492- else if (strcmp (key, COMPIZ_BLUR_TYPE_KEY) == 0)
493- gwd_settings_storage_update_blur (storage);
494- else if (strcmp (key, COMPIZ_USE_META_THEME_KEY) == 0 ||
495- strcmp (key, META_THEME_KEY) == 0)
496- gwd_settings_storage_update_metacity_theme (storage);
497- else if (strcmp (key, META_BUTTON_LAYOUT_KEY) == 0)
498- gwd_settings_storage_update_button_layout (storage);
499- else if (strcmp (key, COMPIZ_META_THEME_OPACITY_KEY) == 0 ||
500- strcmp (key, COMPIZ_META_THEME_OPACITY_SHADE_KEY) == 0 ||
501- strcmp (key, COMPIZ_META_THEME_ACTIVE_OPACITY_KEY) == 0 ||
502- strcmp (key, COMPIZ_META_THEME_ACTIVE_OPACITY_SHADE_KEY) == 0)
503- gwd_settings_storage_update_opacity (storage);
504- else if (strcmp (key, MUTTER_DRAGGABLE_BORDER_WIDTH_KEY) == 0)
505- gwd_settings_storage_update_draggable_border_width (storage);
506- else if (strcmp (key, MUTTER_ATTACH_MODAL_DIALOGS_KEY) == 0)
507- gwd_settings_storage_update_attach_modal_dialogs (storage);
508- else if (strcmp (key, COMPIZ_USE_TOOLTIPS_KEY) == 0)
509- gwd_settings_storage_update_use_tooltips (storage);
510-}
511-
512-void
513-gwd_settings_storage_gconf_init (GWDSettingsStorageGConf *self)
514-{
515- GWDSettingsStorageGConfPrivate *priv = GET_PRIVATE (self);
516-
517- priv->client = gconf_client_get_default ();
518-
519- gconf_client_add_dir (priv->client,
520- COMPIZ_GCONF_DIR,
521- GCONF_CLIENT_PRELOAD_ONELEVEL,
522- NULL);
523-
524- gconf_client_add_dir (priv->client,
525- METACITY_GCONF_DIR,
526- GCONF_CLIENT_PRELOAD_ONELEVEL,
527- NULL);
528-
529- gconf_client_add_dir (priv->client,
530- MUTTER_GCONF_DIR,
531- GCONF_CLIENT_PRELOAD_ONELEVEL,
532- NULL);
533-
534- g_signal_connect (G_OBJECT (priv->client),
535- "value_changed",
536- G_CALLBACK (value_changed),
537- self);
538-}
539-
540-GWDSettingsStorage *
541-gwd_settings_storage_gconf_new (GWDSettingsWritable *writable)
542-{
543- GValue writable_value = G_VALUE_INIT;
544- static const guint gwd_settings_storage_gconf_n_construction_params = 1;
545- GParameter param[gwd_settings_storage_gconf_n_construction_params];
546- GWDSettingsStorage *storage = NULL;
547-
548- g_value_init (&writable_value, G_TYPE_POINTER);
549- g_value_set_pointer (&writable_value, writable);
550-
551- param[0].name = "writable-settings";
552- param[0].value = writable_value;
553-
554- storage = GWD_SETTINGS_STORAGE_INTERFACE (g_object_newv (GWD_TYPE_SETTINGS_STORAGE_GCONF, 1, param));
555-
556- g_value_unset (&writable_value);
557-
558- return storage;
559-}
560
561=== removed file 'gtk/window-decorator/gwd-settings-storage-gconf.h'
562--- gtk/window-decorator/gwd-settings-storage-gconf.h 2012-10-06 16:11:05 +0000
563+++ gtk/window-decorator/gwd-settings-storage-gconf.h 1970-01-01 00:00:00 +0000
564@@ -1,54 +0,0 @@
565-/*
566- * Copyright © 2012 Canonical Ltd
567- *
568- * This program is free software; you can redistribute it and/or modify
569- * it under the terms of the GNU General Public License as published by
570- * the Free Software Foundation; either version 2 of the License, or
571- * (at your option) any later version.
572- *
573- * This program is distributed in the hope that it will be useful,
574- * but WITHOUT ANY WARRANTY; without even the implied warranty of
575- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
576- * GNU General Public License for more details.
577- *
578- * You should have received a copy of the GNU General Public License
579- * along with this program; if not, write to the Free Software Foundation,
580- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
581- *
582- * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
583- */
584-#ifndef _COMPIZ_GWD_SETTINGS_STORAGE_GCONF_H
585-#define _COMPIZ_GWD_SETTINGS_STORAGE_GCONF_H
586-
587-#include <glib-object.h>
588-#include <gwd-fwd.h>
589-
590-G_BEGIN_DECLS
591-
592-#define GWD_TYPE_SETTINGS_STORAGE_GCONF (gwd_settings_storage_gconf_get_type ())
593-GType gwd_settings_storage_gconf_get_type ();
594-
595-GWDSettingsStorage *
596-gwd_settings_storage_gconf_new (GWDSettingsWritable *writableSettings);
597-
598-extern const gchar * ORG_COMPIZ_GWD_KEY_USE_TOOLTIPS;
599-extern const gchar * ORG_COMPIZ_GWD_KEY_BLUR_TYPE;
600-extern const gchar * ORG_COMPIZ_GWD_KEY_METACITY_THEME_ACTIVE_OPACITY;
601-extern const gchar * ORG_COMPIZ_GWD_KEY_METACITY_THEME_INACTIVE_OPACITY;
602-extern const gchar * ORG_COMPIZ_GWD_KEY_METACITY_THEME_ACTIVE_SHADE_OPACITY;
603-extern const gchar * ORG_COMPIZ_GWD_KEY_METACITY_THEME_INACTIVE_SHADE_OPACITY;
604-extern const gchar * ORG_COMPIZ_GWD_KEY_USE_METACITY_THEME;
605-extern const gchar * ORG_COMPIZ_GWD_KEY_MOUSE_WHEEL_ACTION;
606-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_DOUBLE_CLICK_TITLEBAR;
607-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_MIDDLE_CLICK_TITLEBAR;
608-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_RIGHT_CLICK_TITLEBAR;
609-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_THEME;
610-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_TITLEBAR_USES_SYSTEM_FONT;
611-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_TITLEBAR_FONT;
612-extern const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_BUTTON_LAYOUT;
613-extern const gchar * ORG_GNOME_MUTTER_ATTACH_MODAL_DIALOGS;
614-extern const gchar * ORG_GNOME_MUTTER_DRAGGABLE_BORDER_WIDTH;
615-
616-G_END_DECLS
617-
618-#endif
619
620=== removed file 'gtk/window-decorator/gwd.schemas.in'
621--- gtk/window-decorator/gwd.schemas.in 2011-10-13 12:22:14 +0000
622+++ gtk/window-decorator/gwd.schemas.in 1970-01-01 00:00:00 +0000
623@@ -1,92 +0,0 @@
624-<gconfschemafile>
625- <schemalist>
626- <schema>
627- <key>/schemas/apps/gwd/blur_type</key>
628- <applyto>/apps/gwd/blur_type</applyto>
629- <owner>gwd</owner>
630- <type>string</type>
631- <default>none</default>
632- <locale name="C">
633- <short>Blur type</short>
634- <long>Type of blur used for window decorations</long>
635- </locale>
636- </schema>
637- <schema>
638- <key>/schemas/apps/gwd/use_metacity_theme</key>
639- <applyto>/apps/gwd/use_metacity_theme</applyto>
640- <owner>gwd</owner>
641- <type>bool</type>
642- <default>true</default>
643- <locale name="C">
644- <short>Use metacity theme</short>
645- <long>Use metacity theme when drawing window decorations</long>
646- </locale>
647- </schema>
648- <schema>
649- <key>/schemas/apps/gwd/mouse_wheel_action</key>
650- <applyto>/apps/gwd/mouse_wheel_action</applyto>
651- <owner>gwd</owner>
652- <type>string</type>
653- <default>none</default>
654- <locale name="C">
655- <short>Title bar mouse wheel action</short>
656- <long>Action to take when scrolling the mouse wheel on a window title bar.</long>
657- </locale>
658- </schema>
659- <schema>
660- <key>/schemas/apps/gwd/metacity_theme_opacity</key>
661- <applyto>/apps/gwd/metacity_theme_opacity</applyto>
662- <owner>gwd</owner>
663- <type>float</type>
664- <default>0.75</default>
665- <locale name="C">
666- <short>Metacity theme opacity</short>
667- <long>Opacity to use for metacity theme decorations</long>
668- </locale>
669- </schema>
670- <schema>
671- <key>/schemas/apps/gwd/metacity_theme_shade_opacity</key>
672- <applyto>/apps/gwd/metacity_theme_shade_opacity</applyto>
673- <owner>gwd</owner>
674- <type>bool</type>
675- <default>true</default>
676- <locale name="C">
677- <short>Metacity theme opacity shade</short>
678- <long>Shade windows with metacity theme decorations from opaque to translucent</long>
679- </locale>
680- </schema>
681- <schema>
682- <key>/schemas/apps/gwd/metacity_theme_active_opacity</key>
683- <applyto>/apps/gwd/metacity_theme_active_opacity</applyto>
684- <owner>gwd</owner>
685- <type>float</type>
686- <default>1.0</default>
687- <locale name="C">
688- <short>Metacity theme active window opacity</short>
689- <long>Opacity to use for active windows with metacity theme decorations</long>
690- </locale>
691- </schema>
692- <schema>
693- <key>/schemas/apps/gwd/metacity_theme_active_shade_opacity</key>
694- <applyto>/apps/gwd/metacity_theme_active_shade_opacity</applyto>
695- <owner>gwd</owner>
696- <type>bool</type>
697- <default>true</default>
698- <locale name="C">
699- <short>Metacity theme active window opacity shade</short>
700- <long>Shade active windows with metacity theme decorations from opaque to translucent</long>
701- </locale>
702- </schema>
703- <schema>
704- <key>/schemas/apps/gwd/use_tooltops</key>
705- <applyto>/apps/gwd/use_tooltips</applyto>
706- <owner>gwd</owner>
707- <type>bool</type>
708- <default>true</default>
709- <locale name="C">
710- <short>Use tooltips</short>
711- <long>Show tooltip windows on decorator functions</long>
712- </locale>
713- </schema>
714- </schemalist>
715-</gconfschemafile>
716
717=== modified file 'gtk/window-decorator/settings.c'
718--- gtk/window-decorator/settings.c 2013-05-14 07:07:45 +0000
719+++ gtk/window-decorator/settings.c 2014-07-09 10:48:45 +0000
720@@ -25,10 +25,6 @@
721
722 #ifdef USE_GSETTINGS
723 #include "gwd-settings-storage-gsettings.h"
724-#else
725-#ifdef USE_GCONF
726-#include "gwd-settings-storage-gconf.h"
727-#endif
728 #endif
729
730 #include "gwd-settings-xproperty-interface.h"
731@@ -56,11 +52,6 @@
732 gwd_connect_org_compiz_gwd_settings (compiz, storage);
733 gwd_connect_org_gnome_mutter_settings (mutter, storage);
734 gwd_connect_org_gnome_desktop_wm_preferences_settings (gnome, storage);
735-#else
736-#ifdef USE_GCONF
737-#define STORAGE_USED
738- storage = gwd_settings_storage_gconf_new (writable);
739-#endif
740 #endif
741
742 GdkDisplay *display = gdk_display_get_default ();

Subscribers

People subscribed via source and target branches