all repos — fluxbox @ d7afd7b39e8e539b873ece690dd1fae76296d09c

custom fork of the fluxbox windowmanager

remove some unnecessary arguments
Mark Tiefenbruck mark@fluxbox.org
commit

d7afd7b39e8e539b873ece690dd1fae76296d09c

parent

50024d32bc40541f128d80139e58494663f955b4

4 files changed, 13 insertions(+), 22 deletions(-)

jump to
M src/FbCommands.ccsrc/FbCommands.cc

@@ -348,7 +348,7 @@ BScreen *screen = Fluxbox::instance()->mouseScreen();

if (screen == 0) return; m_menu = MenuCreator::createFromFile(custom_menu_file, - screen->screenNumber(), true); + screen->screenNumber()); if (!m_menu.get()) return; ::showMenu(*screen, **m_menu);
M src/MenuCreator.ccsrc/MenuCreator.cc

@@ -255,13 +255,13 @@

if (FbTk::FileUtil::isRegularFile(thisfile.c_str()) && (filelist[file_index][0] != '.') && (thisfile[thisfile.length() - 1] != '~')) { - MenuCreator::createFromFile(thisfile, menu, false); + MenuCreator::createFromFile(thisfile, menu); } } } else { // inject this file into the current menu - MenuCreator::createFromFile(newfile, menu, false); + MenuCreator::createFromFile(newfile, menu); } safe_counter--;

@@ -394,7 +394,7 @@

return menu; } -FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_number, bool require_begin) { +FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_number) { string real_filename = FbTk::StringUtil::expandFilename(filename); Fluxbox::instance()->saveMenuFilename(real_filename.c_str());

@@ -404,7 +404,7 @@ return 0;

startFile(); string label; - if (require_begin && !getStart(parser, label, m_stringconvertor)) { + if (!getStart(parser, label, m_stringconvertor)) { endFile(); return 0; }

@@ -420,7 +420,7 @@ }

bool MenuCreator::createFromFile(const string &filename, - FbTk::Menu &inject_into, bool require_begin) { + FbTk::Menu &inject_into) { string real_filename = FbTk::StringUtil::expandFilename(filename); FbMenuParser parser(real_filename);

@@ -428,11 +428,6 @@ if (!parser.isLoaded())

return false; startFile(); - string label; - if (require_begin && !getStart(parser, label, m_stringconvertor)) { - endFile(); - return false; - } // save menu filename, so we can check if it changes Fluxbox::instance()->saveMenuFilename(real_filename.c_str());

@@ -445,8 +440,7 @@ }

bool MenuCreator::createWindowMenuFromFile(const string &filename, - FbTk::Menu &inject_into, - bool require_begin) { + FbTk::Menu &inject_into) { string real_filename = FbTk::StringUtil::expandFilename(filename); FbMenuParser parser(real_filename); if (!parser.isLoaded())

@@ -455,7 +449,7 @@

string label; startFile(); - if (require_begin && !getStart(parser, label, m_stringconvertor)) { + if (!getStart(parser, label, m_stringconvertor)) { endFile(); return false; }

@@ -481,7 +475,7 @@ FbTk::Menu *menu = screen->createMenu("");

menu->disableTitle(); // not titlebar if (screen->windowMenuFilename().empty() || - ! createWindowMenuFromFile(screen->windowMenuFilename(), *menu, true)) { + ! createWindowMenuFromFile(screen->windowMenuFilename(), *menu)) { const char *default_menu[] = { "shade", "stick",
M src/MenuCreator.hhsrc/MenuCreator.hh

@@ -36,13 +36,10 @@

class MenuCreator { public: static FbTk::Menu *createMenu(const std::string &label, int screen_num); - static FbTk::Menu *createFromFile(const std::string &filename, int screen_num, - bool require_begin); + static FbTk::Menu *createFromFile(const std::string &filename, int screen_num); static FbTk::Menu *createMenuType(const std::string &label, int screen_num); - static bool createFromFile(const std::string &filename, FbTk::Menu &inject_into, - bool require_begin); - static bool createWindowMenuFromFile(const std::string &filename, FbTk::Menu &inject_into, - bool require_begin); + static bool createFromFile(const std::string &filename, FbTk::Menu &inject_into); + static bool createWindowMenuFromFile(const std::string &filename, FbTk::Menu &inject_into); static bool createWindowMenuItem(const std::string &type, const std::string &label, FbTk::Menu &inject_into);
M src/Screen.ccsrc/Screen.cc

@@ -1518,7 +1518,7 @@

Fluxbox * const fb = Fluxbox::instance(); if (!fb->getMenuFilename().empty()) { m_rootmenu.reset(MenuCreator::createFromFile(fb->getMenuFilename(), - screenNumber(), true)); + screenNumber())); }