From 99af325d43a73c08d484f122498ac1ef5ea50101 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 0f5ee80..0321940 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -125,7 +125,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 e55414c..d381e17 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1061,12 +1061,6 @@ void FluxboxWindow::reconfigure() { 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) { @@ -3683,7 +3677,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