Merge lp:~osomon/unity-2d/super-s-overlay into lp:unity-2d/3.0

Proposed by Olivier Tilloy
Status: Merged
Approved by: Ugo Riboni
Approved revision: 561
Merged at revision: 561
Proposed branch: lp:~osomon/unity-2d/super-s-overlay
Merge into: lp:unity-2d/3.0
Diff against target: 61 lines (+1/-24)
3 files modified
launcher/UnityApplications/workspaces.cpp (+1/-0)
launcher/app/launcherview.cpp (+0/-23)
launcher/app/launcherview.h (+0/-1)
To merge this branch: bzr merge lp:~osomon/unity-2d/super-s-overlay
Reviewer Review Type Date Requested Status
Ugo Riboni (community) Needs Fixing
Review via email: mp+60376@code.launchpad.net

Commit message

[launcher] Display the shortcut overlay for the workspace switcher.

To post a comment you must log in.
Revision history for this message
Ugo Riboni (uriboni) wrote :

Conflict with trunk. Otherwise works great and code is a great simplification. Good idea.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/UnityApplications/workspaces.cpp'
2--- launcher/UnityApplications/workspaces.cpp 2011-04-28 13:09:25 +0000
3+++ launcher/UnityApplications/workspaces.cpp 2011-05-09 13:21:03 +0000
4@@ -30,6 +30,7 @@
5
6 Workspaces::Workspaces()
7 {
8+ setShortcutKey(Qt::Key_S);
9 }
10
11 Workspaces::Workspaces(const Workspaces& other)
12
13=== modified file 'launcher/app/launcherview.cpp'
14--- launcher/app/launcherview.cpp 2011-05-03 18:34:05 +0000
15+++ launcher/app/launcherview.cpp 2011-05-09 13:21:03 +0000
16@@ -78,10 +78,6 @@
17 Hotkey* altF2 = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_F2, Qt::AltModifier);
18 connect(altF2, SIGNAL(pressed()), SLOT(showCommandsPlace()));
19
20- /* Super+s activates the workspaces switcher. */
21- Hotkey* superS = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_S, Qt::MetaModifier);
22- connect(superS, SIGNAL(pressed()), SLOT(showWorkspaceSwitcher()));
23-
24 /* Super+{n} for 0 ≤ n ≤ 9 activates the item with index (n + 9) % 10. */
25 for (Qt::Key key = Qt::Key_0; key <= Qt::Key_9; key = (Qt::Key) (key + 1)) {
26 Hotkey* hotkey = HotkeyMonitor::instance().getHotkeyFor(key, Qt::MetaModifier);
27@@ -341,22 +337,3 @@
28 APPLICATIONS_PLACE, COMMANDS_PLACE_ENTRY, 0);
29 }
30
31-void
32-LauncherView::showWorkspaceSwitcher()
33-{
34- QDBusInterface spreadInterface(SPREAD_DBUS_SERVICE, SPREAD_DBUS_PATH, SPREAD_DBUS_INTERFACE);
35-
36- /* Here we only show the spread, if it's hidden.
37- However on Super+s the spread should exit if it's already running.
38- That is done directly in spread/Workspaces.qml because the spread
39- fully grabs the keyboard, so it's the only place where Super+s can
40- be handled while the spread is active */
41- QDBusReply<bool> isShown = spreadInterface.call("IsShown");
42- if (isShown.isValid()) {
43- if (isShown.value() == false) {
44- spreadInterface.asyncCall("ShowAllWorkspaces", QString());
45- }
46- } else {
47- UQ_WARNING << "Failed to get property IsShown on" << SPREAD_DBUS_SERVICE;
48- }
49-}
50
51=== modified file 'launcher/app/launcherview.h'
52--- launcher/app/launcherview.h 2011-05-03 18:32:56 +0000
53+++ launcher/app/launcherview.h 2011-05-09 13:21:03 +0000
54@@ -62,7 +62,6 @@
55 void updateSuperKeyHoldState();
56 void toggleDash();
57 void showCommandsPlace();
58- void showWorkspaceSwitcher();
59
60 public Q_SLOTS:
61 void activateWindow();

Subscribers

People subscribed via source and target branches