From 5af8543e8a3d0507897fb71c57522e69dbae5442 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 4 Dec 2002 22:43:18 +0000 Subject: toolbar placement in resource --- src/Screen.cc | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index ea2638a..455748b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.90 2002/12/02 23:19:16 fluxgen Exp $ +// $Id: Screen.cc,v 1.91 2002/12/04 22:43:18 fluxgen Exp $ #include "Screen.hh" @@ -158,6 +158,18 @@ setFromString(const char *strval) { m_value = Toolbar::TOPRIGHT; else if (strcasecmp(strval, "BottomRight")==0) m_value = Toolbar::BOTTOMRIGHT; + else if (strcasecmp(strval, "LeftTop") == 0) + m_value = Toolbar::LEFTTOP; + else if (strcasecmp(strval, "LeftCenter") == 0) + m_value = Toolbar::LEFTCENTER; + else if (strcasecmp(strval, "LeftBottom") == 0) + m_value = Toolbar::LEFTBOTTOM; + else if (strcasecmp(strval, "RightTop") == 0) + m_value = Toolbar::RIGHTTOP; + else if (strcasecmp(strval, "RightCenter") == 0) + m_value = Toolbar::RIGHTCENTER; + else if (strcasecmp(strval, "RightBottom") == 0) + m_value = Toolbar::RIGHTBOTTOM; else setDefaultValue(); } @@ -178,6 +190,7 @@ getString() { template<> string Resource:: getString() { + cerr<<"m_value = "<setItemSelected(2, true); m_toolbar.reset(new Toolbar(this)); + m_toolbar->setPlacement(*resource.toolbar_placement); + m_toolbar->reconfigure(); #ifdef SLIT m_slit.reset(new Slit(this)); @@ -598,11 +631,11 @@ void BScreen::reconfigure() { rootmenu->drawSubmenu(remember_sub); } - + m_toolbar->setPlacement(*resource.toolbar_placement); m_toolbar->reconfigure(); if (m_toolbar->theme().font().isAntialias() != *resource.antialias) m_toolbar->theme().font().setAntialias(*resource.antialias); - m_toolbar->setPlacement(*resource.toolbar_placement); + if (m_slit.get()) m_slit->reconfigure(); -- cgit v0.11.2