aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-04-29 08:52:28 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-05-10 11:00:45 (GMT)
commitf7d7dfd2a8047207dbe90bc77592c25acf4ca15c (patch)
tree46eb8596d15fb0450f07e3e5d58e2c5449c4c020 /src/IconbarTool.cc
parent54230c9a4474baf4f1c56773992212093e222349 (diff)
downloadfluxbox-f7d7dfd2a8047207dbe90bc77592c25acf4ca15c.zip
fluxbox-f7d7dfd2a8047207dbe90bc77592c25acf4ca15c.tar.bz2
Convert FbTk::Theme::reconfigSig and friends to the new Signal system
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const methods anyway.
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 28e4aeb..42817c5 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -291,10 +291,12 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
291 menu.insert(m_menu.label().logical(), &m_menu); 291 menu.insert(m_menu.label().logical(), &m_menu);
292 292
293 // setup signals 293 // setup signals
294 theme.reconfigSig().attach(this); 294 m_tracker.join(theme.reconfigSig(), FbTk::MemFun(*this, &IconbarTool::themeReconfigured));
295 focused_theme.reconfigSig().attach(this); 295 m_tracker.join(focused_theme.reconfigSig(),
296 unfocused_theme.reconfigSig().attach(this); 296 FbTk::MemFun(*this, &IconbarTool::themeReconfigured));
297 setMode(*m_rc_mode); 297 m_tracker.join(unfocused_theme.reconfigSig(),
298 FbTk::MemFun(*this, &IconbarTool::themeReconfigured));
299 themeReconfigured();
298} 300}
299 301
300IconbarTool::~IconbarTool() { 302IconbarTool::~IconbarTool() {
@@ -383,6 +385,10 @@ unsigned int IconbarTool::borderWidth() const {
383 return m_icon_container.borderWidth(); 385 return m_icon_container.borderWidth();
384} 386}
385 387
388void IconbarTool::themeReconfigured() {
389 setMode(*m_rc_mode);
390}
391
386void IconbarTool::update(FbTk::Subject *subj) { 392void IconbarTool::update(FbTk::Subject *subj) {
387 // ignore updates if we're shutting down 393 // ignore updates if we're shutting down
388 if (m_screen.isShuttingdown()) { 394 if (m_screen.isShuttingdown()) {
@@ -396,13 +402,6 @@ void IconbarTool::update(FbTk::Subject *subj) {
396 *m_rc_client_width = FbTk::Util::clamp(*m_rc_client_width, 10, 400); 402 *m_rc_client_width = FbTk::Util::clamp(*m_rc_client_width, 10, 400);
397 m_icon_container.setMaxSizePerClient(*m_rc_client_width); 403 m_icon_container.setMaxSizePerClient(*m_rc_client_width);
398 404
399 if (subj == &m_focused_theme.reconfigSig() ||
400 subj == &m_unfocused_theme.reconfigSig() ||
401 subj == &m_theme.reconfigSig()) {
402 setMode(*m_rc_mode);
403 return;
404 }
405
406 // lock graphic update 405 // lock graphic update
407 m_icon_container.setUpdateLock(true); 406 m_icon_container.setUpdateLock(true);
408 407