]> Dogcows Code - chaz/openbox/blobdiff - src/Toolbar.cc
BScreen::resource.root_command wasnt being initialized
[chaz/openbox] / src / Toolbar.cc
index 5f226c2d089938bbd7da9d26516d515d9ff98247..6e54b0185415cab69508633849b671503576be4b 100644 (file)
@@ -154,14 +154,13 @@ Toolbar::Toolbar(BScreen &scrn, Resource &conf) : screen(scrn),
   mapToolbar();
 }
 
-int Toolbar::getX() const {
-  return ((m_hidden) ? frame.x_hidden : frame.x);
-}
-
-int Toolbar::getY() const {
-  if (screen.hideToolbar()) return screen.size().h();
-  else if (m_hidden) return frame.y_hidden;
-  else return frame.y;
+Rect Toolbar::area() const {
+  int x = ((m_hidden) ? frame.x_hidden : frame.x);
+  int y;
+  if (screen.hideToolbar()) y = screen.size().h();
+  else if (m_hidden) y = frame.y_hidden;
+  else y = frame.y;
+  return Rect(x, y, frame.width, frame.height);
 }
 
 unsigned int Toolbar::getExposedHeight() const {
@@ -215,7 +214,7 @@ Toolbar::~Toolbar() {
 
 void Toolbar::setOnTop(bool b) {
   m_ontop = b;
-  ostrstream s;
+  std::ostrstream s;
   s << "session.screen" << screen.getScreenNumber() << ".toolbar.onTop" << ends;
   config.setValue(s.str(), m_ontop ? "True" : "False");
   s.rdbuf()->freeze(0);
@@ -223,7 +222,7 @@ void Toolbar::setOnTop(bool b) {
 
 void Toolbar::setAutoHide(bool b) {
   m_autohide = b;
-  ostrstream s;
+  std::ostrstream s;
   s << "session.screen" << screen.getScreenNumber() << ".toolbar.autoHide" <<
     ends;
   config.setValue(s.str(), m_autohide ? "True" : "False");
@@ -232,7 +231,7 @@ void Toolbar::setAutoHide(bool b) {
 
 void Toolbar::setWidthPercent(int w) {
   m_width_percent = w;
-  ostrstream s;
+  std::ostrstream s;
   s << "session.screen" << screen.getScreenNumber() << ".toolbar.widthPercent"
     << ends;
   config.setValue(s.str(), m_width_percent);
@@ -241,7 +240,7 @@ void Toolbar::setWidthPercent(int w) {
 
 void Toolbar::setPlacement(int p) {
   m_placement = p;
-  ostrstream s;
+  std::ostrstream s;
   s << "session.screen" << screen.getScreenNumber() << ".toolbar.placement" <<
     ends;
   const char *placement;
@@ -398,7 +397,7 @@ void Toolbar::reconfigure() {
     if (tt) {
       char t[1025], *time_string = (char *) 0;
       int len = strftime(t, 1024, screen.strftimeFormat(), tt);
-      t[len++-1] = ' ';   // add a space to the string for padding
+      t[len++] = ' ';   // add a space to the string for padding
       t[len] = '\0';
 
       if (i18n->multibyte()) {
This page took 0.026227 seconds and 4 git commands to generate.