all repos — fluxbox @ 50024d32bc40541f128d80139e58494663f955b4

custom fork of the fluxbox windowmanager

save timestamp for non-existent menu file, in case user creates one
Mark Tiefenbruck mark@fluxbox.org
commit

50024d32bc40541f128d80139e58494663f955b4

parent

2c3f266c740dda76b5c96acb874eff85d6adffc9

3 files changed, 11 insertions(+), 10 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0.1: +*08/04/31: + * Notice when user replaces a non-existent menu file (Mark) + fluxbox.cc Screen.cc *08/04/30: * Don't allow empty root menu (Mark) Screen.cc
M src/Screen.ccsrc/Screen.cc

@@ -1536,6 +1536,9 @@ m_rootmenu->insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart command"),

restart_fb); m_rootmenu->insert(_FB_XTEXT(Menu, Exit, "Exit", "Exit command"), exit_fb); + // still save the menu filename, in case it becomes valid later + if (!fb->getMenuFilename().empty()) + fb->saveMenuFilename(fb->getMenuFilename().c_str()); } m_rootmenu->updateMenu();
M src/fluxbox.ccsrc/fluxbox.cc

@@ -1476,10 +1476,7 @@ for (; it != it_end; ++it) {

time_t timestamp = FbTk::FileUtil::getLastStatusChangeTimestamp((*it)->filename.c_str()); - if (timestamp >= 0) { - if (timestamp != (*it)->timestamp) - return true; - } else + if (timestamp != (*it)->timestamp) return true; }

@@ -1529,14 +1526,12 @@

if (! found) { time_t timestamp = FbTk::FileUtil::getLastStatusChangeTimestamp(filename); - if (timestamp >= 0) { - MenuTimestamp *ts = new MenuTimestamp; + MenuTimestamp *ts = new MenuTimestamp; - ts->filename = filename; - ts->timestamp = timestamp; + ts->filename = filename; + ts->timestamp = timestamp; - m_menu_timestamps.push_back(ts); - } + m_menu_timestamps.push_back(ts); } }