diff options
author | Henrik Kinnunen <fluxgen@fluxbox.org> | 2010-03-18 18:41:35 (GMT) |
---|---|---|
committer | Henrik Kinnunen <fluxgen@fluxbox.org> | 2010-03-18 18:41:35 (GMT) |
commit | 6ed8369d57e8d3144805235fb7aeca63993742af (patch) | |
tree | 914bfd1a4fdc341d5c8aa1fc57e6297c7f8887f0 /src/IconButton.cc | |
parent | 02bb93590c69b619150735f026f7719df2e5c271 (diff) | |
download | fluxbox_pavel-6ed8369d57e8d3144805235fb7aeca63993742af.zip fluxbox_pavel-6ed8369d57e8d3144805235fb7aeca63993742af.tar.bz2 |
Changed Focusable::focusSig() to new signal system.
The focus signal emits the window that had the focus status changed.
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r-- | src/IconButton.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index 5e42e9f..ce89651 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -60,7 +60,8 @@ IconButton::IconButton(const FbTk::FbWindow &parent, | |||
60 | m_pm(win.screen().imageControl()) { | 60 | m_pm(win.screen().imageControl()) { |
61 | 61 | ||
62 | m_win.titleSig().attach(this); | 62 | m_win.titleSig().attach(this); |
63 | m_win.focusSig().attach(this); | 63 | m_signals.join(m_win.focusSig(), |
64 | MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear)); | ||
64 | m_win.attentionSig().attach(this); | 65 | m_win.attentionSig().attach(this); |
65 | 66 | ||
66 | FbTk::EventManager::instance()->add(*this, m_icon_window); | 67 | FbTk::EventManager::instance()->add(*this, m_icon_window); |
@@ -169,11 +170,15 @@ void IconButton::reconfigTheme() { | |||
169 | 170 | ||
170 | } | 171 | } |
171 | 172 | ||
173 | void IconButton::reconfigAndClear() { | ||
174 | reconfigTheme(); | ||
175 | clear(); | ||
176 | } | ||
177 | |||
172 | void IconButton::update(FbTk::Subject *subj) { | 178 | void IconButton::update(FbTk::Subject *subj) { |
173 | // if the window's focus state changed, we need to update the background | 179 | // if the window's focus state changed, we need to update the background |
174 | if (subj == &m_win.focusSig() || subj == &m_win.attentionSig()) { | 180 | if (subj == &m_win.attentionSig()) { |
175 | reconfigTheme(); | 181 | reconfigAndClear(); |
176 | clear(); | ||
177 | return; | 182 | return; |
178 | } | 183 | } |
179 | 184 | ||