aboutsummaryrefslogtreecommitdiff
path: root/src/AlphaMenu.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/AlphaMenu.hh
parent31df2d8bd618cae590d9b0e76aee11021d4c77d3 (diff)
downloadfluxbox_pavel-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.zip
fluxbox_pavel-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.tar.bz2
holding control will now keep the menu open
Diffstat (limited to 'src/AlphaMenu.hh')
-rw-r--r--src/AlphaMenu.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/AlphaMenu.hh b/src/AlphaMenu.hh
index 78dda9a..6323fe1 100644
--- a/src/AlphaMenu.hh
+++ b/src/AlphaMenu.hh
@@ -64,17 +64,18 @@ public:
64 AlphaMenuSelectItem(const FbTk::FbString &label, AlphaObject *object, AlphaMenu &parent): 64 AlphaMenuSelectItem(const FbTk::FbString &label, AlphaObject *object, AlphaMenu &parent):
65 FbTk::MenuItem(label), m_object(object), m_parent(parent) { 65 FbTk::MenuItem(label), m_object(object), m_parent(parent) {
66 setToggleItem(true); 66 setToggleItem(true);
67 setCloseOnClick(false);
67 } 68 }
68 69
69 bool isSelected() const { return m_object->getUseDefaultAlpha(); } 70 bool isSelected() const { return m_object->getUseDefaultAlpha(); }
70 void click(int button, int time) { 71 void click(int button, int time, unsigned int mods) {
71 bool newval = !m_object->getUseDefaultAlpha(); 72 bool newval = !m_object->getUseDefaultAlpha();
72 m_object->setUseDefaultAlpha(newval); 73 m_object->setUseDefaultAlpha(newval);
73 // items 1 and 2 (the focused/unfocused values) are only enabled if we don't use default values 74 // items 1 and 2 (the focused/unfocused values) are only enabled if we don't use default values
74 m_parent.setItemEnabled(1, !newval); 75 m_parent.setItemEnabled(1, !newval);
75 m_parent.setItemEnabled(2, !newval); 76 m_parent.setItemEnabled(2, !newval);
76 m_parent.show(); // cheat to refreshing the window 77 m_parent.show(); // cheat to refreshing the window
77 FbTk::MenuItem::click(button, time); 78 FbTk::MenuItem::click(button, time, mods);
78 } 79 }
79 80
80 void updateLabel() { 81 void updateLabel() {