aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-05-07 20:03:08 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-05-10 11:00:46 (GMT)
commite1b0decf559113b43162d9e54bdbf75ee1d80b1f (patch)
tree21d9aeb76fe873bb97f68afdb1332991fe7da4bb /src/IconButton.cc
parent2073ae12a4e633d18f49559111131fffbc495dbd (diff)
downloadfluxbox_pavel-e1b0decf559113b43162d9e54bdbf75ee1d80b1f.zip
fluxbox_pavel-e1b0decf559113b43162d9e54bdbf75ee1d80b1f.tar.bz2
Convert Focusable::attentionSig to FbTk::Signal
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index b08e51a..7c70a63 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -61,7 +61,8 @@ IconButton::IconButton(const FbTk::FbWindow &parent,
61 m_signals.join(m_win.focusSig(), 61 m_signals.join(m_win.focusSig(),
62 MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear)); 62 MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear));
63 63
64 m_win.attentionSig().attach(this); 64 m_signals.join(m_win.attentionSig(),
65 MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear));
65 66
66 FbTk::EventManager::instance()->add(*this, m_icon_window); 67 FbTk::EventManager::instance()->add(*this, m_icon_window);
67 68
@@ -250,22 +251,6 @@ void IconButton::clientTitleChanged() {
250 showTooltip(); 251 showTooltip();
251} 252}
252 253
253void IconButton::update(FbTk::Subject *subj) {
254 // if the window's focus state changed, we need to update the background
255 if (subj == &m_win.attentionSig()) {
256 reconfigAndClear();
257 return;
258 }
259
260 // we got signal that either title or
261 // icon pixmap was updated,
262 // so we refresh everything
263 // if the title was changed AND the mouse is over *this,
264 // update the tooltip
265
266 refreshEverything(subj != 0);
267}
268
269void IconButton::setupWindow() { 254void IconButton::setupWindow() {
270 m_icon_window.clear(); 255 m_icon_window.clear();
271 setText(m_win.title()); 256 setText(m_win.title());