[Panel-devel] [PATCH] Package and PackageStructure cleanup

Paolo Capriotti p.capriotti at gmail.com
Sun Nov 25 10:28:22 CET 2007


Hi,
thanks for the review. This is an updated patch, with only const methods 
and the additional Package constructor. There is also a couple of fixes 
to make the tests pass (they were already failing before the patch).

> use cases include plasmoids and svg themes, examples of each of those can be 
> seen in packages.cpp.
> [...]
> * to easily locate packages

I had problems with this bit. AFAICT, KStandardDirs only returns paths 
to files, not to directories. For example, how can I get a list of all 
packages in <appdata>/backgrounds/ ?
At the moment, I'm using the fact that each package contains a 
metadata.desktop file and look for them using locate("appdata", 
"backgrounds/*/metadata.desktop"). Not very clean, though.
I think that some variation on this trick should be encapsulated inside 
Package::knownPackages, which at the moment requires you to know a base 
path.

> * to install packages from archives

Would it be useful to have a variation of this, where you pass a zipped 
package to the Package constructor, and it transparently handles it as 
if it were installed (probably unzipping it in a temporary location)?

Paolo Capriotti

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup3.patch
Type: text/x-diff
Size: 7513 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071125/b27b11bd/attachment.bin 


More information about the Panel-devel mailing list