[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: [Panel-devel] [PATCH] Package and PackageStructure cleanup
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2007-11-26 9:33:42
Message-ID: 200711260233.43116.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic