save timestamp for non-existent menu file, in case user creates one
Mark Tiefenbruck mark@fluxbox.org
3 files changed,
11 insertions(+),
10 deletions(-)
M
src/Screen.cc
→
src/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.cc
→
src/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); } }