summaryrefslogtreecommitdiff
path: root/shortcuts
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2014-03-04 19:28:35 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2014-03-04 19:28:35 +0100
commit4795eb22e873f9f28a9380e787de1614165a1011 (patch)
tree17f8f21e4bcfd095a2635c8b4ddd4468a5fa6353 /shortcuts
parentd38b02f904ac5c756dad477a1f8e0b7ee99eb80f (diff)
CompizShortcutModeller: show workspace sensitive options for switcher as well
(bzr r3695.2.2)
Diffstat (limited to 'shortcuts')
-rw-r--r--shortcuts/CompizShortcutModeller.cpp16
-rw-r--r--shortcuts/CompizShortcutModeller.h2
2 files changed, 14 insertions, 4 deletions
diff --git a/shortcuts/CompizShortcutModeller.cpp b/shortcuts/CompizShortcutModeller.cpp
index f07df0294..b75d22913 100644
--- a/shortcuts/CompizShortcutModeller.cpp
+++ b/shortcuts/CompizShortcutModeller.cpp
@@ -69,6 +69,7 @@ namespace
const std::string UNITYSHELL_OPTION_SHOW_HUD = "show_hud";
const std::string UNITYSHELL_OPTION_PANEL_FIRST_MENU = "panel_first_menu";
const std::string UNITYSHELL_OPTION_ALT_TAB_FORWARD = "alt_tab_forward";
+ const std::string UNITYSHELL_OPTION_ALT_TAB_FORWARD_ALL = "alt_tab_forward_all";
const std::string UNITYSHELL_OPTION_ALT_TAB_NEXT_WINDOW = "alt_tab_next_window";
// Compiz Wall Options
@@ -98,14 +99,14 @@ void CompizModeller::BuildModel(int hsize, int vsize)
AddLauncherHints(hints);
AddDashHints(hints);
AddMenuHints(hints);
- AddSwitcherHints(hints);
+ AddSwitcherHints(hints, workspace_enabled);
AddWorkspaceHints(hints);
}
else
{
AddLauncherHints(hints);
AddMenuHints(hints);
- AddSwitcherHints(hints);
+ AddSwitcherHints(hints, workspace_enabled);
AddDashHints(hints);
}
@@ -239,7 +240,7 @@ void CompizModeller::AddMenuHints(std::list<shortcut::AbstractHint::Ptr> &hints)
_("Cursor Left or Right")));
}
-void CompizModeller::AddSwitcherHints(std::list<shortcut::AbstractHint::Ptr> &hints)
+void CompizModeller::AddSwitcherHints(std::list<shortcut::AbstractHint::Ptr> &hints, bool ws_enabled)
{
static const std::string switching(_("Switching"));
@@ -249,6 +250,15 @@ void CompizModeller::AddSwitcherHints(std::list<shortcut::AbstractHint::Ptr> &hi
UNITYSHELL_PLUGIN_NAME,
UNITYSHELL_OPTION_ALT_TAB_FORWARD));
+ if (ws_enabled)
+ {
+ hints.push_back(std::make_shared<shortcut::Hint>(switching, "", "",
+ _("Switches between applications in all workspaces."),
+ shortcut::OptionType::COMPIZ_KEY,
+ UNITYSHELL_PLUGIN_NAME,
+ UNITYSHELL_OPTION_ALT_TAB_FORWARD_ALL));
+ }
+
hints.push_back(std::make_shared<shortcut::Hint>(switching, "", "",
_("Switches windows of current applications."),
shortcut::OptionType::COMPIZ_KEY,
diff --git a/shortcuts/CompizShortcutModeller.h b/shortcuts/CompizShortcutModeller.h
index 7e862352a..abdc0cad3 100644
--- a/shortcuts/CompizShortcutModeller.h
+++ b/shortcuts/CompizShortcutModeller.h
@@ -39,7 +39,7 @@ private:
void AddLauncherHints(std::list<shortcut::AbstractHint::Ptr> &hints);
void AddDashHints(std::list<shortcut::AbstractHint::Ptr> &hints);
void AddMenuHints(std::list<shortcut::AbstractHint::Ptr> &hints);
- void AddSwitcherHints(std::list<shortcut::AbstractHint::Ptr> &hints);
+ void AddSwitcherHints(std::list<shortcut::AbstractHint::Ptr> &hints, bool ws);
void AddWorkspaceHints(std::list<shortcut::AbstractHint::Ptr> &hints);
void AddWindowsHints(std::list<shortcut::AbstractHint::Ptr> &hints, bool ws);