From f479b0635bb83372dcfad51eb3d13be5d3c02e6d Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 1 May 2011 18:24:40 +0000 Subject: TopWins can now save and restore their toolbar settings --- muse2/muse/cobject.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'muse2') 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"); } -- cgit v1.2.3