javascript API for setting up interface defaults

Aaron J. Seigo aseigo at kde.org
Thu Sep 1 14:30:20 UTC 2011


On Thursday, September 1, 2011 14:07:29 Marco Martin wrote:
> for 1.0 tough?

maybe not; let's see how other bits of this come together (such as the panel)

> but,  is not said that there is one true panel, that depends from the
> homescreen qml (and btw atm there are 2 top panel containments, the
> windowstrip still is a c++ containment since didn't find any better way to)

hm.. ok.. so then we need to be able to know, based on the homescreen qml, 
what panels are available. i don't want the javascript to be able to create 
panels as that will run into conflict with defining the shell using the QML.

or, put another way, how much influence do we wish to give the javascript 
setup on the shape of the shell?

i'd rather see the QML define the shell, and the javascript merely populate 
it. in which case the JS should only be able to see which panels are 
available. it would be very smart imho if those panels were given some meaning 
as well: the StatusPanel, for instance, would be where all status icons and 
what not would go.

in fact, i almost wonder if these two things shouldn't just come together: the 
homescreen qml and the javascript that populates it on first run. if you want 
to change the javascript, you ship a new package with the homescreen qml as 
well. or is there some benefit to keeping them separate (such as more easy re-
use; which would imply that on _one_ system there would be multiple "first-
run" setups of the same QML shell possible).
 
> after that is solved, needs a way to tell the systray contanment add *at
> center*: that containment is qml only, so must be found a way here too how
> to export additional api from it (also, i wouldn't particularly like the
> script language in the shell assumes a particular thing about one of the
> containments)

well, remember that we are creating a more constranted system here. it's also 
completely plausible that if the panel understands the concepts of "left, 
right, center" that it honors those requests. we simply need a way of 
communicating "left, right, center" to the containment when asking for the 
addition of the widget. the containment could even perhaps advertise where it 
allows widgets to be added, giving various keywords.

i haven't figured out how to do this yet in the code, but from an API 
perspective it's, at least to me, the obviously right thing to do.

> but it could be easily converted in number of cells, so:
> Application:0,0,1,1;Resource:1,3,4,1;

how are the cells calculated currently? is there a fixed unit (e.g. 178px)? is 
the unit based on screen resolution? etc...

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/active/attachments/20110901/7e094429/attachment.sig>


More information about the Active mailing list