aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
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());