]> Dogcows Code - chaz/openbox/blobdiff - src/Slit.cc
on reconfigure, if an option isn't specified in the rc file, then it will revert...
[chaz/openbox] / src / Slit.cc
index 38af8b93ffce389f104cc4c97a1eb3fa2f9b59bf..c803d48b3c0f35f138015767f4867e365daa09fb 100644 (file)
 Slit::Slit(BScreen &scr, Resource &conf) : screen(scr),
   openbox(scr.getOpenbox()), config(conf)
 {
-  // default values
-  m_placement = CenterRight;
-  m_direction = Vertical;
-  m_ontop = false;
-  m_hidden = m_autohide = false;
   load();
   
   display = screen.getBaseDisplay().getXDisplay();
@@ -293,7 +288,8 @@ void Slit::load() {
       m_placement = BottomRight;
     else if (0 == strncasecmp(s.c_str(), "CenterRight", s.length()))
       m_placement = CenterRight;
-  }
+  } else
+    m_placement = CenterRight;
 
   rname.seekp(0); rclass.seekp(0);
   rname << rscreen.str() << "slit.direction" << ends;
@@ -303,19 +299,25 @@ void Slit::load() {
       m_direction = Horizontal;
     else if (0 == strncasecmp(s.c_str(), "Vertical", s.length()))
       m_direction = Vertical;
-  }
+  } else
+    m_direction = Vertical;
  
   rname.seekp(0); rclass.seekp(0);
   rname << rscreen.str() << "slit.onTop" << ends;
   rclass << rscreen.str() << "Slit.OnTop" << ends;
   if (config.getValue(rname.str(), rclass.str(), b))
     m_ontop = b;
+  else
+    m_ontop = false;
 
   rname.seekp(0); rclass.seekp(0);
   rname << rscreen.str() << "slit.autoHide" << ends;
   rclass << rscreen.str() << "Slit.AutoHide" << ends;
   if (config.getValue(rname.str(), rclass.str(), b))
     m_hidden = m_autohide = b;
+  else
+    m_hidden = m_autohide = false;
+
   rscreen.rdbuf()->freeze(0);
   rname.rdbuf()->freeze(0);
   rclass.rdbuf()->freeze(0);
This page took 0.027031 seconds and 4 git commands to generate.