summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Screen.cc39
1 files 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 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.90 2002/12/02 23:19:16 fluxgen Exp $ 25// $Id: Screen.cc,v 1.91 2002/12/04 22:43:18 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -158,6 +158,18 @@ setFromString(const char *strval) {
158 m_value = Toolbar::TOPRIGHT; 158 m_value = Toolbar::TOPRIGHT;
159 else if (strcasecmp(strval, "BottomRight")==0) 159 else if (strcasecmp(strval, "BottomRight")==0)
160 m_value = Toolbar::BOTTOMRIGHT; 160 m_value = Toolbar::BOTTOMRIGHT;
161 else if (strcasecmp(strval, "LeftTop") == 0)
162 m_value = Toolbar::LEFTTOP;
163 else if (strcasecmp(strval, "LeftCenter") == 0)
164 m_value = Toolbar::LEFTCENTER;
165 else if (strcasecmp(strval, "LeftBottom") == 0)
166 m_value = Toolbar::LEFTBOTTOM;
167 else if (strcasecmp(strval, "RightTop") == 0)
168 m_value = Toolbar::RIGHTTOP;
169 else if (strcasecmp(strval, "RightCenter") == 0)
170 m_value = Toolbar::RIGHTCENTER;
171 else if (strcasecmp(strval, "RightBottom") == 0)
172 m_value = Toolbar::RIGHTBOTTOM;
161 else 173 else
162 setDefaultValue(); 174 setDefaultValue();
163} 175}
@@ -178,6 +190,7 @@ getString() {
178template<> 190template<>
179string Resource<Toolbar::Placement>:: 191string Resource<Toolbar::Placement>::
180getString() { 192getString() {
193 cerr<<"m_value = "<<m_value<<endl;
181 switch (m_value) { 194 switch (m_value) {
182 case Toolbar::TOPLEFT: 195 case Toolbar::TOPLEFT:
183 return string("TopLeft"); 196 return string("TopLeft");
@@ -197,6 +210,24 @@ getString() {
197 case Toolbar::BOTTOMRIGHT: 210 case Toolbar::BOTTOMRIGHT:
198 return string("BottomRight"); 211 return string("BottomRight");
199 break; 212 break;
213 case Toolbar::LEFTTOP:
214 return string("LeftTop");
215 break;
216 case Toolbar::LEFTCENTER:
217 return string("LeftCenter");
218 break;
219 case Toolbar::LEFTBOTTOM:
220 return string("LeftBottom");
221 break;
222 case Toolbar::RIGHTTOP:
223 return string("RightTop");
224 break;
225 case Toolbar::RIGHTCENTER:
226 return string("RightCenter");
227 break;
228 case Toolbar::RIGHTBOTTOM:
229 return string("RightBottom");
230 break;
200 } 231 }
201 //default string 232 //default string
202 return string("BottomCenter"); 233 return string("BottomCenter");
@@ -383,6 +414,8 @@ BScreen::BScreen(ResourceManager &rm,
383 workspacemenu->setItemSelected(2, true); 414 workspacemenu->setItemSelected(2, true);
384 415
385 m_toolbar.reset(new Toolbar(this)); 416 m_toolbar.reset(new Toolbar(this));
417 m_toolbar->setPlacement(*resource.toolbar_placement);
418 m_toolbar->reconfigure();
386 419
387#ifdef SLIT 420#ifdef SLIT
388 m_slit.reset(new Slit(this)); 421 m_slit.reset(new Slit(this));
@@ -598,11 +631,11 @@ void BScreen::reconfigure() {
598 rootmenu->drawSubmenu(remember_sub); 631 rootmenu->drawSubmenu(remember_sub);
599 } 632 }
600 633
601 634 m_toolbar->setPlacement(*resource.toolbar_placement);
602 m_toolbar->reconfigure(); 635 m_toolbar->reconfigure();
603 if (m_toolbar->theme().font().isAntialias() != *resource.antialias) 636 if (m_toolbar->theme().font().isAntialias() != *resource.antialias)
604 m_toolbar->theme().font().setAntialias(*resource.antialias); 637 m_toolbar->theme().font().setAntialias(*resource.antialias);
605 m_toolbar->setPlacement(*resource.toolbar_placement); 638
606 639
607 if (m_slit.get()) 640 if (m_slit.get())
608 m_slit->reconfigure(); 641 m_slit->reconfigure();