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

Proposed by Gerry Boland
Status: Rejected
Rejected by: Florian Boucault
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 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

[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
=== modified file 'launcher/app/launcherview.cpp'
--- launcher/app/launcherview.cpp 2011-08-31 14:16:31 +0000
+++ launcher/app/launcherview.cpp 2011-09-14 12:13:28 +0000
@@ -57,6 +57,8 @@
57static const char* DASH_DBUS_METHOD_ACTIVATE_HOME = "activateHome";57static const char* DASH_DBUS_METHOD_ACTIVATE_HOME = "activateHome";
58static const char* SPREAD_DBUS_METHOD_IS_SHOWN = "IsShown";58static const char* SPREAD_DBUS_METHOD_IS_SHOWN = "IsShown";
59static const char* COMMANDS_LENS_ID = "commands.lens";59static const char* COMMANDS_LENS_ID = "commands.lens";
60static const char* APPLICATIONS_LENS_ID = "applications.lens";
61static const char* FILES_LENS_ID = "files.lens";
60static const char* LAUNCHER_DCONF_SCHEMA = "com.canonical.Unity2d.Launcher";62static const char* LAUNCHER_DCONF_SCHEMA = "com.canonical.Unity2d.Launcher";
6163
62LauncherView::LauncherView(QWidget* parent) :64LauncherView::LauncherView(QWidget* parent) :
@@ -82,6 +84,14 @@
82 Hotkey* altF2 = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_F2, Qt::AltModifier);84 Hotkey* altF2 = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_F2, Qt::AltModifier);
83 connect(altF2, SIGNAL(pressed()), SLOT(showCommandsLens()));85 connect(altF2, SIGNAL(pressed()), SLOT(showCommandsLens()));
8486
87 /* Meta+A activates the applications lens */
88 Hotkey* metaA = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_A, Qt::MetaModifier);
89 connect(metaA, SIGNAL(pressed()), SLOT(showApplicationsLens()));
90
91 /* Meta+F activates the files lens */
92 Hotkey* metaF = HotkeyMonitor::instance().getHotkeyFor(Qt::Key_F, Qt::MetaModifier);
93 connect(metaF, SIGNAL(pressed()), SLOT(showFilesLens()));
94
85 /* Super+{n} for 0 ≤ n ≤ 9 activates the item with index (n + 9) % 10. */95 /* Super+{n} for 0 ≤ n ≤ 9 activates the item with index (n + 9) % 10. */
86 for (Qt::Key key = Qt::Key_0; key <= Qt::Key_9; key = (Qt::Key) (key + 1)) {96 for (Qt::Key key = Qt::Key_0; key <= Qt::Key_9; key = (Qt::Key) (key + 1)) {
87 Hotkey* hotkey = HotkeyMonitor::instance().getHotkeyFor(key, Qt::MetaModifier);97 Hotkey* hotkey = HotkeyMonitor::instance().getHotkeyFor(key, Qt::MetaModifier);
@@ -241,3 +251,16 @@
241 dashInterface.asyncCall("activateLens", COMMANDS_LENS_ID);251 dashInterface.asyncCall("activateLens", COMMANDS_LENS_ID);
242}252}
243253
254void
255LauncherView::showApplicationsLens()
256{
257 QDBusInterface dashInterface(DASH_DBUS_SERVICE, DASH_DBUS_PATH, DASH_DBUS_INTERFACE);
258 dashInterface.asyncCall("activateLens", APPLICATIONS_LENS_ID);
259}
260
261void
262LauncherView::showFilesLens()
263{
264 QDBusInterface dashInterface(DASH_DBUS_SERVICE, DASH_DBUS_PATH, DASH_DBUS_INTERFACE);
265 dashInterface.asyncCall("activateLens", FILES_LENS_ID);
266}
244267
=== modified file 'launcher/app/launcherview.h'
--- launcher/app/launcherview.h 2011-08-11 15:02:42 +0000
+++ launcher/app/launcherview.h 2011-09-14 12:13:28 +0000
@@ -58,6 +58,8 @@
58 void updateSuperKeyHoldState();58 void updateSuperKeyHoldState();
59 void toggleDash();59 void toggleDash();
60 void showCommandsLens();60 void showCommandsLens();
61 void showApplicationsLens();
62 void showFilesLens();
6163
62protected:64protected:
63 void focusInEvent(QFocusEvent* event);65 void focusInEvent(QFocusEvent* event);

Subscribers

People subscribed via source and target branches