(resource.sloppy_focus ?
(resource.auto_raise ? "AutoRaiseSloppyFocus" : "SloppyFocus")
: "ClickToFocus"));
+ s.rdbuf()->freeze(0);
}
void BScreen::setAutoRaise(bool a) {
(resource.sloppy_focus ?
(resource.auto_raise ? "AutoRaiseSloppyFocus" : "SloppyFocus")
: "ClickToFocus"));
+ s.rdbuf()->freeze(0);
}
void BScreen::setImageDither(bool d) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".imageDither" << ends;
config.setValue(s.str(), resource.image_dither);
+ s.rdbuf()->freeze(0);
}
void BScreen::setOpaqueMove(bool o) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".opaqueMove" << ends;
config.setValue(s.str(), resource.opaque_move);
+ s.rdbuf()->freeze(0);
}
void BScreen::setFullMax(bool f) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".fullMaximization" << ends;
config.setValue(s.str(), resource.full_max);
+ s.rdbuf()->freeze(0);
}
void BScreen::setFocusNew(bool f) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".focusNewWindows" << ends;
config.setValue(s.str(), resource.focus_new);
+ s.rdbuf()->freeze(0);
}
void BScreen::setFocusLast(bool f) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".focusLastWindow" << ends;
config.setValue(s.str(), resource.focus_last);
+ s.rdbuf()->freeze(0);
}
void BScreen::setWindowZones(int z) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".windowZones" << ends;
config.setValue(s.str(), resource.zones);
+ s.rdbuf()->freeze(0);
}
void BScreen::setWorkspaceCount(int w) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".workspaces" << ends;
config.setValue(s.str(), resource.workspaces);
+ s.rdbuf()->freeze(0);
}
void BScreen::setPlacementPolicy(int p) {
case RowSmartPlacement: placement = "RowSmartPlacement"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void BScreen::setEdgeSnapThreshold(int t) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".edgeSnapThreshold" << ends;
config.setValue(s.str(), resource.edge_snap_threshold);
+ s.rdbuf()->freeze(0);
}
void BScreen::setRowPlacementDirection(int d) {
config.setValue(s.str(),
resource.row_direction == LeftRight ?
"LeftToRight" : "RightToLeft");
+ s.rdbuf()->freeze(0);
}
void BScreen::setColPlacementDirection(int d) {
config.setValue(s.str(),
resource.col_direction == TopBottom ?
"TopToBottom" : "BottomToTop");
+ s.rdbuf()->freeze(0);
}
void BScreen::setRootCommand(const char *cmd) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".strftimeFormat" << ends;
config.setValue(s.str(), resource.strftime_format);
+ s.rdbuf()->freeze(0);
}
#else // !HAVE_STRFTIME
s << "session.screen" << getScreenNumber() << ".dateFormat" << ends;
config.setValue(s.str(), resource.date_format == B_EuropeanDate ?
"European" : "American");
+ s.rdbuf()->freeze(0);
}
void BScreen::setClock24Hour(Bool c) {
ostrstream s;
s << "session.screen" << getScreenNumber() << ".clockFormat" << ends;
config.setValue(s.str(), resource.clock24hour ? 24 : 12);
+ s.rdbuf()->freeze(0);
}
#endif // HAVE_STRFTIME
ostrstream s;
s << "session.screen" << getScreenNumber() << ".hideToolbar" << ends;
config.setValue(s.str(), resource.hide_toolbar ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void BScreen::saveWorkspaceNames() {
- ostrstream rc, names;
-
- for (int i = 0; i < resource.workspaces; i++) {
- Workspace *w = getWorkspace(i);
- if (w != NULL) {
- names << w->getName();
- if (i < resource.workspaces-1)
- names << ',';
- }
+ ostrstream rc, names;
+
+ for (int i = 0; i < resource.workspaces; i++) {
+ Workspace *w = getWorkspace(i);
+ if (w != NULL) {
+ names << w->getName();
+ if (i < resource.workspaces-1)
+ names << ',';
}
- names << ends;
+ }
+ names << ends;
- rc << "session.screen" << getScreenNumber() << ".workspaceNames" << ends;
- config.setValue(rc.str(), names.str());
+ rc << "session.screen" << getScreenNumber() << ".workspaceNames" << ends;
+ config.setValue(rc.str(), names.str());
+ rc.rdbuf()->freeze(0);
+ names.rdbuf()->freeze(0);
}
void BScreen::save() {
rclass << rscreen.str() << "OpaqueMove" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.opaque_move = b;
+ rscreen.rdbuf()->freeze(0);
+ rname.rdbuf()->freeze(0);
+ rclass.rdbuf()->freeze(0);
}
void BScreen::reconfigure(void) {
ostrstream s;
s << "session.screen" << screen.getScreenNumber() << ".slit.onTop" << ends;
config.setValue(s.str(), m_ontop ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Slit::setAutoHide(bool b) {
ostrstream s;
s << "session.screen" << screen.getScreenNumber() << ".slit.autoHide" << ends;
config.setValue(s.str(), m_autohide ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Slit::setPlacement(int p) {
case CenterRight: default: placement = "CenterRight"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void Slit::setDirection(int d) {
ends;
config.setValue(s.str(),
m_direction == Horizontal ? "Horizontal" : "Vertical");
+ s.rdbuf()->freeze(0);
}
void Slit::save() {
rclass << rscreen.str() << "Slit.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 Slit::reconfigure(void) {
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) {
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) {
s << "session.screen" << screen.getScreenNumber() << ".toolbar.widthPercent"
<< ends;
config.setValue(s.str(), m_width_percent);
+ s.rdbuf()->freeze(0);
}
void Toolbar::setPlacement(int p) {
case BottomCenter: default: placement = "BottomCenter"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void Toolbar::save() {
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() {