summaryrefslogtreecommitdiff
path: root/src/ToolbarHandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolbarHandler.cc')
-rw-r--r--src/ToolbarHandler.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ToolbarHandler.cc b/src/ToolbarHandler.cc
index f5e9255..5db8f44 100644
--- a/src/ToolbarHandler.cc
+++ b/src/ToolbarHandler.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ToolbarHandler.cc,v 1.23 2003/07/18 15:40:55 rathnor Exp $ 23// $Id: ToolbarHandler.cc,v 1.24 2003/07/20 02:45:57 rathnor Exp $
24 24
25/** 25/**
26 * The ToolbarHandler class acts as a rough interface to the toolbar. 26 * The ToolbarHandler class acts as a rough interface to the toolbar.
@@ -155,6 +155,10 @@ ToolbarHandler::ToolbarHandler(BScreen &screen)
155 m_toolbarmenu.setInternalMenu(); 155 m_toolbarmenu.setInternalMenu();
156 setupModeMenu(m_modemenu, *this); 156 setupModeMenu(m_modemenu, *this);
157 setMode(*m_rc_mode, false); // the atomhandler part will initialise it shortly 157 setMode(*m_rc_mode, false); // the atomhandler part will initialise it shortly
158 // now add this to the config menus for the screen
159 // (we only want it done once, so it can't go in initforscreen)
160
161 screen.addConfigMenu("Toolbar", m_toolbarmenu);
158} 162}
159 163
160void ToolbarHandler::setMode(ToolbarMode newmode, bool initialise) { 164void ToolbarHandler::setMode(ToolbarMode newmode, bool initialise) {
@@ -175,7 +179,6 @@ void ToolbarHandler::setMode(ToolbarMode newmode, bool initialise) {
175 m_toolbarmenu.removeAll(); 179 m_toolbarmenu.removeAll();
176 m_toolbar.reset(new Toolbar(m_screen, 180 m_toolbar.reset(new Toolbar(m_screen,
177 *m_screen.layerManager().getLayer(Fluxbox::instance()->getNormalLayer()), m_toolbarmenu)); 181 *m_screen.layerManager().getLayer(Fluxbox::instance()->getNormalLayer()), m_toolbarmenu));
178 Fluxbox::instance()->load_rc(m_screen);
179 m_toolbar->reconfigure(); 182 m_toolbar->reconfigure();
180 183
181 m_toolbarmenu.insert("Mode...", &m_modemenu); 184 m_toolbarmenu.insert("Mode...", &m_modemenu);
@@ -384,14 +387,16 @@ void ToolbarHandler::updateWorkspace(FluxboxWindow &win) {
384} 387}
385 388
386void ToolbarHandler::updateCurrentWorkspace(BScreen &screen) { 389void ToolbarHandler::updateCurrentWorkspace(BScreen &screen) {
387 if (&screen != &m_screen) 390 if (&screen != &m_screen || mode() == OFF)
388 return; 391 return;
389 392
390 m_toolbar->redrawWorkspaceLabel(true); 393 m_toolbar->redrawWorkspaceLabel(true);
391 m_toolbar->disableUpdates(); 394 if (mode() != NONE) {
392 m_toolbar->delAllIcons(true); 395 m_toolbar->disableUpdates();
393 initForScreen(m_screen); 396 m_toolbar->delAllIcons(true);
394 m_toolbar->enableUpdates(); 397 initForScreen(m_screen);
398 m_toolbar->enableUpdates();
399 }
395 400
396} 401}
397 402