[Panel-devel] [PATCH] Package and PackageStructure cleanup
Aaron J. Seigo
aseigo at kde.org
Mon Nov 26 10:33:42 CET 2007
On Sunday 25 November 2007, Paolo Capriotti wrote:
> 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.
yes, findAllResources is only files
> For example, how can I get a list of all
> packages in <appdata>/backgrounds/ ?
locating the backgrounds dirs (using findDirs) and then listing in each of
those?
> 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,
my original idea was to exract the .desktop file on installation and put it in
the services directory (after giving the file a proper name, of course, to
prevent collisions with other files) so that ksycoca would pick it up.
eliminates the whole problem, really.
> which at the moment requires you to know a base path.
well, yes, that's obviously a prerequisite to loading the packages unless we
put all the packages for all apps and of all types into some well known
hierarchy on disk. that said, the base path argument should probably be more
KStandardDirs friendly; e.g. if it is given as a relative path it should be
assumed to be in appdata.
> > * 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)?
or using the zip filter support in kio to just read directly out of the
file ... and yes, that would be very cool. =)
the patch looks good, btw. pls apply
--
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/20071126/3b9120c0/attachment.pgp
More information about the Panel-devel
mailing list