Merge lp:~timo-jyrinki/compiz/migrate-profile-independent into lp:compiz/0.9.8

Proposed by Timo Jyrinki
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 3353
Merged at revision: 3368
Proposed branch: lp:~timo-jyrinki/compiz/migrate-profile-independent
Merge into: lp:compiz/0.9.8
Diff against target: 248 lines (+103/-120)
4 files modified
postinst/convert-files/compiz-profile-Default.convert (+0/-60)
postinst/convert-files/compiz-profile-active-Default.convert (+0/-60)
postinst/convert-files/compiz-profile-independent-keys.convert (+59/-0)
postinst/migration-scripts/03_migrate_profile_independent.py (+44/-0)
To merge this branch: bzr merge lp:~timo-jyrinki/compiz/migrate-profile-independent
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
jenkins (community) continuous-integration Approve
Review via email: mp+123685@code.launchpad.net

Commit message

Migrate profile independent keys separately from the profile dependent keys.

Description of the change

Migrate profile independent keys separately from the profile dependent keys. This is still needed to completely tackle LP: #1046190. We'll also need a patched gconf2 to support 's' -> 'as' conversions.

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Looking good, see my comment on IRC for changes in the packaging needed.

Other than that, just to be picky:

240 + if not client:
241 + print "WARNING: no gconf client found. No transitionning will be done"
242 + return

-> I would rather sys.exit(1) to mark it not transitionned yet.

3353. By Timo Jyrinki

return -> sys.exit(1)

Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Change done, packaging pushed. Approving

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'postinst/convert-files/compiz-profile-Default.convert'
2--- postinst/convert-files/compiz-profile-Default.convert 2012-09-05 23:25:21 +0000
3+++ postinst/convert-files/compiz-profile-Default.convert 2012-09-11 08:14:21 +0000
4@@ -108,63 +108,3 @@
5 top-left-corner-action = /apps/compizconfig-1/profiles/Default/plugins/grid/screen0/options/top_left_corner_action
6 top-right-corner-action = /apps/compizconfig-1/profiles/Default/plugins/grid/screen0/options/top_right_corner_action
7
8-
9-[org.compiz.integrated]
10-run-command-terminal = /apps/metacity/global_keybindings/run_command_terminal
11-run-command-screenshot = /apps/metacity/global_keybindings/run_command_screenshot
12-run-command-window-screenshot = /apps/metacity/global_keybindings/run_command_window_screenshot
13-panel-run-dialog = /apps/metacity/global_keybindings/panel_run_dialog
14-panel-main-menu = /apps/metacity/global_keybindings/panel_main_menu
15-
16-
17-[org.gnome.desktop.wm.keybindings]
18-move-to-workspace-1 = /apps/metacity/window_keybindings/move_to_workspace_1
19-move-to-workspace-2 = /apps/metacity/window_keybindings/move_to_workspace_2
20-move-to-workspace-3 = /apps/metacity/window_keybindings/move_to_workspace_3
21-move-to-workspace-4 = /apps/metacity/window_keybindings/move_to_workspace_4
22-move-to-workspace-5 = /apps/metacity/window_keybindings/move_to_workspace_5
23-move-to-workspace-6 = /apps/metacity/window_keybindings/move_to_workspace_6
24-move-to-workspace-7 = /apps/metacity/window_keybindings/move_to_workspace_7
25-move-to-workspace-8 = /apps/metacity/window_keybindings/move_to_workspace_8
26-move-to-workspace-9 = /apps/metacity/window_keybindings/move_to_workspace_9
27-move-to-workspace-10 = /apps/metacity/window_keybindings/move_to_workspace_10
28-move-to-workspace-11 = /apps/metacity/window_keybindings/move_to_workspace_11
29-move-to-workspace-12 = /apps/metacity/window_keybindings/move_to_workspace_12
30-move-to-workspace-left = /apps/metacity/window_keybindings/move_to_workspace_left
31-move-to-workspace-right = /apps/metacity/window_keybindings/move_to_workspace_right
32-move-to-workspace-up = /apps/metacity/window_keybindings/move_to_workspace_up
33-move-to-workspace-down = /apps/metacity/window_keybindings/move_to_workspace_down
34-switch-windows = /apps/metacity/global_keybindings/switch_windows
35-switch-group = /apps/metacity/global_keybindings/switch_group
36-show-desktop = /apps/metacity/global_keybindings/show_desktop
37-switch-to-workspace-1 = /apps/metacity/global_keybindings/switch_to_workspace_1
38-switch-to-workspace-2 = /apps/metacity/global_keybindings/switch_to_workspace_2
39-switch-to-workspace-3 = /apps/metacity/global_keybindings/switch_to_workspace_3
40-switch-to-workspace-4 = /apps/metacity/global_keybindings/switch_to_workspace_4
41-switch-to-workspace-5 = /apps/metacity/global_keybindings/switch_to_workspace_5
42-switch-to-workspace-6 = /apps/metacity/global_keybindings/switch_to_workspace_6
43-switch-to-workspace-7 = /apps/metacity/global_keybindings/switch_to_workspace_7
44-switch-to-workspace-8 = /apps/metacity/global_keybindings/switch_to_workspace_8
45-switch-to-workspace-9 = /apps/metacity/global_keybindings/switch_to_workspace_9
46-switch-to-workspace-10 = /apps/metacity/global_keybindings/switch_to_workspace_10
47-switch-to-workspace-11 = /apps/metacity/global_keybindings/switch_to_workspace_11
48-switch-to-workspace-12 = /apps/metacity/global_keybindings/switch_to_workspace_12
49-switch-to-workspace-left = /apps/metacity/global_keybindings/switch_to_workspace_left
50-switch-to-workspace-right = /apps/metacity/global_keybindings/switch_to_workspace_right
51-switch-to-workspace-up = /apps/metacity/global_keybindings/switch_to_workspace_up
52-switch-to-workspace-down = /apps/metacity/global_keybindings/switch_to_workspace_down
53-activate-window-menu = /apps/metacity/window_keybindings/activate_window_menu
54-toggle-fullscreen = /apps/metacity/window_keybindings/toggle_fullscreen
55-toggle-maximized = /apps/metacity/window_keybindings/toggle_maximized
56-maximize = /apps/metacity/window_keybindings/maximize
57-unmaximize = /apps/metacity/window_keybindings/unmaximize
58-toggle-shaded = /apps/metacity/window_keybindings/toggle_shaded
59-close = /apps/metacity/window_keybindings/close
60-minimize = /apps/metacity/window_keybindings/minimize
61-begin-move = /apps/metacity/window_keybindings/begin_move
62-begin-resize = /apps/metacity/window_keybindings/begin_resize
63-raise = /apps/metacity/window_keybindings/raise
64-lower = /apps/metacity/window_keybindings/lower
65-maximize-vertically = /apps/metacity/window_keybindings/maximize_vertically
66-maximize-horizontally = /apps/metacity/window_keybindings/maximize_horizontally
67-
68
69=== modified file 'postinst/convert-files/compiz-profile-active-Default.convert'
70--- postinst/convert-files/compiz-profile-active-Default.convert 2012-09-05 23:25:21 +0000
71+++ postinst/convert-files/compiz-profile-active-Default.convert 2012-09-11 08:14:21 +0000
72@@ -108,63 +108,3 @@
73 top-left-corner-action = /apps/compiz-1/plugins/grid/screen0/options/top_left_corner_action
74 top-right-corner-action = /apps/compiz-1/plugins/grid/screen0/options/top_right_corner_action
75
76-
77-[org.compiz.integrated]
78-run-command-terminal = /apps/metacity/global_keybindings/run_command_terminal
79-run-command-screenshot = /apps/metacity/global_keybindings/run_command_screenshot
80-run-command-window-screenshot = /apps/metacity/global_keybindings/run_command_window_screenshot
81-panel-run-dialog = /apps/metacity/global_keybindings/panel_run_dialog
82-panel-main-menu = /apps/metacity/global_keybindings/panel_main_menu
83-
84-
85-[org.gnome.desktop.wm.keybindings]
86-move-to-workspace-1 = /apps/metacity/window_keybindings/move_to_workspace_1
87-move-to-workspace-2 = /apps/metacity/window_keybindings/move_to_workspace_2
88-move-to-workspace-3 = /apps/metacity/window_keybindings/move_to_workspace_3
89-move-to-workspace-4 = /apps/metacity/window_keybindings/move_to_workspace_4
90-move-to-workspace-5 = /apps/metacity/window_keybindings/move_to_workspace_5
91-move-to-workspace-6 = /apps/metacity/window_keybindings/move_to_workspace_6
92-move-to-workspace-7 = /apps/metacity/window_keybindings/move_to_workspace_7
93-move-to-workspace-8 = /apps/metacity/window_keybindings/move_to_workspace_8
94-move-to-workspace-9 = /apps/metacity/window_keybindings/move_to_workspace_9
95-move-to-workspace-10 = /apps/metacity/window_keybindings/move_to_workspace_10
96-move-to-workspace-11 = /apps/metacity/window_keybindings/move_to_workspace_11
97-move-to-workspace-12 = /apps/metacity/window_keybindings/move_to_workspace_12
98-move-to-workspace-left = /apps/metacity/window_keybindings/move_to_workspace_left
99-move-to-workspace-right = /apps/metacity/window_keybindings/move_to_workspace_right
100-move-to-workspace-up = /apps/metacity/window_keybindings/move_to_workspace_up
101-move-to-workspace-down = /apps/metacity/window_keybindings/move_to_workspace_down
102-switch-windows = /apps/metacity/global_keybindings/switch_windows
103-switch-group = /apps/metacity/global_keybindings/switch_group
104-show-desktop = /apps/metacity/global_keybindings/show_desktop
105-switch-to-workspace-1 = /apps/metacity/global_keybindings/switch_to_workspace_1
106-switch-to-workspace-2 = /apps/metacity/global_keybindings/switch_to_workspace_2
107-switch-to-workspace-3 = /apps/metacity/global_keybindings/switch_to_workspace_3
108-switch-to-workspace-4 = /apps/metacity/global_keybindings/switch_to_workspace_4
109-switch-to-workspace-5 = /apps/metacity/global_keybindings/switch_to_workspace_5
110-switch-to-workspace-6 = /apps/metacity/global_keybindings/switch_to_workspace_6
111-switch-to-workspace-7 = /apps/metacity/global_keybindings/switch_to_workspace_7
112-switch-to-workspace-8 = /apps/metacity/global_keybindings/switch_to_workspace_8
113-switch-to-workspace-9 = /apps/metacity/global_keybindings/switch_to_workspace_9
114-switch-to-workspace-10 = /apps/metacity/global_keybindings/switch_to_workspace_10
115-switch-to-workspace-11 = /apps/metacity/global_keybindings/switch_to_workspace_11
116-switch-to-workspace-12 = /apps/metacity/global_keybindings/switch_to_workspace_12
117-switch-to-workspace-left = /apps/metacity/global_keybindings/switch_to_workspace_left
118-switch-to-workspace-right = /apps/metacity/global_keybindings/switch_to_workspace_right
119-switch-to-workspace-up = /apps/metacity/global_keybindings/switch_to_workspace_up
120-switch-to-workspace-down = /apps/metacity/global_keybindings/switch_to_workspace_down
121-activate-window-menu = /apps/metacity/window_keybindings/activate_window_menu
122-toggle-fullscreen = /apps/metacity/window_keybindings/toggle_fullscreen
123-toggle-maximized = /apps/metacity/window_keybindings/toggle_maximized
124-maximize = /apps/metacity/window_keybindings/maximize
125-unmaximize = /apps/metacity/window_keybindings/unmaximize
126-toggle-shaded = /apps/metacity/window_keybindings/toggle_shaded
127-close = /apps/metacity/window_keybindings/close
128-minimize = /apps/metacity/window_keybindings/minimize
129-begin-move = /apps/metacity/window_keybindings/begin_move
130-begin-resize = /apps/metacity/window_keybindings/begin_resize
131-raise = /apps/metacity/window_keybindings/raise
132-lower = /apps/metacity/window_keybindings/lower
133-maximize-vertically = /apps/metacity/window_keybindings/maximize_vertically
134-maximize-horizontally = /apps/metacity/window_keybindings/maximize_horizontally
135-
136
137=== added file 'postinst/convert-files/compiz-profile-independent-keys.convert'
138--- postinst/convert-files/compiz-profile-independent-keys.convert 1970-01-01 00:00:00 +0000
139+++ postinst/convert-files/compiz-profile-independent-keys.convert 2012-09-11 08:14:21 +0000
140@@ -0,0 +1,59 @@
141+[org.compiz.integrated]
142+run-command-terminal = /apps/metacity/global_keybindings/run_command_terminal
143+run-command-screenshot = /apps/metacity/global_keybindings/run_command_screenshot
144+run-command-window-screenshot = /apps/metacity/global_keybindings/run_command_window_screenshot
145+panel-run-dialog = /apps/metacity/global_keybindings/panel_run_dialog
146+panel-main-menu = /apps/metacity/global_keybindings/panel_main_menu
147+
148+
149+[org.gnome.desktop.wm.keybindings]
150+move-to-workspace-1 = /apps/metacity/window_keybindings/move_to_workspace_1
151+move-to-workspace-2 = /apps/metacity/window_keybindings/move_to_workspace_2
152+move-to-workspace-3 = /apps/metacity/window_keybindings/move_to_workspace_3
153+move-to-workspace-4 = /apps/metacity/window_keybindings/move_to_workspace_4
154+move-to-workspace-5 = /apps/metacity/window_keybindings/move_to_workspace_5
155+move-to-workspace-6 = /apps/metacity/window_keybindings/move_to_workspace_6
156+move-to-workspace-7 = /apps/metacity/window_keybindings/move_to_workspace_7
157+move-to-workspace-8 = /apps/metacity/window_keybindings/move_to_workspace_8
158+move-to-workspace-9 = /apps/metacity/window_keybindings/move_to_workspace_9
159+move-to-workspace-10 = /apps/metacity/window_keybindings/move_to_workspace_10
160+move-to-workspace-11 = /apps/metacity/window_keybindings/move_to_workspace_11
161+move-to-workspace-12 = /apps/metacity/window_keybindings/move_to_workspace_12
162+move-to-workspace-left = /apps/metacity/window_keybindings/move_to_workspace_left
163+move-to-workspace-right = /apps/metacity/window_keybindings/move_to_workspace_right
164+move-to-workspace-up = /apps/metacity/window_keybindings/move_to_workspace_up
165+move-to-workspace-down = /apps/metacity/window_keybindings/move_to_workspace_down
166+switch-windows = /apps/metacity/global_keybindings/switch_windows
167+switch-group = /apps/metacity/global_keybindings/switch_group
168+show-desktop = /apps/metacity/global_keybindings/show_desktop
169+switch-to-workspace-1 = /apps/metacity/global_keybindings/switch_to_workspace_1
170+switch-to-workspace-2 = /apps/metacity/global_keybindings/switch_to_workspace_2
171+switch-to-workspace-3 = /apps/metacity/global_keybindings/switch_to_workspace_3
172+switch-to-workspace-4 = /apps/metacity/global_keybindings/switch_to_workspace_4
173+switch-to-workspace-5 = /apps/metacity/global_keybindings/switch_to_workspace_5
174+switch-to-workspace-6 = /apps/metacity/global_keybindings/switch_to_workspace_6
175+switch-to-workspace-7 = /apps/metacity/global_keybindings/switch_to_workspace_7
176+switch-to-workspace-8 = /apps/metacity/global_keybindings/switch_to_workspace_8
177+switch-to-workspace-9 = /apps/metacity/global_keybindings/switch_to_workspace_9
178+switch-to-workspace-10 = /apps/metacity/global_keybindings/switch_to_workspace_10
179+switch-to-workspace-11 = /apps/metacity/global_keybindings/switch_to_workspace_11
180+switch-to-workspace-12 = /apps/metacity/global_keybindings/switch_to_workspace_12
181+switch-to-workspace-left = /apps/metacity/global_keybindings/switch_to_workspace_left
182+switch-to-workspace-right = /apps/metacity/global_keybindings/switch_to_workspace_right
183+switch-to-workspace-up = /apps/metacity/global_keybindings/switch_to_workspace_up
184+switch-to-workspace-down = /apps/metacity/global_keybindings/switch_to_workspace_down
185+activate-window-menu = /apps/metacity/window_keybindings/activate_window_menu
186+toggle-fullscreen = /apps/metacity/window_keybindings/toggle_fullscreen
187+toggle-maximized = /apps/metacity/window_keybindings/toggle_maximized
188+maximize = /apps/metacity/window_keybindings/maximize
189+unmaximize = /apps/metacity/window_keybindings/unmaximize
190+toggle-shaded = /apps/metacity/window_keybindings/toggle_shaded
191+close = /apps/metacity/window_keybindings/close
192+minimize = /apps/metacity/window_keybindings/minimize
193+begin-move = /apps/metacity/window_keybindings/begin_move
194+begin-resize = /apps/metacity/window_keybindings/begin_resize
195+raise = /apps/metacity/window_keybindings/raise
196+lower = /apps/metacity/window_keybindings/lower
197+maximize-vertically = /apps/metacity/window_keybindings/maximize_vertically
198+maximize-horizontally = /apps/metacity/window_keybindings/maximize_horizontally
199+
200
201=== added file 'postinst/migration-scripts/03_migrate_profile_independent.py'
202--- postinst/migration-scripts/03_migrate_profile_independent.py 1970-01-01 00:00:00 +0000
203+++ postinst/migration-scripts/03_migrate_profile_independent.py 2012-09-11 08:14:21 +0000
204@@ -0,0 +1,44 @@
205+#!/usr/bin/python
206+# -*- coding: utf-8 -*-
207+# Copyright (C) 2012 Canonical
208+#
209+# Authors:
210+# Ɓukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
211+# Didier Roche <didrocks@ubuntu.com>
212+#
213+# This program is free software; you can redistribute it and/or modify it under
214+# the terms of the GNU General Public License as published by the Free Software
215+# Foundation; version 3.
216+#
217+# This program is distributed in the hope that it will be useful, but WITHOUTa
218+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
219+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
220+# details.
221+#
222+# You should have received a copy of the GNU General Public License along with
223+# this program; if not, write to the Free Software Foundation, Inc.,
224+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
225+
226+import gconf
227+import glib
228+import subprocess
229+import os.path
230+
231+# this should point to the directory where all the .convert files are stored
232+CONVERT_PATH = "/usr/lib/compiz/migration/"
233+
234+def migrate_file(convert_file):
235+ subprocess.Popen(["gsettings-data-convert", "--file={}{}".format(CONVERT_PATH, convert_file)]).communicate()
236+
237+def migrate_gconf_to_gsettings():
238+ client = gconf.client_get_default()
239+
240+ if not client:
241+ print "WARNING: no gconf client found. No transitionning will be done"
242+ sys.exit(1)
243+
244+ print "Will migrate profile independent keys"
245+ migrate_file('compiz-profile-independent-keys.convert')
246+
247+if __name__ == '__main__':
248+ migrate_gconf_to_gsettings ()

Subscribers

People subscribed via source and target branches