[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: new layout of koffice apps
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2008-06-21 10:19:05
Message-ID: 200806211219.05543.boud () valdyas ! org
[Download RAW message or body]
On Saturday 21 June 2008, Thomas Zander wrote:
> Not sure what krita does; I'd love to see a wiki page on why the default
> Qt concept of restoring dockers doesn't work for Krita. It seems to work
> just fine for KWord AFAICT.
> In KWord (and any Qt app) all dockers can be positioned and stacked by the
> application and this will be seen as a *default*, and user alterations are
> restored upon restart
The restoring works fine, that's what I'm counting on. But placing the dockers
initially through code is hard to do with plugins (because their
instantiation isn't controlled by the main app). So what I did was arrange my
dockers to my satisfaction, close Krita, wait for kconfig to synch the state
and copy the string that describes the docker state into my code and use that
if there isn't a docker state stored yet:
// XXX: This state is taken from a kritarc where the docker constellation was
configured by hand to look
// like the krita 1.6 configuration. Setting this state if none is
present seems to work, but there's
// still hte versioning problem to be accounted for.
QString
state="AAAA/wAAAAD9AAAAAgAAAAAAAAAwAAACYPwCAAAAAfsAAAAOAFQAbwBvAGwAQgBvAHgBAAAATAAAAmA \
AAAHdAAgAFQAAAAEAAADeAAACYPwCAAAAC/wAAABMAAAA1AAAANQBAAAg+gAAAAECAAAAAvsAAAAaAEsAaQBzA \
EIAaQByAGQAZQB5AGUAQgBvAHgBAAAAAP////8AAAA5AP////sAAAAmAEsAbwBUAG8AbwBsAE8AcAB0AGkAbwB \
uAHMARABvAGMAawBlAHIBAAAAAP////8AAACzAP////wAAAEmAAAAxwAAAAAA////+v////8CAAAAA/sAAAAaA \
EsAbwBDAG8AbABvAHIARABvAGMAawBlAHIAAAAAAP////8AAACmAP////sAAAAgAEsAaQBzAFAAYQBsAGUAdAB \
0AGUARABvAGMAawBlAHIAAAAAAP////8AAACSAP////sAAAAiAFMAdAByAG8AawBlACAAUAByAG8AcABlAHIAd \
ABpAGUAcwAAAAAA/////wAAALYA////+wAAACQAUwBtAGEAbABsAEMAbwBsAG8AcgBTAGUAbABlAGMAdABvAHI \
BAAABJgAAAEYAAABGAAAAXPsAAAAWAEsAaQBzAEwAYQB5AGUAcgBCAG8AeAEAAAFyAAABOgAAAKQA////+wAAA \
C4ASwBvAFMAaABhAHAAZQBDAG8AbABsAGUAYwB0AGkAbwBuAEQAbwBjAGsAZQByAAAAAAD/////AAAAWAD//// \
7AAAAIgBTAGgAYQBkAG8AdwAgAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAAP////8AAACZAP////sAAAAgAFMAa \
ABhAHAAZQAgAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAAP////8AAAAUAP////sAAAAkAFMAaQBtAHAAbABlACA \
AVABlAHgAdAAgAEUAZABpAHQAbwByAAAAAAD/////AAAA5gD////7AAAAEgBTAGMAcgBpAHAAdABpAG4AZwAAA \
AAA/////wAAAHIA////+wAAADAASwBpAHMAVAByAGkAYQBuAGcAbABlAEMAbwBsAG8AcgBTAGUAbABlAGMAdAB \
vAHIAAAACnQAAAHgAAAB4AP////sAAAAqAFMAcABlAGMAaQBmAGkAYwBDAG8AbABvAHIAUwBlAGwAZQBjAHQAb \
wByAAAAArMAAADVAAAAnwD///8AAALeAAACYAAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGE \
AaQBuAFQAbwBvAGwAQgBhAHIBAAAAAAAAAI0AAAAAAAAAAAAAAB4AQgByAHUAcwBoAGUAcwBBAG4AZABTAHQAdQBmAGYBAAAAjQAAA2sAAAAAAAAAAA==";
KConfigGroup group( KGlobal::config(), "krita" );
if (!group.hasKey("State")) {
group.writeEntry("State", state);
}
That way, even if a new docker plugin (like the second shape selector that
suddenly appears in other apps) is added the user won't see it on first run
but the ui the app designer had in mind.
Personally, I still that docker state ought to be descibed by kxmlgui, but I
have so much half-done features to finish and bugs to fix that I'm satisfied
with this solution.
--
Boudewijn Rempt
http://www.valdyas.org/fading/index.cgi
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic