diff options
| author | Didier Roche <didier.roche@canonical.com> | 2011-03-09 20:12:37 +0100 |
|---|---|---|
| committer | Didier Roche <didier.roche@canonical.com> | 2011-03-09 20:12:37 +0100 |
| commit | 71efe9368e7c624d80e7504be3971eb7e74cace2 (patch) | |
| tree | a208722e1364d3f7effc15fc5d08560005b5e0d9 | |
| parent | 2569db0050a04c15a63be5b1131020c27b91f3fe (diff) | |
alt + F2 to active the new place. Will be nice now to check the place exists
Fixes LP: #580295 (bzr r931.5.1)
| -rw-r--r-- | src/unityshell.cpp | 15 | ||||
| -rw-r--r-- | src/unityshell.h | 13 | ||||
| -rw-r--r-- | unityshell.xml.in | 5 |
3 files changed, 29 insertions, 4 deletions
diff --git a/src/unityshell.cpp b/src/unityshell.cpp index 47022e7cd..9f093b9a1 100644 --- a/src/unityshell.cpp +++ b/src/unityshell.cpp @@ -253,6 +253,20 @@ UnityScreen::showPanelFirstMenuKeyTerminate (CompAction *action, return false; } +bool +UnityScreen::executeCommand (CompAction *action, + CompAction::State state, + CompOption::Vector &options) +{ + ubus_server_send_message (ubus_server_get_default (), + UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, + g_variant_new ("(sus)", + "/com/canonical/unity/applicationsplace/runner", + 0, + "")); + return false; +} + void UnityScreen::restartLauncherKeyNav () { @@ -756,6 +770,7 @@ UnityScreen::UnityScreen (CompScreen *screen) : optionSetShowLauncherTerminate (boost::bind (&UnityScreen::showLauncherKeyTerminate, this, _1, _2, _3)); optionSetKeyboardFocusInitiate (boost::bind (&UnityScreen::setKeyboardFocusKeyInitiate, this, _1, _2, _3)); //optionSetKeyboardFocusTerminate (boost::bind (&UnityScreen::setKeyboardFocusKeyTerminate, this, _1, _2, _3)); + optionSetExecuteCommandInitiate (boost::bind (&UnityScreen::executeCommand, this, _1, _2, _3)); optionSetPanelFirstMenuInitiate (boost::bind (&UnityScreen::showPanelFirstMenuKeyInitiate, this, _1, _2, _3)); optionSetPanelFirstMenuTerminate(boost::bind (&UnityScreen::showPanelFirstMenuKeyTerminate, this, _1, _2, _3)); diff --git a/src/unityshell.h b/src/unityshell.h index d7abdf89c..7188c4750 100644 --- a/src/unityshell.h +++ b/src/unityshell.h @@ -104,14 +104,19 @@ class UnityScreen : showLauncherKeyTerminate (CompAction *action, CompAction::State state, CompOption::Vector &options); - bool - showPanelFirstMenuKeyInitiate (CompAction *action, - CompAction::State state, - CompOption::Vector &options); + bool + showPanelFirstMenuKeyInitiate (CompAction *action, + CompAction::State state, + CompOption::Vector &options); bool showPanelFirstMenuKeyTerminate (CompAction *action, CompAction::State state, CompOption::Vector &options); + + bool + executeCommand (CompAction* action, + CompAction::State state, + CompOption::Vector& options); bool setKeyboardFocusKeyInitiate (CompAction* action, CompAction::State state, diff --git a/unityshell.xml.in b/unityshell.xml.in index 18b7d1231..ea2a01f08 100644 --- a/unityshell.xml.in +++ b/unityshell.xml.in @@ -72,6 +72,11 @@ <_long>Set the keyboard-focus on the launcher so it can be navigated with the cursor-keys</_long> <default><Alt>F1</default> </option> + <option name="execute_command" type="key"> + <_short>Key to execute a command</_short> + <_long>Key to open a folder or execute a command</_long> + <default><Alt>F2</default> + </option> <option name="panel_first_menu" type="key"> <_short>Key to open the first panel menu</_short> <_long>Open the first menu on the panel, allowing keyboard navigation thereafter.</_long> |
