aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-01-15 20:37:45 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-01-15 20:37:45 (GMT)
commit05a52116dfa39a07bc5739340eb1a84660c96e25 (patch)
tree9460e7f37bca4eca4c60ec7dea5a1c26569e8c3e /src/FbTk
parentbb480030f54947b19b761f37dd3c4756b361b5e1 (diff)
downloadfluxbox_pavel-05a52116dfa39a07bc5739340eb1a84660c96e25.zip
fluxbox_pavel-05a52116dfa39a07bc5739340eb1a84660c96e25.tar.bz2
MenuItem::isEnabled() is sufficient to decide Menu::isItemSelectable()
MenuSeparator is never enabled since it returns always 'false' in its implementation of isEnabled(). no need to use RTTI imho.
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index f46efb0..5531410 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -842,9 +842,7 @@ bool Menu::isItemSelectable(unsigned int index) const {
842 if (index >= menuitems.size()) return false; 842 if (index >= menuitems.size()) return false;
843 843
844 const MenuItem *item = find(index); 844 const MenuItem *item = find(index);
845 return (!item || 845 return (!item || !item->isEnabled()) ? false : true;
846 (typeid(*item) == typeid(FbTk::MenuSeparator)) ||
847 !item->isEnabled()) ? false : true;
848} 846}
849 847
850 848