diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-14 11:02:29 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-11-01 09:57:22 (GMT) |
commit | ba986137a149af60a2675b4d7616699b28e2e8b3 (patch) | |
tree | 556da2fa23c748a4e66b9bc947a39f2b96b0f781 /src | |
parent | 0c2a843813779eabeedd475873c30cc025cd8d8d (diff) | |
download | fluxbox_pavel-ba986137a149af60a2675b4d7616699b28e2e8b3.zip fluxbox_pavel-ba986137a149af60a2675b4d7616699b28e2e8b3.tar.bz2 |
Attach a modifiedSig handler to the session.menuFile resource
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 10 | ||||
-rw-r--r-- | src/fluxbox.hh | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 6ba6a06..e855727 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -805,8 +805,6 @@ BScreen::addExtraWindowMenu(const FbTk::FbString &label, const FbTk::RefCount<Fb | |||
805 | } | 805 | } |
806 | 806 | ||
807 | void BScreen::reconfigure() { | 807 | void BScreen::reconfigure() { |
808 | Fluxbox *fluxbox = Fluxbox::instance(); | ||
809 | |||
810 | focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); | 808 | focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); |
811 | unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); | 809 | unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); |
812 | m_menutheme->setAlpha(*resource.menu_alpha); | 810 | m_menutheme->setAlpha(*resource.menu_alpha); |
@@ -825,7 +823,6 @@ void BScreen::reconfigure() { | |||
825 | m_workspaces_list[i]->setName( resource.workspace_names.get()[i] ); | 823 | m_workspaces_list[i]->setName( resource.workspace_names.get()[i] ); |
826 | 824 | ||
827 | // update menu filenames | 825 | // update menu filenames |
828 | m_rootmenu->reloadHelper()->setMainFile(fluxbox->getMenuFilename()); | ||
829 | m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); | 826 | m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); |
830 | 827 | ||
831 | // reconfigure workspaces | 828 | // reconfigure workspaces |
@@ -1342,7 +1339,10 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, | |||
1342 | void BScreen::initMenus() { | 1339 | void BScreen::initMenus() { |
1343 | m_workspacemenu = MenuCreator::createMenuType("workspacemenu", screenNumber()); | 1340 | m_workspacemenu = MenuCreator::createMenuType("workspacemenu", screenNumber()); |
1344 | 1341 | ||
1345 | m_rootmenu->reloadHelper()->setMainFile(Fluxbox::instance()->getMenuFilename()); | 1342 | m_tracker.join(Fluxbox::instance()->getMenuResource().modifiedSig(), |
1343 | MemFun(*m_rootmenu->reloadHelper(), &FbTk::AutoReloadHelper::setMainFile)); | ||
1344 | m_rootmenu->reloadHelper()->setMainFile(*Fluxbox::instance()->getMenuResource()); | ||
1345 | |||
1346 | m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); | 1346 | m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); |
1347 | } | 1347 | } |
1348 | 1348 | ||
@@ -1356,7 +1356,7 @@ void BScreen::rereadMenu() { | |||
1356 | 1356 | ||
1357 | m_rootmenu->removeAll(); | 1357 | m_rootmenu->removeAll(); |
1358 | try { | 1358 | try { |
1359 | l.loadfile(FbTk::StringUtil::expandFilename(fb->getMenuFilename()).c_str()); | 1359 | l.loadfile(FbTk::StringUtil::expandFilename(*fb->getMenuResource()).c_str()); |
1360 | l.call(0, 1); | 1360 | l.call(0, 1); |
1361 | MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper()); | 1361 | MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper()); |
1362 | } | 1362 | } |
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; } |