summaryrefslogtreecommitdiff
diff options
authorDidier Roche <didier.roche@canonical.com>2011-03-10 16:39:00 +0100
committerDidier Roche <didier.roche@canonical.com>2011-03-10 16:39:00 +0100
commit1e706675a3968c831c01ea1e74c0506f5ff5b9b3 (patch)
treefde6b181a6cfbd61d5361a9486380658882de4e6
parenta43ad3b216171523c05f06e5c566267a259ef4f5 (diff)
parent71efe9368e7c624d80e7504be3971eb7e74cace2 (diff)
Handle alt F2 unity side to show the new applications place entry.
(bzr r944)
-rw-r--r--src/unityshell.cpp15
-rw-r--r--src/unityshell.h13
-rw-r--r--unityshell.xml.in5
3 files changed, 29 insertions, 4 deletions
diff --git a/src/unityshell.cpp b/src/unityshell.cpp
index de93a6e78..fd3452d23 100644
--- a/src/unityshell.cpp
+++ b/src/unityshell.cpp
@@ -254,6 +254,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 ()
{
@@ -764,6 +778,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 1e2178f08..f382f42f0 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>&lt;Alt&gt;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>&lt;Alt&gt;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>