all repos — fluxbox @ b221fe9fc67bb45267669662b7676a305701b2fa

custom fork of the fluxbox windowmanager

reconfigTheme after all themes are loaded
fluxgen fluxgen
commit

b221fe9fc67bb45267669662b7676a305701b2fa

parent

039ad9952527389b354ca9ef08fa52ae84006be2

1 files changed, 11 insertions(+), 7 deletions(-)

jump to
M src/FbTk/Theme.ccsrc/FbTk/Theme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Theme.cc,v 1.9 2003/07/04 10:25:11 fluxgen Exp $ +// $Id: Theme.cc,v 1.10 2003/08/11 14:54:18 fluxgen Exp $ #include "Theme.hh"

@@ -211,9 +211,9 @@ m_themelist.remove(&tm);

return true; } -bool ThemeManager::load(const char *filename) { +bool ThemeManager::load(const std::string &filename) { - if (!m_database.load(filename)) + if (!m_database.load(filename.c_str())) return false; //get list and go throu all the resources and load them

@@ -222,7 +222,13 @@ const ThemeList::iterator theme_it_end = m_themelist.end();

for (; theme_it != theme_it_end; ++theme_it) { loadTheme(**theme_it); } - + // notify all themes that we reconfigured + theme_it = m_themelist.begin(); + for (; theme_it != theme_it_end; ++theme_it) { + // send reconfiguration signal to theme and listeners + (*theme_it)->reconfigTheme(); + (*theme_it)->reconfigSig().notify(); + } return true; }

@@ -245,9 +251,7 @@ cerr<<"Setting default value"<<endl;

resource->setDefaultValue(); } } - // send reconfiguration signal to theme - tm.reconfigTheme(); - + // send reconfiguration signal to theme and listeners } std::string ThemeManager::resourceValue(const std::string &name, const std::string &altname) {