summaryrefslogtreecommitdiff
path: root/muse2/muse/cobject.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-01 18:24:40 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-01 18:24:40 +0000
commitf479b0635bb83372dcfad51eb3d13be5d3c02e6d (patch)
tree87b6e4f04417c1c8f9c25351d30ebd175f639c17 /muse2/muse/cobject.cpp
parent3ed966e02579e9ccae39f080760612af5fe14b4c (diff)
TopWins can now save and restore their toolbar settings
Diffstat (limited to 'muse2/muse/cobject.cpp')
-rw-r--r--muse2/muse/cobject.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index dc257425..22f675a3 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -28,6 +28,10 @@ void TopWin::readStatus(Xml& xml)
resize(r.size());
move(r.topLeft());
}
+ else if (tag == "toolbars") {
+ if (!restoreState(QByteArray::fromHex(xml.parse1().toAscii())))
+ fprintf(stderr,"ERROR: couldn't restore toolbars. however, this is not really a problem.\n");
+ }
else
xml.unknown("TopWin");
break;
@@ -53,6 +57,9 @@ void TopWin::writeStatus(int level, Xml& xml) const
geometry().width(),
geometry().height());
xml.tag(level--, "/geometry");
+
+ xml.strTag(level, "toolbars", saveState().toHex().data());
+
xml.tag(level, "/topwin");
}