Merge lp:~gerboland/unity-2d/dash-lens-shortcuts-fix into lp:unity-2d

Proposed by Gerry Boland on 2011-09-14
Status: Rejected
Rejected by: Florian Boucault on 2011-09-16
Proposed branch: lp:~gerboland/unity-2d/dash-lens-shortcuts-fix
Merge into: lp:unity-2d
Diff against target: 57 lines (+25/-0)
2 files modified
launcher/app/launcherview.cpp (+23/-0)
launcher/app/launcherview.h (+2/-0)
To merge this branch: bzr merge lp:~gerboland/unity-2d/dash-lens-shortcuts-fix
Reviewer Review Type Date Requested Status
unity-2d-team 2011-09-14 Pending
Review via email: mp+75336@code.launchpad.net

Description of the change

[dash] Restore missing lens shortcuts (Meta+A, Meta+F). Fix bug:834078

To post a comment you must log in.

Unmerged revisions

719. By Gerry Boland on 2011-09-14

[dash] Restore missing lens shortcuts (Meta+A, Meta+F). Fix bug:834078

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/app/launcherview.cpp'
2--- launcher/app/launcherview.cpp 2011-08-31 14:16:31 +0000
3+++ launcher/app/launcherview.cpp 2011-09-14 12:13:28 +0000
4@@ -57,6 +57,8 @@
5 static const char* DASH_DBUS_METHOD_ACTIVATE_HOME = "activateHome";
6 static const char* SPREAD_DBUS_METHOD_IS_SHOWN = "IsShown";
7 static const char* COMMANDS_LENS_ID = "commands.lens";
8+static const char* APPLICATIONS_LENS_ID = "applications.lens";
9+static const char* FILES_LENS_ID = "files.lens";
10 static const char* LAUNCHER_DCONF_SCHEMA = "com.canonical.Unity2d.Launcher";
11
12 LauncherView::LauncherView(QWidget* parent) :
13@@ -82,6 +84,14 @@
14 Hotkey* altF2 = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_F2, Qt::AltModifier);
15 connect(altF2, SIGNAL(pressed()), SLOT(showCommandsLens()));
16
17+ /* Meta+A activates the applications lens */
18+ Hotkey* metaA = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_A, Qt::MetaModifier);
19+ connect(metaA, SIGNAL(pressed()), SLOT(showApplicationsLens()));
20+
21+ /* Meta+F activates the files lens */
22+ Hotkey* metaF = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_F, Qt::MetaModifier);
23+ connect(metaF, SIGNAL(pressed()), SLOT(showFilesLens()));
24+
25 /* Super+{n} for 0 ≤ n ≤ 9 activates the item with index (n + 9) % 10. */
26 for (Qt::Key key = Qt::Key_0; key <= Qt::Key_9; key = (Qt::Key) (key + 1)) {
27 Hotkey* hotkey = HotkeyMonitor::instance().getHotkeyFor(key, Qt::MetaModifier);
28@@ -241,3 +251,16 @@
29 dashInterface.asyncCall("activateLens", COMMANDS_LENS_ID);
30 }
31
32+void
33+LauncherView::showApplicationsLens()
34+{
35+ QDBusInterface dashInterface(DASH_DBUS_SERVICE, DASH_DBUS_PATH, DASH_DBUS_INTERFACE);
36+ dashInterface.asyncCall("activateLens", APPLICATIONS_LENS_ID);
37+}
38+
39+void
40+LauncherView::showFilesLens()
41+{
42+ QDBusInterface dashInterface(DASH_DBUS_SERVICE, DASH_DBUS_PATH, DASH_DBUS_INTERFACE);
43+ dashInterface.asyncCall("activateLens", FILES_LENS_ID);
44+}
45
46=== modified file 'launcher/app/launcherview.h'
47--- launcher/app/launcherview.h 2011-08-11 15:02:42 +0000
48+++ launcher/app/launcherview.h 2011-09-14 12:13:28 +0000
49@@ -58,6 +58,8 @@
50 void updateSuperKeyHoldState();
51 void toggleDash();
52 void showCommandsLens();
53+ void showApplicationsLens();
54+ void showFilesLens();
55
56 protected:
57 void focusInEvent(QFocusEvent* event);

Subscribers

People subscribed via source and target branches