From 881aa0d8fbda2b3198a8e47a317794663af3c2e1 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 11 Jul 2011 17:29:02 +0200 Subject: Attach a modifiedSig handler to the session.tabPadding resource ps: this is a bonus, without this one needed to completely restart fluxbox for the updates to tabPadding to take effect. --- src/IconButton.hh | 2 ++ src/Window.cc | 4 +++- src/fluxbox.hh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/IconButton.hh b/src/IconButton.hh index 36781d1..4f1587b 100644 --- a/src/IconButton.hh +++ b/src/IconButton.hh @@ -64,6 +64,8 @@ public: bool setOrientation(FbTk::Orientation orient); + FbTk::SignalTracker &signalTracker() { return m_signals; } + protected: void drawText(int x, int y, FbTk::FbDrawable *drawable_override); private: diff --git a/src/Window.cc b/src/Window.cc index 685dae6..47118fa 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3674,7 +3674,9 @@ void FluxboxWindow::associateClient(WinClient &client) { frame().theme().unfocusedTheme()->iconbarTheme(), client); frame().createTab(*btn); - btn->setTextPadding(Fluxbox::instance()->getTabsPadding()); + btn->signalTracker().join(Fluxbox::instance()->getTabsPaddingResource().modifiedSig(), + FbTk::MemFun(static_cast(*btn), &FbTk::TextButton::setTextPadding)); + btn->setTextPadding(*Fluxbox::instance()->getTabsPaddingResource()); btn->setPixmap(screen().getTabsUsePixmap()); m_labelbuttons[&client] = btn; diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 3e9e8d6..6c82c00 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -124,7 +124,7 @@ public: FbTk::StringResource &getAppsResource() { return m_rc_appsfile; } FbTk::StringResource &getKeysResource() { return m_rc_keyfile; } int colorsPerChannel() const { return *m_rc_colors_per_channel; } - int getTabsPadding() const { return *m_rc_tabs_padding; } + FbTk::IntResource &getTabsPaddingResource() { return m_rc_tabs_padding; } time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; } -- cgit v0.11.2