summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/Toolbar.cc40
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 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.14: 2Changes for 0.9.14:
3*05/06/28:
4 * Fix for toggling the toolbar doesnt update strut (thanx C. Monti)
5 * Little reordering of ToolbarMenu items (Mathias)
6 Toolbar.cc
3*05/06/23: 7*05/06/23:
4 * Moved window menu from FluxboxWindow to BScreen, so 8 * Moved window menu from FluxboxWindow to BScreen, so
5 we now use one window menu per screen instead of one menu per window, 9 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() {
302 clearStrut(); 302 clearStrut();
303 // we should request space if we're in autohide mode or 303 // we should request space if we're in autohide mode or
304 // if the user dont want to request space for toolbar. 304 // if the user dont want to request space for toolbar.
305 if (doAutoHide() || *m_rc_maximize_over) { 305 if (doAutoHide() || *m_rc_maximize_over || ! *m_rc_visible) {
306 if (had_strut) 306 if (had_strut)
307 screen().updateAvailableWorkspaceArea(); 307 screen().updateAvailableWorkspaceArea();
308 return; 308 return;
@@ -783,53 +783,43 @@ void Toolbar::setupMenus() {
783 typedef RefCount<Command> RefCommand; 783 typedef RefCount<Command> RefCommand;
784 typedef SimpleCommand<Toolbar> ToolbarCommand; 784 typedef SimpleCommand<Toolbar> ToolbarCommand;
785 785
786 //!! TODO: this should be inserted by the workspace tool
787
788
789 RefCommand start_edit(CommandParser::instance().parseLine("setworkspacenamedialog"));
790 menu().insert(_FBTEXT(Toolbar, EditWkspcName,
791 "Edit current workspace name", "Edit current workspace name"),
792 start_edit);
793
794 menu().setLabel(_FBTEXT(Toolbar, Toolbar, 786 menu().setLabel(_FBTEXT(Toolbar, Toolbar,
795 "Toolbar", "Title of Toolbar menu")); 787 "Toolbar", "Title of Toolbar menu"));
796 788
797 MenuItem *toolbar_menuitem = new IntResMenuItem(_FBTEXT(Toolbar, WidthPercent, "Toolbar width percent", "Percentage of screen width taken by toolbar"),
798 m_rc_width_percent,
799 0, 100, menu()); // min/max value
800
801
802 RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure)); 789 RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure));
803 RefCommand save_resources(CommandParser::instance().parseLine("saverc")); 790 RefCommand save_resources(CommandParser::instance().parseLine("saverc"));
804 MacroCommand *toolbar_menuitem_macro = new MacroCommand(); 791 MacroCommand *toolbar_menuitem_macro = new MacroCommand();
805 toolbar_menuitem_macro->add(reconfig_toolbar); 792 toolbar_menuitem_macro->add(reconfig_toolbar);
806 toolbar_menuitem_macro->add(save_resources); 793 toolbar_menuitem_macro->add(save_resources);
807
808 RefCommand reconfig_toolbar_and_save_resource(toolbar_menuitem_macro); 794 RefCommand reconfig_toolbar_and_save_resource(toolbar_menuitem_macro);
809 toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource);
810
811 menu().insert(toolbar_menuitem);
812
813 menu().insert(new BoolMenuItem(_FBTEXT(Common, AutoHide,
814 "Auto hide", "Toggle auto hide of toolbar"),
815 *m_rc_auto_hide,
816 reconfig_toolbar_and_save_resource));
817 795
818 MacroCommand *visible_macro = new MacroCommand(); 796 MacroCommand *visible_macro = new MacroCommand();
819 RefCommand toggle_visible(new ToolbarCommand(*this, &Toolbar::updateVisibleState)); 797 RefCommand toggle_visible(new ToolbarCommand(*this, &Toolbar::updateVisibleState));
820 visible_macro->add(toggle_visible); 798 visible_macro->add(toggle_visible);
799 visible_macro->add(reconfig_toolbar);
821 visible_macro->add(save_resources); 800 visible_macro->add(save_resources);
822 RefCommand toggle_visible_cmd(visible_macro); 801 RefCommand toggle_visible_cmd(visible_macro);
823 menu().insert(new BoolMenuItem(_FBTEXT(Common, Visible, "Visible", "Whether this item is visible"), 802 menu().insert(new BoolMenuItem(_FBTEXT(Common, Visible, "Visible", "Whether this item is visible"),
824 *m_rc_visible, toggle_visible_cmd)); 803 *m_rc_visible, toggle_visible_cmd));
825 804
805 menu().insert(new BoolMenuItem(_FBTEXT(Common, AutoHide,
806 "Auto hide", "Toggle auto hide of toolbar"),
807 *m_rc_auto_hide,
808 reconfig_toolbar_and_save_resource));
809
810 MenuItem *toolbar_menuitem = new IntResMenuItem(_FBTEXT(Toolbar, WidthPercent, "Toolbar width percent", "Percentage of screen width taken by toolbar"),
811 m_rc_width_percent,
812 0, 100, menu()); // min/max value
813
814
815 toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource);
816 menu().insert(toolbar_menuitem);
817
826 menu().insert(new BoolMenuItem(_FBTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"), 818 menu().insert(new BoolMenuItem(_FBTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"),
827 *m_rc_maximize_over, 819 *m_rc_maximize_over,
828 reconfig_toolbar_and_save_resource)); 820 reconfig_toolbar_and_save_resource));
829 menu().insert(_FBTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), &layerMenu()); 821 menu().insert(_FBTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), &layerMenu());
830 822
831
832
833 if (screen().hasXinerama()) { 823 if (screen().hasXinerama()) {
834 menu().insert(_FBTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"), 824 menu().insert(_FBTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"),
835 new XineramaHeadMenu<Toolbar>(screen().menuTheme(), 825 new XineramaHeadMenu<Toolbar>(screen().menuTheme(),