aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-02-05 20:30:44 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-02-05 20:30:44 (GMT)
commit0da4be2a0114d4419ceb70a4c6b6342f8fd79852 (patch)
tree371575758618de52415c823f756346cb3e1a5bb4 /src/fluxbox.cc
parente79228cc08ee1d0d20d7ef27103a5d167fb8f133 (diff)
downloadfluxbox-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/fluxbox.cc')
-rw-r--r--src/fluxbox.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 8b8b26c..7b73360 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -252,6 +252,7 @@ Fluxbox::Config::Config(FbTk::ResourceManager& rm, const std::string& path) :
252 slit_file(rm, path + "/slitlist", "session.slitlistFile", "Session.SlitlistFile"), 252 slit_file(rm, path + "/slitlist", "session.slitlistFile", "Session.SlitlistFile"),
253 apps_file(rm, path + "/apps", "session.appsFile", "Session.AppsFile"), 253 apps_file(rm, path + "/apps", "session.appsFile", "Session.AppsFile"),
254 tabs_attach_area(rm, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"), 254 tabs_attach_area(rm, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"),
255 menusearch(rm, FbTk::MenuSearch::DEFAULT, "session.menuSearch", "Session.MenuSearch"),
255 cache_life(rm, 5, "session.cacheLife", "Session.CacheLife"), 256 cache_life(rm, 5, "session.cacheLife", "Session.CacheLife"),
256 cache_max(rm, 200, "session.cacheMax", "Session.CacheMax"), 257 cache_max(rm, 200, "session.cacheMax", "Session.CacheMax"),
257 auto_raise_delay(rm, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay") { 258 auto_raise_delay(rm, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay") {
@@ -360,7 +361,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
360 // Note: this needs to be done before creating screens 361 // Note: this needs to be done before creating screens
361 m_key.reset(new Keys); 362 m_key.reset(new Keys);
362 m_key->reconfigure(); 363 m_key->reconfigure();
363 364 FbTk::MenuSearch::setMode(*m_config.menusearch);
364 365
365 unsigned int opts = OPT_SLIT|OPT_TOOLBAR; 366 unsigned int opts = OPT_SLIT|OPT_TOOLBAR;
366 vector<int> screens; 367 vector<int> screens;
@@ -541,7 +542,6 @@ void Fluxbox::eventLoop() {
541 } else { 542 } else {
542 FbTk::Timer::updateTimers(ConnectionNumber(disp)); 543 FbTk::Timer::updateTimers(ConnectionNumber(disp));
543 } 544 }
544
545 } 545 }
546} 546}
547 547
@@ -862,7 +862,7 @@ void Fluxbox::handleClientMessage(XClientMessageEvent &ce) {
862 atom = XGetAtomName(FbTk::App::instance()->display(), ce.message_type); 862 atom = XGetAtomName(FbTk::App::instance()->display(), ce.message_type);
863 863
864 fbdbg<<__FILE__<<"("<<__LINE__<<"): ClientMessage. data.l[0]=0x"<<hex<<ce.data.l[0]<< 864 fbdbg<<__FILE__<<"("<<__LINE__<<"): ClientMessage. data.l[0]=0x"<<hex<<ce.data.l[0]<<
865 " message_type=0x"<<ce.message_type<<dec<<" = \""<<atom<<"\""<<endl; 865 " message_type=0x"<<ce.message_type<<dec<<" = \""<<atom<<"\""<<endl;
866 866
867 if (ce.message_type && atom) XFree((char *) atom); 867 if (ce.message_type && atom) XFree((char *) atom);
868#endif // DEBUG 868#endif // DEBUG
@@ -1266,6 +1266,7 @@ void Fluxbox::real_reconfigure() {
1266 STLUtil::forAll(m_screens, mem_fun(&BScreen::reconfigure)); 1266 STLUtil::forAll(m_screens, mem_fun(&BScreen::reconfigure));
1267 m_key->reconfigure(); 1267 m_key->reconfigure();
1268 STLUtil::forAll(m_atomhandler, mem_fun(&AtomHandler::reconfigure)); 1268 STLUtil::forAll(m_atomhandler, mem_fun(&AtomHandler::reconfigure));
1269 FbTk::MenuSearch::setMode(*m_config.menusearch);
1269} 1270}
1270 1271
1271BScreen *Fluxbox::findScreen(int id) { 1272BScreen *Fluxbox::findScreen(int id) {