Merge lp:~fboucault/unity-2d/dconf_migration_super_key into lp:unity-2d/3.0
- dconf_migration_super_key
- Merge into natty
Status: | Merged |
---|---|
Approved by: | Didier Roche-Tolomelli |
Approved revision: | 634 |
Merged at revision: | 634 |
Proposed branch: | lp:~fboucault/unity-2d/dconf_migration_super_key |
Merge into: | lp:unity-2d/3.0 |
Diff against target: |
304 lines (+78/-20) 13 files modified
.bzrignore (+1/-0) CMakeLists.txt (+26/-0) data/com.canonical.Unity2d.gschema.xml (+9/-0) data/unity-2d.convert (+2/-0) debian/20_unity-2d-gconf-default (+0/-1) debian/changelog (+10/-1) debian/control (+1/-0) debian/gconf/schemas/unity-2d.schemas (+0/-12) debian/unity-2d.install (+2/-0) launcher/app/CMakeLists.txt (+3/-0) launcher/app/launcherview.cpp (+12/-3) launcher/app/launcherview.h (+4/-3) libunity-2d-private/src/unity2dapplication.cpp (+8/-0) |
To merge this branch: | bzr merge lp:~fboucault/unity-2d/dconf_migration_super_key |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Didier Roche-Tolomelli | Approve | ||
Review via email:
|
Commit message
Description of the change
[launcher] Migrated GConf key /desktop/
Added a GSettings schemas file and a GConf-to-GSettings conversion file.
Packaging changes:
* debian/
- install GSettings schemas into usr/share/
- install GConf to GSettings conversion into usr/share/
* debian/
- remove GConf schema for /desktop/
* debian/control:
- add dependency on libdconf-qt-dev
- 632. By Florian Boucault
-
* debian/
20_unity- 2d-gconf- default:
- remove default value for /desktop/unity-2d/ launcher/ super_key_ enable - 633. By Florian Boucault
-
Merged lp:unity-2d
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Florian Boucault (fboucault) wrote : | # |
> compile and works well.
>
> However, we try now to enforce sane dconf values, and not only for desrt ;)
> so, can you please use as a gsettings path some /com/canonical/ one? instead
> of /desktop/unity-2d (it should match the id com.canonical.* for non
> relocatable schemas)
>
I was not sure so I followed what Unity was doing. Should I definitely do what you suggest?
>
> Maybe a stupid question, but shouldn't updateSuperKeyM
> the bool parameter rather than asking dconf again about which value for this
> property?
>
Not a stupid question. I wanted the change to be minimal and strictly about migrating to dconf so I kept it as is.
> Apart from that, all looks good, it works and changing the value in dconf-
> editor has indeed some effect. Nice work :)
Thanks for the testing!
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Didier Roche-Tolomelli (didrocks) wrote : | # |
> > compile and works well.
> >
> > However, we try now to enforce sane dconf values, and not only for desrt ;)
> > so, can you please use as a gsettings path some /com/canonical/ one? instead
> > of /desktop/unity-2d (it should match the id com.canonical.* for non
> > relocatable schemas)
> >
>
> I was not sure so I followed what Unity was doing. Should I definitely do what
> you suggest?
Yeah, Unity will change that in the coming release
>
> >
> > Maybe a stupid question, but shouldn't updateSuperKeyM
> > the bool parameter rather than asking dconf again about which value for this
> > property?
> >
>
> Not a stupid question. I wanted the change to be minimal and strictly about
> migrating to dconf so I kept it as is.
Ok, nice enhancement target for the future then?
>
> > Apart from that, all looks good, it works and changing the value in dconf-
> > editor has indeed some effect. Nice work :)
>
> Thanks for the testing!
So, approved with once the change #1 is done :)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Florian Boucault (fboucault) wrote : | # |
> > > compile and works well.
> > >
> > > However, we try now to enforce sane dconf values, and not only for desrt
> ;)
> > > so, can you please use as a gsettings path some /com/canonical/ one?
> instead
> > > of /desktop/unity-2d (it should match the id com.canonical.* for non
> > > relocatable schemas)
> > >
> >
> > I was not sure so I followed what Unity was doing. Should I definitely do
> what
> > you suggest?
> Yeah, Unity will change that in the coming release
>
Done.
> >
> > >
> > > Maybe a stupid question, but shouldn't updateSuperKeyM
> take
> > > the bool parameter rather than asking dconf again about which value for
> this
> > > property?
> > >
> >
> > Not a stupid question. I wanted the change to be minimal and strictly about
> > migrating to dconf so I kept it as is.
>
> Ok, nice enhancement target for the future then?
Yes
> >
> > > Apart from that, all looks good, it works and changing the value in dconf-
> > > editor has indeed some effect. Nice work :)
> >
> > Thanks for the testing!
>
> So, approved with once the change #1 is done :)
- 634. By Florian Boucault
-
Changed schema path to match com.canonical.*
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2011-06-15 14:39:35 +0000 | |||
3 | +++ .bzrignore 2011-07-22 16:53:25 +0000 | |||
4 | @@ -78,3 +78,4 @@ | |||
5 | 78 | debian/unity-qt-spread | 78 | debian/unity-qt-spread |
6 | 79 | debian/libuqpanel-dev | 79 | debian/libuqpanel-dev |
7 | 80 | debian/libuqpanel0 | 80 | debian/libuqpanel0 |
8 | 81 | data/gschemas.compiled | ||
9 | 81 | 82 | ||
10 | === modified file 'CMakeLists.txt' | |||
11 | --- CMakeLists.txt 2011-06-27 13:40:51 +0000 | |||
12 | +++ CMakeLists.txt 2011-07-22 16:53:25 +0000 | |||
13 | @@ -4,6 +4,7 @@ | |||
14 | 4 | # Dirs | 4 | # Dirs |
15 | 5 | set(UNITY_2D_DIR share/unity-2d) | 5 | set(UNITY_2D_DIR share/unity-2d) |
16 | 6 | set(UNITY_DIR /usr/share/unity/) | 6 | set(UNITY_DIR /usr/share/unity/) |
17 | 7 | set(UNITY_2D_DATA_DIR "${CMAKE_SOURCE_DIR}/data") | ||
18 | 7 | 8 | ||
19 | 8 | configure_file(config.h.in config.h) | 9 | configure_file(config.h.in config.h) |
20 | 9 | 10 | ||
21 | @@ -24,6 +25,31 @@ | |||
22 | 24 | find_package(X11 REQUIRED) | 25 | find_package(X11 REQUIRED) |
23 | 25 | find_package(Gettext REQUIRED) | 26 | find_package(Gettext REQUIRED) |
24 | 26 | 27 | ||
25 | 28 | |||
26 | 29 | # GSettings schemas | ||
27 | 30 | pkg_check_modules(GLIB REQUIRED glib-2.0) | ||
28 | 31 | set (UNITY_2D_SCHEMAS "com.canonical.Unity2d.gschema.xml") | ||
29 | 32 | set (UNITY_2D_GCONF_CONVERT "unity-2d.convert") | ||
30 | 33 | set (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") | ||
31 | 34 | set (GCONF_CONVERT_DIR "${CMAKE_INSTALL_PREFIX}/share/GConf/gsettings") | ||
32 | 35 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE GLIB_COMPILE_SCHEMAS OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
33 | 36 | |||
34 | 37 | # Run the schemas validator and error if it fails | ||
35 | 38 | execute_process (COMMAND ${GLIB_COMPILE_SCHEMAS} ${UNITY_2D_DATA_DIR} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
36 | 39 | |||
37 | 40 | if (_schemas_invalid) | ||
38 | 41 | message (SEND_ERROR "Schemas validation error: ${_schemas_invalid}") | ||
39 | 42 | endif (_schemas_invalid) | ||
40 | 43 | |||
41 | 44 | # Actually install and recompile the schemas | ||
42 | 45 | message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") | ||
43 | 46 | install (FILES ${UNITY_2D_DATA_DIR}/${UNITY_2D_SCHEMAS} DESTINATION ${GSETTINGS_DIR}) | ||
44 | 47 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") | ||
45 | 48 | install (CODE "execute_process (COMMAND ${GLIB_COMPILE_SCHEMAS} ${GSETTINGS_DIR})") | ||
46 | 49 | |||
47 | 50 | # Install GConf to GSettings conversion file | ||
48 | 51 | install (FILES ${UNITY_2D_DATA_DIR}/${UNITY_2D_GCONF_CONVERT} DESTINATION ${GCONF_CONVERT_DIR}) | ||
49 | 52 | |||
50 | 27 | include_directories( | 53 | include_directories( |
51 | 28 | ${CMAKE_BINARY_DIR} | 54 | ${CMAKE_BINARY_DIR} |
52 | 29 | ${QT_INCLUDE_DIR} | 55 | ${QT_INCLUDE_DIR} |
53 | 30 | 56 | ||
54 | === added directory 'data' | |||
55 | === added file 'data/com.canonical.Unity2d.gschema.xml' | |||
56 | --- data/com.canonical.Unity2d.gschema.xml 1970-01-01 00:00:00 +0000 | |||
57 | +++ data/com.canonical.Unity2d.gschema.xml 2011-07-22 16:53:25 +0000 | |||
58 | @@ -0,0 +1,9 @@ | |||
59 | 1 | <schemalist> | ||
60 | 2 | <schema path="/com/canonical/unity-2d/launcher/" id="com.canonical.Unity2d.Launcher" gettext-domain="unity-2d"> | ||
61 | 3 | <key type="b" name="super-key-enable"> | ||
62 | 4 | <default>true</default> | ||
63 | 5 | <summary>Super key activation.</summary> | ||
64 | 6 | <description>Whether or not the super (also called windows key) key is used.</description> | ||
65 | 7 | </key> | ||
66 | 8 | </schema> | ||
67 | 9 | </schemalist> | ||
68 | 0 | 10 | ||
69 | === added file 'data/unity-2d.convert' | |||
70 | --- data/unity-2d.convert 1970-01-01 00:00:00 +0000 | |||
71 | +++ data/unity-2d.convert 2011-07-22 16:53:25 +0000 | |||
72 | @@ -0,0 +1,2 @@ | |||
73 | 1 | [com.canonical.Unity2d.Launcher] | ||
74 | 2 | super-key-enable = /desktop/unity-2d/launcher/super_key_enable | ||
75 | 0 | 3 | ||
76 | === modified file 'debian/20_unity-2d-gconf-default' | |||
77 | --- debian/20_unity-2d-gconf-default 2011-06-15 13:05:38 +0000 | |||
78 | +++ debian/20_unity-2d-gconf-default 2011-07-22 16:53:25 +0000 | |||
79 | @@ -3,7 +3,6 @@ | |||
80 | 3 | /desktop/unity-2d/launcher/favorites [ubiquity-gtkui.desktop,nautilus-home.desktop,firefox.desktop,libreoffice-writer.desktop,libreoffice-calc.desktop,libreoffice-impress.desktop,ubuntu-software-center.desktop,ubuntuone-control-panel-gtk.desktop] | 3 | /desktop/unity-2d/launcher/favorites [ubiquity-gtkui.desktop,nautilus-home.desktop,firefox.desktop,libreoffice-writer.desktop,libreoffice-calc.desktop,libreoffice-impress.desktop,ubuntu-software-center.desktop,ubuntuone-control-panel-gtk.desktop] |
81 | 4 | /desktop/unity-2d/launcher/hide_mode 2 | 4 | /desktop/unity-2d/launcher/hide_mode 2 |
82 | 5 | /desktop/unity-2d/launcher/use_strut false | 5 | /desktop/unity-2d/launcher/use_strut false |
83 | 6 | /desktop/unity-2d/launcher/super_key_enable true | ||
84 | 7 | /desktop/gnome/applications/window_manager/default /usr/bin/metacity | 6 | /desktop/gnome/applications/window_manager/default /usr/bin/metacity |
85 | 8 | /desktop/gnome/applications/window_manager/current /usr/bin/metacity | 7 | /desktop/gnome/applications/window_manager/current /usr/bin/metacity |
86 | 9 | /apps/metacity/general/show_maximized_titlebars false | 8 | /apps/metacity/general/show_maximized_titlebars false |
87 | 10 | 9 | ||
88 | === modified file 'debian/changelog' | |||
89 | --- debian/changelog 2011-07-19 07:02:13 +0000 | |||
90 | +++ debian/changelog 2011-07-22 16:53:25 +0000 | |||
91 | @@ -4,13 +4,22 @@ | |||
92 | 4 | * do not run pkgbinarymangler to convert images to 8bit since this breaks | 4 | * do not run pkgbinarymangler to convert images to 8bit since this breaks |
93 | 5 | the launcher icon background handling. (LP: #809205) | 5 | the launcher icon background handling. (LP: #809205) |
94 | 6 | (QT upstream bug: http://bugreports.qt.nokia.com/browse/QTBUG-4459) | 6 | (QT upstream bug: http://bugreports.qt.nokia.com/browse/QTBUG-4459) |
95 | 7 | * debian/unity-2d.install: | ||
96 | 8 | - install GSettings schemas into usr/share/glib-2.0/schemas | ||
97 | 9 | - install GConf to GSettings conversion into usr/share/GConf/gsettings | ||
98 | 10 | * debian/gconf/schemas/unity-2d.schemas: | ||
99 | 11 | - remove GConf schema for /desktop/unity-2d/launcher/super_key_enable | ||
100 | 12 | * debian/20_unity-2d-gconf-default: | ||
101 | 13 | - remove default value for /desktop/unity-2d/launcher/super_key_enable | ||
102 | 14 | * debian/control: | ||
103 | 15 | - add dependency on libdconf-qt-dev | ||
104 | 7 | 16 | ||
105 | 8 | [ Didier Roche ] | 17 | [ Didier Roche ] |
106 | 9 | * Fix typo in trigger (debian/unity-2d.triggers): (LP: #807358) | 18 | * Fix typo in trigger (debian/unity-2d.triggers): (LP: #807358) |
107 | 10 | * Install the apport hook in the right directory so that it's not launched | 19 | * Install the apport hook in the right directory so that it's not launched |
108 | 11 | unconditionally (LP: #712343) | 20 | unconditionally (LP: #712343) |
109 | 12 | 21 | ||
111 | 13 | -- Didier Roche <didrocks@ubuntu.com> Mon, 18 Jul 2011 11:02:17 +0200 | 22 | -- Florian Boucault <florian.boucault@canonical.com> Fri, 22 Jul 2011 16:44:37 +0200 |
112 | 14 | 23 | ||
113 | 15 | unity-2d (3.8.10-0ubuntu1) natty; urgency=low | 24 | unity-2d (3.8.10-0ubuntu1) natty; urgency=low |
114 | 16 | 25 | ||
115 | 17 | 26 | ||
116 | === modified file 'debian/control' | |||
117 | --- debian/control 2011-06-22 21:17:49 +0000 | |||
118 | +++ debian/control 2011-07-22 16:53:25 +0000 | |||
119 | @@ -12,6 +12,7 @@ | |||
120 | 12 | libglib2.0-dev, | 12 | libglib2.0-dev, |
121 | 13 | libwnck-dev, | 13 | libwnck-dev, |
122 | 14 | libqtgconf-dev, | 14 | libqtgconf-dev, |
123 | 15 | libdconf-qt-dev, | ||
124 | 15 | libqtbamf-dev, | 16 | libqtbamf-dev, |
125 | 16 | libqtdee-dev, | 17 | libqtdee-dev, |
126 | 17 | libdbusmenu-qt-dev, | 18 | libdbusmenu-qt-dev, |
127 | 18 | 19 | ||
128 | === modified file 'debian/gconf/schemas/unity-2d.schemas' | |||
129 | --- debian/gconf/schemas/unity-2d.schemas 2011-06-15 13:10:14 +0000 | |||
130 | +++ debian/gconf/schemas/unity-2d.schemas 2011-07-22 16:53:25 +0000 | |||
131 | @@ -39,18 +39,6 @@ | |||
132 | 39 | <long>Use EWMH standard to reserve an area of the desktop (struts) so that no window can use the launcher's area</long> | 39 | <long>Use EWMH standard to reserve an area of the desktop (struts) so that no window can use the launcher's area</long> |
133 | 40 | </locale> | 40 | </locale> |
134 | 41 | </schema> | 41 | </schema> |
135 | 42 | |||
136 | 43 | <schema> | ||
137 | 44 | <key>/schemas/desktop/unity-2d/launcher/super_key_enable</key> | ||
138 | 45 | <applyto>/desktop/unity-2d/launcher/super_key_enable</applyto> | ||
139 | 46 | <owner>unity-2d</owner> | ||
140 | 47 | <type>bool</type> | ||
141 | 48 | <default>true</default> | ||
142 | 49 | <locale name="C"> | ||
143 | 50 | <short>Super key activation</short> | ||
144 | 51 | <long>Whether or not the super (also called windows key) key is used</long> | ||
145 | 52 | </locale> | ||
146 | 53 | </schema> | ||
147 | 54 | </schemalist> | 42 | </schemalist> |
148 | 55 | </gconfschemafile> | 43 | </gconfschemafile> |
149 | 56 | 44 | ||
150 | 57 | 45 | ||
151 | === modified file 'debian/unity-2d.install' | |||
152 | --- debian/unity-2d.install 2011-07-19 07:02:13 +0000 | |||
153 | +++ debian/unity-2d.install 2011-07-22 16:53:25 +0000 | |||
154 | @@ -5,3 +5,5 @@ | |||
155 | 5 | debian/20_unity-2d-gconf-mandatory /usr/share/gconf/unity-2d/mandatory | 5 | debian/20_unity-2d-gconf-mandatory /usr/share/gconf/unity-2d/mandatory |
156 | 6 | debian/20_unity-2d-gconf-default /usr/share/gconf/unity-2d/default | 6 | debian/20_unity-2d-gconf-default /usr/share/gconf/unity-2d/default |
157 | 7 | usr/share/locale/*/LC_MESSAGES/unity-2d.mo | 7 | usr/share/locale/*/LC_MESSAGES/unity-2d.mo |
158 | 8 | usr/share/glib-2.0/schemas/com.canonical.Unity2d.gschema.xml | ||
159 | 9 | usr/share/GConf/gsettings | ||
160 | 8 | 10 | ||
161 | === modified file 'launcher/app/CMakeLists.txt' | |||
162 | --- launcher/app/CMakeLists.txt 2011-06-11 11:33:52 +0000 | |||
163 | +++ launcher/app/CMakeLists.txt 2011-07-22 16:53:25 +0000 | |||
164 | @@ -3,6 +3,7 @@ | |||
165 | 3 | pkg_check_modules(X11 REQUIRED x11) | 3 | pkg_check_modules(X11 REQUIRED x11) |
166 | 4 | pkg_check_modules(GEIS REQUIRED libutouch-geis) | 4 | pkg_check_modules(GEIS REQUIRED libutouch-geis) |
167 | 5 | pkg_check_modules(QTGCONF REQUIRED libqtgconf) | 5 | pkg_check_modules(QTGCONF REQUIRED libqtgconf) |
168 | 6 | pkg_check_modules(DCONFQT REQUIRED dconf-qt) | ||
169 | 6 | 7 | ||
170 | 7 | # Sources | 8 | # Sources |
171 | 8 | set(launcher_SRCS | 9 | set(launcher_SRCS |
172 | @@ -38,6 +39,7 @@ | |||
173 | 38 | ${X11_INCLUDE_DIRS} | 39 | ${X11_INCLUDE_DIRS} |
174 | 39 | ${GEIS_INCLUDE_DIRS} | 40 | ${GEIS_INCLUDE_DIRS} |
175 | 40 | ${QTGCONF_INCLUDE_DIRS} | 41 | ${QTGCONF_INCLUDE_DIRS} |
176 | 42 | ${DCONFQT_INCLUDE_DIRS} | ||
177 | 41 | ${libunity-2d-private_SOURCE_DIR}/src | 43 | ${libunity-2d-private_SOURCE_DIR}/src |
178 | 42 | ) | 44 | ) |
179 | 43 | 45 | ||
180 | @@ -50,6 +52,7 @@ | |||
181 | 50 | ${X11_LDFLAGS} | 52 | ${X11_LDFLAGS} |
182 | 51 | ${GEIS_LDFLAGS} | 53 | ${GEIS_LDFLAGS} |
183 | 52 | ${QTGCONF_LDFLAGS} | 54 | ${QTGCONF_LDFLAGS} |
184 | 55 | ${DCONFQT_LDFLAGS} | ||
185 | 53 | unity-2d-private | 56 | unity-2d-private |
186 | 54 | ) | 57 | ) |
187 | 55 | 58 | ||
188 | 56 | 59 | ||
189 | === modified file 'launcher/app/launcherview.cpp' | |||
190 | --- launcher/app/launcherview.cpp 2011-06-22 08:54:52 +0000 | |||
191 | +++ launcher/app/launcherview.cpp 2011-07-22 16:53:25 +0000 | |||
192 | @@ -36,6 +36,9 @@ | |||
193 | 36 | #include <X11/Xlib.h> | 36 | #include <X11/Xlib.h> |
194 | 37 | #include <X11/Xatom.h> | 37 | #include <X11/Xatom.h> |
195 | 38 | 38 | ||
196 | 39 | // libdconf-qt | ||
197 | 40 | #include "qconf.h" | ||
198 | 41 | |||
199 | 39 | #include <keyboardmodifiersmonitor.h> | 42 | #include <keyboardmodifiersmonitor.h> |
200 | 40 | #include <hotkey.h> | 43 | #include <hotkey.h> |
201 | 41 | #include <hotkeymonitor.h> | 44 | #include <hotkeymonitor.h> |
202 | @@ -55,6 +58,7 @@ | |||
203 | 55 | static const char* SPREAD_DBUS_METHOD_IS_SHOWN = "IsShown"; | 58 | static const char* SPREAD_DBUS_METHOD_IS_SHOWN = "IsShown"; |
204 | 56 | static const char* APPLICATIONS_PLACE = "/usr/share/unity/places/applications.place"; | 59 | static const char* APPLICATIONS_PLACE = "/usr/share/unity/places/applications.place"; |
205 | 57 | static const char* COMMANDS_PLACE_ENTRY = "Runner"; | 60 | static const char* COMMANDS_PLACE_ENTRY = "Runner"; |
206 | 61 | static const char* LAUNCHER_DCONF_SCHEMA = "com.canonical.Unity2d.Launcher"; | ||
207 | 58 | 62 | ||
208 | 59 | LauncherView::LauncherView(QWidget* parent) : | 63 | LauncherView::LauncherView(QWidget* parent) : |
209 | 60 | Unity2DDeclarativeView(parent), | 64 | Unity2DDeclarativeView(parent), |
210 | @@ -67,8 +71,8 @@ | |||
211 | 67 | connect(&m_superKeyHoldTimer, SIGNAL(timeout()), SLOT(updateSuperKeyHoldState())); | 71 | connect(&m_superKeyHoldTimer, SIGNAL(timeout()), SLOT(updateSuperKeyHoldState())); |
212 | 68 | connect(this, SIGNAL(superKeyTapped()), SLOT(toggleDash())); | 72 | connect(this, SIGNAL(superKeyTapped()), SLOT(toggleDash())); |
213 | 69 | 73 | ||
216 | 70 | m_enableSuperKey.setKey("/desktop/unity-2d/launcher/super_key_enable"); | 74 | m_dconf_launcher = new QConf(LAUNCHER_DCONF_SCHEMA); |
217 | 71 | connect(&m_enableSuperKey, SIGNAL(valueChanged()), SLOT(updateSuperKeyMonitoring())); | 75 | connect(m_dconf_launcher, SIGNAL(superKeyEnableChanged(bool)), SLOT(updateSuperKeyMonitoring())); |
218 | 72 | updateSuperKeyMonitoring(); | 76 | updateSuperKeyMonitoring(); |
219 | 73 | 77 | ||
220 | 74 | /* Alt+F1 gives the keyboard focus to the launcher. */ | 78 | /* Alt+F1 gives the keyboard focus to the launcher. */ |
221 | @@ -86,6 +90,11 @@ | |||
222 | 86 | } | 90 | } |
223 | 87 | } | 91 | } |
224 | 88 | 92 | ||
225 | 93 | LauncherView::~LauncherView() | ||
226 | 94 | { | ||
227 | 95 | delete m_dconf_launcher; | ||
228 | 96 | } | ||
229 | 97 | |||
230 | 89 | void | 98 | void |
231 | 90 | LauncherView::activateWindow() | 99 | LauncherView::activateWindow() |
232 | 91 | { | 100 | { |
233 | @@ -111,7 +120,7 @@ | |||
234 | 111 | { | 120 | { |
235 | 112 | KeyboardModifiersMonitor *modifiersMonitor = KeyboardModifiersMonitor::instance(); | 121 | KeyboardModifiersMonitor *modifiersMonitor = KeyboardModifiersMonitor::instance(); |
236 | 113 | 122 | ||
238 | 114 | QVariant value = m_enableSuperKey.getValue(); | 123 | QVariant value = m_dconf_launcher->property("superKeyEnable"); |
239 | 115 | if (!value.isValid() || value.toBool() == true) { | 124 | if (!value.isValid() || value.toBool() == true) { |
240 | 116 | QObject::connect(modifiersMonitor, | 125 | QObject::connect(modifiersMonitor, |
241 | 117 | SIGNAL(keyboardModifiersChanged(Qt::KeyboardModifiers)), | 126 | SIGNAL(keyboardModifiersChanged(Qt::KeyboardModifiers)), |
242 | 118 | 127 | ||
243 | === modified file 'launcher/app/launcherview.h' | |||
244 | --- launcher/app/launcherview.h 2011-06-22 08:54:52 +0000 | |||
245 | +++ launcher/app/launcherview.h 2011-07-22 16:53:25 +0000 | |||
246 | @@ -24,13 +24,13 @@ | |||
247 | 24 | #include <QList> | 24 | #include <QList> |
248 | 25 | #include <QUrl> | 25 | #include <QUrl> |
249 | 26 | #include <QTimer> | 26 | #include <QTimer> |
252 | 27 | 27 | #include <QVariant> | |
251 | 28 | #include "gconfitem-qml-wrapper.h" | ||
253 | 29 | 28 | ||
254 | 30 | #include <unity2ddeclarativeview.h> | 29 | #include <unity2ddeclarativeview.h> |
255 | 31 | 30 | ||
256 | 32 | class DeclarativeDragDropEvent; | 31 | class DeclarativeDragDropEvent; |
257 | 33 | class LauncherDBus; | 32 | class LauncherDBus; |
258 | 33 | class QConf; | ||
259 | 34 | 34 | ||
260 | 35 | class LauncherView : public Unity2DDeclarativeView | 35 | class LauncherView : public Unity2DDeclarativeView |
261 | 36 | { | 36 | { |
262 | @@ -40,6 +40,7 @@ | |||
263 | 40 | 40 | ||
264 | 41 | public: | 41 | public: |
265 | 42 | explicit LauncherView(QWidget* parent = NULL); | 42 | explicit LauncherView(QWidget* parent = NULL); |
266 | 43 | ~LauncherView(); | ||
267 | 43 | 44 | ||
268 | 44 | bool superKeyHeld() const { return m_superKeyHeld; } | 45 | bool superKeyHeld() const { return m_superKeyHeld; } |
269 | 45 | 46 | ||
270 | @@ -66,7 +67,7 @@ | |||
271 | 66 | void focusOutEvent(QFocusEvent* event); | 67 | void focusOutEvent(QFocusEvent* event); |
272 | 67 | 68 | ||
273 | 68 | private: | 69 | private: |
275 | 69 | GConfItemQmlWrapper m_enableSuperKey; | 70 | QConf* m_dconf_launcher; |
276 | 70 | bool m_superKeyPressed; | 71 | bool m_superKeyPressed; |
277 | 71 | bool m_superKeyHeld; | 72 | bool m_superKeyHeld; |
278 | 72 | QTimer m_superKeyHoldTimer; | 73 | QTimer m_superKeyHoldTimer; |
279 | 73 | 74 | ||
280 | === modified file 'libunity-2d-private/src/unity2dapplication.cpp' | |||
281 | --- libunity-2d-private/src/unity2dapplication.cpp 2011-06-11 10:50:03 +0000 | |||
282 | +++ libunity-2d-private/src/unity2dapplication.cpp 2011-07-22 16:53:25 +0000 | |||
283 | @@ -21,6 +21,7 @@ | |||
284 | 21 | 21 | ||
285 | 22 | // Self | 22 | // Self |
286 | 23 | #include "unity2dapplication.h" | 23 | #include "unity2dapplication.h" |
287 | 24 | #include "config.h" | ||
288 | 24 | 25 | ||
289 | 25 | // Qt | 26 | // Qt |
290 | 26 | 27 | ||
291 | @@ -35,6 +36,13 @@ | |||
292 | 35 | Unity2dApplication::Unity2dApplication(int& argc, char** argv) | 36 | Unity2dApplication::Unity2dApplication(int& argc, char** argv) |
293 | 36 | : QApplication(argc, argv) | 37 | : QApplication(argc, argv) |
294 | 37 | { | 38 | { |
295 | 39 | /* Allow developers to run Unity 2D uninstalled by telling dconf-qt | ||
296 | 40 | where to look for Unity 2D's schemas. | ||
297 | 41 | It relies on the fact that the schema is compiled when running cmake. | ||
298 | 42 | */ | ||
299 | 43 | if (!isRunningInstalled()) { | ||
300 | 44 | qputenv("GSETTINGS_SCHEMA_DIR", unity2dDirectory().toLocal8Bit() + "/data"); | ||
301 | 45 | } | ||
302 | 38 | } | 46 | } |
303 | 39 | 47 | ||
304 | 40 | Unity2dApplication::~Unity2dApplication() | 48 | Unity2dApplication::~Unity2dApplication() |
compile and works well.
However, we try now to enforce sane dconf values, and not only for desrt ;)
so, can you please use as a gsettings path some /com/canonical/ one? instead of /desktop/unity-2d (it should match the id com.canonical.* for non relocatable schemas)
Maybe a stupid question, but shouldn't updateSuperKeyM onitoring( ) SLOT take the bool parameter rather than asking dconf again about which value for this property?
Apart from that, all looks good, it works and changing the value in dconf-editor has indeed some effect. Nice work :)