From a5f7e6f809492b67528744f2aa7ebb59c42738b5 Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 28 Jun 2005 10:16:59 +0000 Subject: - Fix for toggling the toolbar doesnt update strut (thanx C. Monti) - Little reordering of ToolbarMenu items, more important ones to the top and "edit current ws" out... maybe we should think of another way of providing menus for the tools .. submenus? --- ChangeLog | 4 ++++ src/Toolbar.cc | 40 +++++++++++++++------------------------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 699ac7d..4f42cf2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.14: +*05/06/28: + * Fix for toggling the toolbar doesnt update strut (thanx C. Monti) + * Little reordering of ToolbarMenu items (Mathias) + Toolbar.cc *05/06/23: * Moved window menu from FluxboxWindow to BScreen, so we now use one window menu per screen instead of one menu per window, diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 8b5def2..9361a4c 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -302,7 +302,7 @@ void Toolbar::updateStrut() { clearStrut(); // we should request space if we're in autohide mode or // if the user dont want to request space for toolbar. - if (doAutoHide() || *m_rc_maximize_over) { + if (doAutoHide() || *m_rc_maximize_over || ! *m_rc_visible) { if (had_strut) screen().updateAvailableWorkspaceArea(); return; @@ -783,53 +783,43 @@ void Toolbar::setupMenus() { typedef RefCount RefCommand; typedef SimpleCommand ToolbarCommand; - //!! TODO: this should be inserted by the workspace tool - - - RefCommand start_edit(CommandParser::instance().parseLine("setworkspacenamedialog")); - menu().insert(_FBTEXT(Toolbar, EditWkspcName, - "Edit current workspace name", "Edit current workspace name"), - start_edit); - menu().setLabel(_FBTEXT(Toolbar, Toolbar, "Toolbar", "Title of Toolbar menu")); - MenuItem *toolbar_menuitem = new IntResMenuItem(_FBTEXT(Toolbar, WidthPercent, "Toolbar width percent", "Percentage of screen width taken by toolbar"), - m_rc_width_percent, - 0, 100, menu()); // min/max value - - RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure)); RefCommand save_resources(CommandParser::instance().parseLine("saverc")); MacroCommand *toolbar_menuitem_macro = new MacroCommand(); toolbar_menuitem_macro->add(reconfig_toolbar); toolbar_menuitem_macro->add(save_resources); - RefCommand reconfig_toolbar_and_save_resource(toolbar_menuitem_macro); - toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource); - - menu().insert(toolbar_menuitem); - - menu().insert(new BoolMenuItem(_FBTEXT(Common, AutoHide, - "Auto hide", "Toggle auto hide of toolbar"), - *m_rc_auto_hide, - reconfig_toolbar_and_save_resource)); MacroCommand *visible_macro = new MacroCommand(); RefCommand toggle_visible(new ToolbarCommand(*this, &Toolbar::updateVisibleState)); visible_macro->add(toggle_visible); + visible_macro->add(reconfig_toolbar); visible_macro->add(save_resources); RefCommand toggle_visible_cmd(visible_macro); menu().insert(new BoolMenuItem(_FBTEXT(Common, Visible, "Visible", "Whether this item is visible"), *m_rc_visible, toggle_visible_cmd)); + menu().insert(new BoolMenuItem(_FBTEXT(Common, AutoHide, + "Auto hide", "Toggle auto hide of toolbar"), + *m_rc_auto_hide, + reconfig_toolbar_and_save_resource)); + + MenuItem *toolbar_menuitem = new IntResMenuItem(_FBTEXT(Toolbar, WidthPercent, "Toolbar width percent", "Percentage of screen width taken by toolbar"), + m_rc_width_percent, + 0, 100, menu()); // min/max value + + + toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource); + menu().insert(toolbar_menuitem); + menu().insert(new BoolMenuItem(_FBTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"), *m_rc_maximize_over, reconfig_toolbar_and_save_resource)); menu().insert(_FBTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), &layerMenu()); - - if (screen().hasXinerama()) { menu().insert(_FBTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"), new XineramaHeadMenu(screen().menuTheme(), -- cgit v0.11.2