all repos — fluxbox @ 955e3865b66c46d3f0308d5ce809dab169d90613

custom fork of the fluxbox windowmanager

added toolbar placement resource
fluxgen fluxgen
commit

955e3865b66c46d3f0308d5ce809dab169d90613

parent

50d8c9a8a166b15734c72d292938e540b44e037e

2 files changed, 13 insertions(+), 7 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.114 2003/02/22 16:09:44 rathnor Exp $ +// $Id: Screen.cc,v 1.115 2003/02/23 00:56:09 fluxgen Exp $ #include "Screen.hh"

@@ -373,7 +373,8 @@ slit_layernum(rm, Fluxbox::instance()->getDockLayer(), scrname+".slit.layer", altscrname+".Slit.Layer"),

toolbar_layernum(rm, Fluxbox::instance()->getDesktopLayer(), scrname+".toolbar.layer", altscrname+".Toolbar.Layer"), tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"), tab_alignment(rm, Tab::ALEFT, scrname+".tab.alignment", altscrname+".Tab.Alignment"), - toolbar_on_head(rm, 0, scrname+".toolbar.onhead", altscrname+".Toolbar.onHead") + toolbar_on_head(rm, 0, scrname+".toolbar.onhead", altscrname+".Toolbar.onHead"), + toolbar_placement(rm, Toolbar::BOTTOMCENTER, scrname+".toolbar.placement", altscrname+".Toolbar.Placement") { };

@@ -524,6 +525,7 @@ m_slit.reset(new Slit(*this, *layerManager().getLayer(getSlitLayerNum())));

#endif // SLIT m_toolbar.reset(new Toolbar(*this, *layerManager().getLayer(getToolbarLayerNum()))); + m_toolbar->setPlacement(*resource.toolbar_placement); // setup toolbar width menu item FbTk::MenuItem *toolbar_menuitem = new IntResMenuItem("Toolbar width percent", resource.toolbar_width_percent,

@@ -542,7 +544,7 @@ FbTk::RefCount<FbTk::Command> reconfig_toolbar_and_save_resource(toolbar_menuitem_macro);

toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource); - m_toolbar->menu().insert(toolbar_menuitem); + m_toolbar->menu().insert(toolbar_menuitem, 0); setupWorkspacemenu(*this, *workspacemenu);

@@ -758,8 +760,11 @@ if (m_toolbar->theme().font().isAntialias() != *resource.antialias)

m_toolbar->theme().font().setAntialias(*resource.antialias); #ifdef SLIT - if (m_slit.get()) + if (m_slit.get()) { + m_slit->setPlacement(static_cast<Slit::Placement>(getSlitPlacement())); + m_slit->setDirection(static_cast<Slit::Direction>(getSlitDirection())); m_slit->reconfigure(); + } #endif // SLIT //reconfigure workspaces
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.71 2003/02/22 16:09:44 rathnor Exp $ +// $Id: Screen.hh,v 1.72 2003/02/23 00:55:07 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -79,6 +79,7 @@ int scrn, int number_of_layers);

~BScreen(); inline bool doToolbarAutoHide() const { return *resource.toolbar_auto_hide; } + inline Toolbar::Placement toolbarPlacement() const { return *resource.toolbar_placement; } inline bool isSloppyFocus() const { return (*resource.focus_model == Fluxbox::SLOPPYFOCUS); } inline bool isSemiSloppyFocus() const { return (*resource.focus_model == Fluxbox::SEMISLOPPYFOCUS); } inline bool isRootColormapInstalled() const { return root_colormap_installed; }

@@ -196,7 +197,7 @@ //DEL inline void saveAutoRaise(bool a) { resource.auto_raise = a; }

inline void saveWorkspaces(int w) { *resource.workspaces = w; } inline void saveToolbarAutoHide(bool r) { *resource.toolbar_auto_hide = r; } inline void saveToolbarWidthPercent(int w) { *resource.toolbar_width_percent = w; } - + inline void saveToolbarPlacement(Toolbar::Placement place) { *resource.toolbar_placement = place; } inline void saveToolbarOnHead(int head) { *resource.toolbar_on_head = head; }

@@ -394,7 +395,7 @@

Resource<Tab::Placement> tab_placement; Resource<Tab::Alignment> tab_alignment; Resource<int> toolbar_on_head; - + Resource<Toolbar::Placement> toolbar_placement; bool slit_auto_hide; int slit_placement, slit_direction;