aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 82a4939..c883202 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -826,9 +826,6 @@ void BScreen::reconfigure() {
826 for(size_t i = 0; i < std::min(m_workspaces_list.size(), resource.workspace_names->size()); ++i) 826 for(size_t i = 0; i < std::min(m_workspaces_list.size(), resource.workspace_names->size()); ++i)
827 m_workspaces_list[i]->setName( resource.workspace_names.get()[i] ); 827 m_workspaces_list[i]->setName( resource.workspace_names.get()[i] );
828 828
829 // update menu filenames
830 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename());
831
832 // reconfigure workspaces 829 // reconfigure workspaces
833 for_each(m_workspaces_list.begin(), 830 for_each(m_workspaces_list.begin(),
834 m_workspaces_list.end(), 831 m_workspaces_list.end(),
@@ -1347,7 +1344,9 @@ void BScreen::initMenus() {
1347 MemFun(*m_rootmenu->reloadHelper(), &FbTk::AutoReloadHelper::setMainFile)); 1344 MemFun(*m_rootmenu->reloadHelper(), &FbTk::AutoReloadHelper::setMainFile));
1348 m_rootmenu->reloadHelper()->setMainFile(*Fluxbox::instance()->getMenuResource()); 1345 m_rootmenu->reloadHelper()->setMainFile(*Fluxbox::instance()->getMenuResource());
1349 1346
1350 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); 1347 m_tracker.join(resource.windowmenufile.modifiedSig(),
1348 MemFun(*m_windowmenu->reloadHelper(), &FbTk::AutoReloadHelper::setMainFile));
1349 m_windowmenu->reloadHelper()->setMainFile(*resource.windowmenufile);
1351} 1350}
1352 1351
1353 1352
@@ -1390,12 +1389,6 @@ void BScreen::rereadMenu() {
1390 1389
1391} 1390}
1392 1391
1393const std::string BScreen::windowMenuFilename() const {
1394 if ((*resource.windowmenufile).empty())
1395 return Fluxbox::instance()->getDefaultDataFilename("windowmenu");
1396 return *resource.windowmenufile;
1397}
1398
1399void BScreen::rereadWindowMenu() { 1392void BScreen::rereadWindowMenu() {
1400 lua::state &l = Fluxbox::instance()->lua(); 1393 lua::state &l = Fluxbox::instance()->lua();
1401 l.checkstack(1); 1394 l.checkstack(1);
@@ -1403,7 +1396,7 @@ void BScreen::rereadWindowMenu() {
1403 1396
1404 m_windowmenu->removeAll(); 1397 m_windowmenu->removeAll();
1405 try { 1398 try {
1406 l.loadfile(FbTk::StringUtil::expandFilename(windowMenuFilename()).c_str()); 1399 l.loadfile(FbTk::StringUtil::expandFilename(resource.windowmenufile).c_str());
1407 l.call(0, 1); 1400 l.call(0, 1);
1408 MenuCreator::createMenu(*m_windowmenu, l, m_windowmenu->reloadHelper()); 1401 MenuCreator::createMenu(*m_windowmenu, l, m_windowmenu->reloadHelper());
1409 } 1402 }