diff options
author | Mathias Gumz <akira@fluxbox.org> | 2015-02-05 20:30:44 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-02-05 20:30:44 (GMT) |
commit | 0da4be2a0114d4419ceb70a4c6b6342f8fd79852 (patch) | |
tree | 371575758618de52415c823f756346cb3e1a5bb4 /src/FbTk/Menu.hh | |
parent | e79228cc08ee1d0d20d7ef27103a5d167fb8f133 (diff) | |
download | fluxbox-0da4be2a0114d4419ceb70a4c6b6342f8fd79852.zip fluxbox-0da4be2a0114d4419ceb70a4c6b6342f8fd79852.tar.bz2 |
Feature: different MenuSearch modes
Fluxbox now supports three MenuSearch modes:
* NoWhere - essentially "disabling" the menu search.
* Somewhere - the search string matches somewhere.
* ItemStart - the search string matches at the start of a menu item.
The default value is "ItemStart", just in the good old times. As long as
this feature is not configurable via the menu it would irritate users
with distinct muscle memory who type without thinking OR checking the
visual feedback: they would trigger items they did not intent to trigger
after years of the old behavior.
Once this feature get's an entry in the config menu the default value
might change.
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r-- | src/FbTk/Menu.hh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 39440a8..8bb5fdd 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh | |||
@@ -37,9 +37,10 @@ | |||
37 | namespace FbTk { | 37 | namespace FbTk { |
38 | 38 | ||
39 | template <typename T> class Command; | 39 | template <typename T> class Command; |
40 | template <typename T> class RefCount; | ||
40 | class MenuItem; | 41 | class MenuItem; |
42 | class MenuSearch; | ||
41 | class ImageControl; | 43 | class ImageControl; |
42 | template <typename T> class RefCount; | ||
43 | 44 | ||
44 | /// Base class for menus | 45 | /// Base class for menus |
45 | class Menu: public FbTk::EventHandler, FbTk::FbWindowRenderer { | 46 | class Menu: public FbTk::EventHandler, FbTk::FbWindowRenderer { |
@@ -187,10 +188,8 @@ private: | |||
187 | 188 | ||
188 | Menu *m_parent; | 189 | Menu *m_parent; |
189 | 190 | ||
190 | class TypeSearch; | 191 | std::vector<MenuItem*> m_items; |
191 | 192 | std::auto_ptr<MenuSearch> m_search; | |
192 | std::vector<MenuItem *> m_items; | ||
193 | std::auto_ptr<TypeSearch> m_search; | ||
194 | 193 | ||
195 | struct State { | 194 | struct State { |
196 | bool moving; | 195 | bool moving; |