From 11673856e37e068dcfc637a5faa2493e5b781ac1 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 10 Jul 2003 15:52:58 +0000 Subject: added maximize over resource and menu item --- src/Toolbar.cc | 9 ++++++--- src/Toolbar.hh | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 19d7a4d..fca4666 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.99 2003/07/10 13:46:47 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.100 2003/07/10 15:52:58 fluxgen Exp $ #include "Toolbar.hh" @@ -264,6 +264,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi m_strut(0), m_rc_auto_hide(scrn.resourceManager(), false, scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"), + m_rc_maximize_over(scrn.resourceManager(), false, + scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), m_rc_width_percent(scrn.resourceManager(), 65, scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"), m_rc_layernum(scrn.resourceManager(), Fluxbox::Layer(Fluxbox::instance()->getDesktopLayer()), @@ -355,7 +357,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()) { + if (doAutoHide() || *m_rc_maximize_over) { if (had_strut) screen().updateAvailableWorkspaceArea(); return; @@ -1380,7 +1382,8 @@ void Toolbar::setupMenus() { "Auto hide"), *m_rc_auto_hide, reconfig_toolbar_and_save_resource)); - + menu.insert(new BoolMenuItem("Maximize Over", *m_rc_maximize_over, + reconfig_toolbar_and_save_resource)); menu.insert("Layer...", &tbar.layermenu()); if (tbar.screen().hasXinerama()) { diff --git a/src/Toolbar.hh b/src/Toolbar.hh index b6732f4..59b1600 100644 --- a/src/Toolbar.hh +++ b/src/Toolbar.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.hh,v 1.37 2003/07/10 11:45:22 fluxgen Exp $ +// $Id: Toolbar.hh,v 1.38 2003/07/10 15:52:58 fluxgen Exp $ #ifndef TOOLBAR_HH #define TOOLBAR_HH @@ -36,6 +36,7 @@ #include "XLayer.hh" #include "XLayerItem.hh" #include "LayerMenu.hh" +#include "Resource.hh" #include @@ -201,7 +202,7 @@ private: Strut *m_strut; ///< created and destroyed by BScreen // resources - FbTk::Resource m_rc_auto_hide; + FbTk::Resource m_rc_auto_hide, m_rc_maximize_over; FbTk::Resource m_rc_width_percent; FbTk::Resource m_rc_layernum; FbTk::Resource m_rc_on_head; -- cgit v0.11.2