aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-28 16:13:30 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-28 16:13:30 (GMT)
commit9aee5b80cb32119a633151a489a2bd85b63e3b28 (patch)
treeaaf370b73f2c9802eb804312ac64ade1a141b382 /src/Toolbar.cc
parent2fcc0fd9e7b92dbb440fd67e34fdbab05be7d98d (diff)
downloadfluxbox_pavel-9aee5b80cb32119a633151a489a2bd85b63e3b28.zip
fluxbox_pavel-9aee5b80cb32119a633151a489a2bd85b63e3b28.tar.bz2
Changed resize signal in BScreen to use the new signal system
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 0292b87..f23e124 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -51,6 +51,7 @@
51#include "FbTk/IntMenuItem.hh" 51#include "FbTk/IntMenuItem.hh"
52#include "FbTk/Shape.hh" 52#include "FbTk/Shape.hh"
53#include "FbTk/SimpleObserver.hh" 53#include "FbTk/SimpleObserver.hh"
54#include "FbTk/MemFun.hh"
54 55
55// use GNU extensions 56// use GNU extensions
56#ifndef _GNU_SOURCE 57#ifndef _GNU_SOURCE
@@ -253,8 +254,10 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
253 m_observers.push_back(makeObserver(*this, &Toolbar::reconfigure)); 254 m_observers.push_back(makeObserver(*this, &Toolbar::reconfigure));
254 m_theme.reconfigSig().attach(m_observers.back()); 255 m_theme.reconfigSig().attach(m_observers.back());
255 screen().reconfigureSig().attach(m_observers.back()); // get this on antialias change 256 screen().reconfigureSig().attach(m_observers.back()); // get this on antialias change
257
256 // listen to screen size changes 258 // listen to screen size changes
257 screen().resizeSig().attach(m_observers.back()); 259 m_signal_tracker.join(screen().resizeSig(),
260 FbTk::MemFun(*this, &Toolbar::screenChanged));
258 261
259 262
260 moveToLayer((*m_rc_layernum).getNum()); 263 moveToLayer((*m_rc_layernum).getNum());
@@ -380,6 +383,10 @@ void Toolbar::lower() {
380 m_layeritem.lower(); 383 m_layeritem.lower();
381} 384}
382 385
386void Toolbar::screenChanged(BScreen &screen) {
387 reconfigure();
388}
389
383void Toolbar::reconfigure() { 390void Toolbar::reconfigure() {
384 391
385 updateVisibleState(); 392 updateVisibleState();