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