From f41794f2f55ed0835316e4f9d0a3e20d881d3cbd Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 18 Jul 2011 17:54:11 +0200 Subject: Attach modifiedSig handlers to the session.screenX.tabs.usePixmap resource --- src/Screen.hh | 2 +- src/Window.cc | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Screen.hh b/src/Screen.hh index 3b54815..58fd5ba 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -126,7 +126,7 @@ public: const bool allowRemoteActions() const { return *resource.allow_remote_actions; } const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; } const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } - const bool getTabsUsePixmap() const { return *resource.tabs_use_pixmap; } + FbTk::BoolResource &getTabsUsePixmapResource() { return resource.tabs_use_pixmap; } const bool getMaxOverTabs() const { return *resource.max_over_tabs; } unsigned int getTabWidth() const { return *resource.tab_width; } diff --git a/src/Window.cc b/src/Window.cc index 81d5059..a8756b7 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1071,12 +1071,6 @@ void FluxboxWindow::reconfigure() { updateButtons(); frame().reconfigure(); menu().reconfigure(); - - Client2ButtonMap::iterator it = m_labelbuttons.begin(), - it_end = m_labelbuttons.end(); - for (; it != it_end; ++it) - it->second->setPixmap(screen().getTabsUsePixmap()); - } void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { @@ -3695,7 +3689,10 @@ void FluxboxWindow::associateClient(WinClient &client) { btn->signalTracker().join(Fluxbox::instance()->getTabsPaddingResource().modifiedSig(), FbTk::MemFun(static_cast(*btn), &FbTk::TextButton::setTextPadding)); btn->setTextPadding(*Fluxbox::instance()->getTabsPaddingResource()); - btn->setPixmap(screen().getTabsUsePixmap()); + + btn->signalTracker().join(screen().getTabsUsePixmapResource().modifiedSig(), + FbTk::MemFun(*btn, &IconButton::setPixmap)); + btn->setPixmap(*screen().getTabsUsePixmapResource()); m_labelbuttons[&client] = btn; -- cgit v0.11.2