aboutsummaryrefslogtreecommitdiff
path: root/src/FocusModelMenuItem.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-18 05:44:17 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-18 05:44:17 (GMT)
commitc01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0 (patch)
tree7e25c017727402a33fd8e4c851b5bab9e6add568 /src/FocusModelMenuItem.hh
parent31df2d8bd618cae590d9b0e76aee11021d4c77d3 (diff)
downloadfluxbox_pavel-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.zip
fluxbox_pavel-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.tar.bz2
holding control will now keep the menu open
Diffstat (limited to 'src/FocusModelMenuItem.hh')
-rw-r--r--src/FocusModelMenuItem.hh16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/FocusModelMenuItem.hh b/src/FocusModelMenuItem.hh
index fcf2243..91657e9 100644
--- a/src/FocusModelMenuItem.hh
+++ b/src/FocusModelMenuItem.hh
@@ -39,13 +39,15 @@ public:
39 FbTk::RefCount<FbTk::Command> &cmd): 39 FbTk::RefCount<FbTk::Command> &cmd):
40 FbTk::MenuItem(label, cmd), 40 FbTk::MenuItem(label, cmd),
41 m_focus_control(focus_control), 41 m_focus_control(focus_control),
42 m_focusmodel(model) { } 42 m_focusmodel(model) {
43 setCloseOnClick(false);
44 }
43 45
44 bool isEnabled() const { return m_focus_control.focusModel() != m_focusmodel; } 46 bool isEnabled() const { return m_focus_control.focusModel() != m_focusmodel; }
45 47
46 void click(int button, int time) { 48 void click(int button, int time, unsigned int mods) {
47 m_focus_control.setFocusModel(m_focusmodel); 49 m_focus_control.setFocusModel(m_focusmodel);
48 FbTk::MenuItem::click(button, time); 50 FbTk::MenuItem::click(button, time, mods);
49 } 51 }
50 52
51private: 53private:
@@ -61,13 +63,15 @@ public:
61 FbTk::RefCount<FbTk::Command> &cmd): 63 FbTk::RefCount<FbTk::Command> &cmd):
62 FbTk::MenuItem(label, cmd), 64 FbTk::MenuItem(label, cmd),
63 m_focus_control(focus_control), 65 m_focus_control(focus_control),
64 m_tabfocusmodel(model) { } 66 m_tabfocusmodel(model) {
67 setCloseOnClick(false);
68 }
65 69
66 bool isEnabled() const { return m_focus_control.tabFocusModel() != m_tabfocusmodel; } 70 bool isEnabled() const { return m_focus_control.tabFocusModel() != m_tabfocusmodel; }
67 71
68 void click(int button, int time) { 72 void click(int button, int time, unsigned int mods) {
69 m_focus_control.setTabFocusModel(m_tabfocusmodel); 73 m_focus_control.setTabFocusModel(m_tabfocusmodel);
70 FbTk::MenuItem::click(button, time); 74 FbTk::MenuItem::click(button, time, mods);
71 } 75 }
72 76
73private: 77private: