[Panel-devel] [PATCH] Package refactoring
Aaron J. Seigo
aseigo at kde.org
Sat Dec 1 23:33:14 CET 2007
On Saturday 01 December 2007, Paolo Capriotti wrote:
> Hi,
> this is a refactoring of the Package classes, as previously discussed
> with Aaron. A list of changes:
> - Icon, preview and screenshots are gone from the metadata. The icon
> field can still be written in the desktop file by
> PackageMetadata::write. Packages don't have associated icon, previews
> and screenshots anymore,
this means that we now have to open each package to get at these things. this
is going to be too slow for use in package browsers (such as the applet
engine). we don't need both "preview" and "screenshot" (not even sure what
the difference was supposed to be in the first place, may be they both got
added unintentionally), but we do need both an icon and a screenshot
available in the .desktop file.
> but they can handle them just like any other
> file, by setting appropriate entries in their PackageStructure.
making them also available in the package structure is a good idea, so that
the .desktop file is used essentially as a hot-path cache, prevents needing
the metadata more than necessary as well as making an obvious way to present
this data to the metadata. all good things.
> Comments?
is there a reason why the plasmoidpackgetest includes packages.cpp instead of
the header? it should probably just include the header and link to libplasma
so as to provide a more realistic test, no?
the rest looks good =)
ideas for down the road:
we should eventually do some profiling on this class as well to find out where
the bumps, if any are, since this will likely end up being used often in
performance critical paths. for instance, i really don't know if we need to
construct the metadata object until metadata() is called. that's something i
can clean up post-commit though.
i'm also a little concerned about how easy it will be to write creation tools
around this; as it stands they can use the PackageStructure to create the
on-disk layout and then call createPackage to have it bundled up. it might be
worthwhile, however, to allow absolute paths in PackageStructure for the
point of creating packages and have a createPackage that works off of a
PackageStructure object.
for the purpose of use in creation tools, we may also want to add a
PackageStructure::save(KConfigBase*) and PackageStructure::open(KConfigBase*)
so that they can be used as part of project files.
that can wait for plasmagik and/or other design tools to come about though, at
which point their needs can push the design a bit more here.
--
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/20071201/e51a3bc0/attachment.pgp
More information about the Panel-devel
mailing list