aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ToolFactory.cc10
-rw-r--r--src/Toolbar.cc2
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ToolFactory.cc b/src/ToolFactory.cc
index 5da2777..4034313 100644
--- a/src/ToolFactory.cc
+++ b/src/ToolFactory.cc
@@ -75,6 +75,8 @@ ToolFactory::ToolFactory(BScreen &screen):m_screen(screen),
75ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &parent, Toolbar &tbar) { 75ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &parent, Toolbar &tbar) {
76 ToolbarItem * item = 0; 76 ToolbarItem * item = 0;
77 77
78 FbTk::CommandParser<void>& cp = FbTk::CommandParser<void>::instance();
79
78 unsigned int button_size = 24; 80 unsigned int button_size = 24;
79 if (tbar.theme()->buttonSize() > 0) 81 if (tbar.theme()->buttonSize() > 0)
80 button_size = tbar.theme()->buttonSize(); 82 button_size = tbar.theme()->buttonSize();
@@ -83,8 +85,10 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
83 WorkspaceNameTool *witem = new WorkspaceNameTool(parent, 85 WorkspaceNameTool *witem = new WorkspaceNameTool(parent,
84 *m_workspace_theme, screen()); 86 *m_workspace_theme, screen());
85 using namespace FbTk; 87 using namespace FbTk;
86 RefCount<Command<void> > showmenu(new ShowMenuAboveToolbar(tbar)); 88 RefCount< Command<void> > leftCommand(cp.parse("prevworkspace"));
87 witem->button().setOnClick(showmenu); 89 RefCount< Command<void> > rightCommand(cp.parse("nextworkspace"));
90 witem->button().setOnClick(leftCommand);
91 witem->button().setOnClick(rightCommand, 3);
88 item = witem; 92 item = witem;
89 } else if (name == "iconbar") { 93 } else if (name == "iconbar") {
90 item = new IconbarTool(parent, m_iconbar_theme, m_focused_iconbar_theme, m_unfocused_iconbar_theme, screen(), tbar.menu()); 94 item = new IconbarTool(parent, m_iconbar_theme, m_focused_iconbar_theme, m_unfocused_iconbar_theme, screen(), tbar.menu());
@@ -101,7 +105,7 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
101 cmd_str += " (workspace=[current])"; 105 cmd_str += " (workspace=[current])";
102 } 106 }
103 107
104 FbTk::RefCount<FbTk::Command<void> > cmd(FbTk::CommandParser<void>::instance().parse(cmd_str)); 108 FbTk::RefCount<FbTk::Command<void> > cmd(cp.parse(cmd_str));
105 if (cmd == 0) // we need a command 109 if (cmd == 0) // we need a command
106 return 0; 110 return 0;
107 111
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 5f4cc80..c43a419 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -517,7 +517,7 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
517 517
518 if (be.button == 1) 518 if (be.button == 1)
519 raise(); 519 raise();
520 if (be.button != 3) 520 if (be.button != 2)
521 return; 521 return;
522 522
523 screen() 523 screen()