diff options
author | rathnor <rathnor> | 2003-07-20 02:45:57 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-07-20 02:45:57 (GMT) |
commit | ace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e (patch) | |
tree | 1943fde6b3bced84b1b6634b1f36bfa877ef6f29 /src/ToolbarHandler.cc | |
parent | 1631ed814cb8665516673706637084dfa1485f87 (diff) | |
download | fluxbox_pavel-ace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e.zip fluxbox_pavel-ace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e.tar.bz2 |
fix toolbarmode = OFF bug, plus add toolbar menu back to screen's config menu
Diffstat (limited to 'src/ToolbarHandler.cc')
-rw-r--r-- | src/ToolbarHandler.cc | 19 |
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 | ||
160 | void ToolbarHandler::setMode(ToolbarMode newmode, bool initialise) { | 164 | void 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 | ||
386 | void ToolbarHandler::updateCurrentWorkspace(BScreen &screen) { | 389 | void 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 | ||