[Panel-devel] refactoring plasmagik..

Aaron J. Seigo aseigo at kde.org
Mon Oct 22 02:37:13 CEST 2007


On Sunday 21 October 2007, Andrea Diamantini wrote:
> 1) plasmagik needs a doUpload() function, i'll try to implement it next
> days (but help is welcome..)
>
> 2) did user need to choice whether uploading or just creating package?

yes, i think we need to let them either Save the package or Upload the 
package. the difference between the two is that Save will bring up a file 
dialog while Upload should use GetHotNewStuff2

> 3) should user need to choice package dest dir?

this can happen if they select Save, right?

> 4) plasmagik works with a packagestructure given (i think) from the app
> needing plasmagik. I don't understand how retrieving information from
> packagestructure (eg: how retrieve mimetypes if plasmagik doesn't know
> keys?)

yes, sorry, the API of that class is still a little rough. essentially, what 
you can do is something like this:

QStringList mimetypes;
foreach (const QString &key, package.files()) {
    mimetype << package.mimetypes(key);
}

foreach (const QString &key, package.directories()) {
    mimetype << package.mimetypes(key);
}

unfortunately this has several drawbacks. specifically, you're likely to get 
duplicates of the mimetypes. what i had envisioned happening, really, was 
that one would likely popuplate a tree widget with all the directories and 
files and one could find the associated mimetypes for those entries. so the 
user might click on "Main Script" in the list and then select a file of type 
text/javascript (or whatever).

one of the API shortcomings of this class is that it inconsistently uses char* 
and QString. it should probably just use QString everywhere. i'm going to 
investigate right now why it is the way it is and, hopefully, fix that.

i'd really like to avoid exposing ContentStructure if possible, but if it 
feels more natural, it might be a way to go.

-- 
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 Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071021/2ffc071d/attachment.pgp 


More information about the Panel-devel mailing list