diff options
Diffstat (limited to 'src/AlphaMenu.hh')
-rw-r--r-- | src/AlphaMenu.hh | 5 |
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() { |