aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-14 11:02:29 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-14 11:02:29 (GMT)
commit3c64f7b271b9fd96b946e16526d43e7306098ed7 (patch)
tree21cf146e946f577c1f8b333a64cafc8949706110 /src
parent46f07f06e586cf9bc84d6065ca05a460b9c9c0d5 (diff)
downloadfluxbox_pavel-3c64f7b271b9fd96b946e16526d43e7306098ed7.zip
fluxbox_pavel-3c64f7b271b9fd96b946e16526d43e7306098ed7.tar.bz2
Attach a modifiedSig handler to the session.menuFile resource
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc10
-rw-r--r--src/fluxbox.hh2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index d0bafba..ea6b7a4 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -813,8 +813,6 @@ BScreen::addExtraWindowMenu(const FbTk::FbString &label, const FbTk::RefCount<Fb
813} 813}
814 814
815void BScreen::reconfigure() { 815void BScreen::reconfigure() {
816 Fluxbox *fluxbox = Fluxbox::instance();
817
818 focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); 816 focusedWinFrameTheme()->setAlpha(*resource.focused_alpha);
819 unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); 817 unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha);
820 m_menutheme->setAlpha(*resource.menu_alpha); 818 m_menutheme->setAlpha(*resource.menu_alpha);
@@ -833,7 +831,6 @@ void BScreen::reconfigure() {
833 m_workspaces_list[i]->setName( resource.workspace_names.get()[i] ); 831 m_workspaces_list[i]->setName( resource.workspace_names.get()[i] );
834 832
835 // update menu filenames 833 // update menu filenames
836 m_rootmenu->reloadHelper()->setMainFile(fluxbox->getMenuFilename());
837 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); 834 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename());
838 835
839 // reconfigure workspaces 836 // reconfigure workspaces
@@ -1350,7 +1347,10 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
1350void BScreen::initMenus() { 1347void BScreen::initMenus() {
1351 m_workspacemenu = MenuCreator::createMenuType("workspacemenu", screenNumber()); 1348 m_workspacemenu = MenuCreator::createMenuType("workspacemenu", screenNumber());
1352 1349
1353 m_rootmenu->reloadHelper()->setMainFile(Fluxbox::instance()->getMenuFilename()); 1350 m_tracker.join(Fluxbox::instance()->getMenuResource().modifiedSig(),
1351 MemFun(*m_rootmenu->reloadHelper(), &FbTk::AutoReloadHelper::setMainFile));
1352 m_rootmenu->reloadHelper()->setMainFile(*Fluxbox::instance()->getMenuResource());
1353
1354 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); 1354 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename());
1355} 1355}
1356 1356
@@ -1364,7 +1364,7 @@ void BScreen::rereadMenu() {
1364 1364
1365 m_rootmenu->removeAll(); 1365 m_rootmenu->removeAll();
1366 try { 1366 try {
1367 l.loadfile(FbTk::StringUtil::expandFilename(fb->getMenuFilename()).c_str()); 1367 l.loadfile(FbTk::StringUtil::expandFilename(*fb->getMenuResource()).c_str());
1368 l.call(0, 1); 1368 l.call(0, 1);
1369 MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper()); 1369 MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper());
1370 } 1370 }
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 7d479ae..dc3b0b3 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -120,7 +120,7 @@ public:
120 FbTk::StringResource &getStyleResource() { return m_rc_stylefile; } 120 FbTk::StringResource &getStyleResource() { return m_rc_stylefile; }
121 const std::string &getStyleOverlayFilename() const { return *m_rc_styleoverlayfile; } 121 const std::string &getStyleOverlayFilename() const { return *m_rc_styleoverlayfile; }
122 122
123 const std::string &getMenuFilename() const { return *m_rc_menufile; } 123 FbTk::StringResource &getMenuResource() { return m_rc_menufile; }
124 FbTk::StringResource &getAppsResource() { return m_rc_appsfile; } 124 FbTk::StringResource &getAppsResource() { return m_rc_appsfile; }
125 FbTk::StringResource &getKeysResource() { return m_rc_keyfile; } 125 FbTk::StringResource &getKeysResource() { return m_rc_keyfile; }
126 int colorsPerChannel() const { return *m_rc_colors_per_channel; } 126 int colorsPerChannel() const { return *m_rc_colors_per_channel; }