diff options
author | Florian Jung <flo@windfisch.org> | 2011-05-01 18:24:40 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-05-01 18:24:40 +0000 |
commit | f479b0635bb83372dcfad51eb3d13be5d3c02e6d (patch) | |
tree | 87b6e4f04417c1c8f9c25351d30ebd175f639c17 /muse2 | |
parent | 3ed966e02579e9ccae39f080760612af5fe14b4c (diff) |
TopWins can now save and restore their toolbar settings
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/muse/cobject.cpp | 7 |
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"); } |