summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/IconButton.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index 748d87b..0c383d1 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconButton.cc,v 1.21 2004/06/16 15:38:19 rathnor Exp $ 23// $Id: IconButton.cc,v 1.22 2004/07/15 14:20:19 fluxgen Exp $
24 24
25#include "IconButton.hh" 25#include "IconButton.hh"
26 26
@@ -29,6 +29,7 @@
29#include "Screen.hh" 29#include "Screen.hh"
30#include "Window.hh" 30#include "Window.hh"
31#include "WinClient.hh" 31#include "WinClient.hh"
32#include "CommandParser.hh"
32 33
33#include "FbTk/App.hh" 34#include "FbTk/App.hh"
34#include "FbTk/SimpleCommand.hh" 35#include "FbTk/SimpleCommand.hh"
@@ -93,7 +94,10 @@ IconButton::IconButton(const FbTk::FbWindow &parent, const FbTk::Font &font,
93 ExposureMask | ButtonPressMask | ButtonReleaseMask), 94 ExposureMask | ButtonPressMask | ButtonReleaseMask),
94 m_use_pixmap(true) { 95 m_use_pixmap(true) {
95 96
96 FbTk::RefCount<FbTk::Command> hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus)); 97 typedef FbTk::RefCount<FbTk::Command> RefCmd;
98 RefCmd hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus));
99 RefCmd next_workspace(CommandParser::instance().parseLine("nextworkspace"));
100 RefCmd prev_workspace(CommandParser::instance().parseLine("prevworkspace"));
97 //!! TODO: There're some issues with MacroCommand when 101 //!! TODO: There're some issues with MacroCommand when
98 // this object dies when the last macrocommand is executed (focused cmd) 102 // this object dies when the last macrocommand is executed (focused cmd)
99 // In iconbar mode Icons 103 // In iconbar mode Icons
@@ -104,6 +108,8 @@ IconButton::IconButton(const FbTk::FbWindow &parent, const FbTk::Font &font,
104 FbTk::RefCount<FbTk::Command> menu_cmd(new ::ShowMenu(m_win)); 108 FbTk::RefCount<FbTk::Command> menu_cmd(new ::ShowMenu(m_win));
105 setOnClick(focus_cmd, 1); 109 setOnClick(focus_cmd, 1);
106 setOnClick(menu_cmd, 3); 110 setOnClick(menu_cmd, 3);
111 setOnClick(next_workspace, 4);
112 setOnClick(prev_workspace, 5);
107 m_win.hintSig().attach(this); 113 m_win.hintSig().attach(this);
108 114
109 FbTk::EventManager::instance()->add(*this, m_icon_window); 115 FbTk::EventManager::instance()->add(*this, m_icon_window);