summaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-04-19 06:51:08 +0000
committerDana Jansens <danakj@orodu.net>2002-04-19 06:51:08 +0000
commit940c1f614fa380a9153c3b81d0614201b27957c2 (patch)
treeb73bd340edf433355a87b07324d087345ba723cb /src/Toolbar.cc
parent8ebee960ba8dea0ac372fd14156a6b86edf9cff7 (diff)
temprary fix for the memleaks in ::load() and ::set* when using ostrstreams. Need to find a better solution for strings than std::string and ostrstream, or else put up with memory leaks all over the place.
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index d0753aab..a6da46a9 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -223,6 +223,7 @@ void Toolbar::setOnTop(bool b) {
ostrstream s;
s << "session.screen" << screen.getScreenNumber() << ".toolbar.onTop" << ends;
config.setValue(s.str(), m_ontop ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Toolbar::setAutoHide(bool b) {
@@ -231,6 +232,7 @@ void Toolbar::setAutoHide(bool b) {
s << "session.screen" << screen.getScreenNumber() << ".toolbar.autoHide" <<
ends;
config.setValue(s.str(), m_autohide ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Toolbar::setWidthPercent(int w) {
@@ -239,6 +241,7 @@ void Toolbar::setWidthPercent(int w) {
s << "session.screen" << screen.getScreenNumber() << ".toolbar.widthPercent"
<< ends;
config.setValue(s.str(), m_width_percent);
+ s.rdbuf()->freeze(0);
}
void Toolbar::setPlacement(int p) {
@@ -256,6 +259,7 @@ void Toolbar::setPlacement(int p) {
case BottomCenter: default: placement = "BottomCenter"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void Toolbar::save() {
@@ -306,6 +310,9 @@ void Toolbar::load() {
rclass << rscreen.str() << "Toolbar.AutoHide" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
m_hidden = m_autohide = b;
+ rscreen.rdbuf()->freeze(0);
+ rname.rdbuf()->freeze(0);
+ rclass.rdbuf()->freeze(0);
}
void Toolbar::reconfigure() {