new panel look and feel

Marco Martin notmart at gmail.com
Sun Apr 20 21:53:32 CEST 2008


On Sunday 20 April 2008, Aaron J. Seigo wrote:
> On Sunday 20 April 2008, Marco Martin wrote:
> > hmm, there could be either an explicit clearCache() function that deletes
> > everything but the currently used prefix
>
> a little black-magicky, but optimizations often can be that way.
>
> i wonder what the default policy should be: to cache or not to cache. it's
> really only the taskbar that currently needs/wants that, meaning that all
> other users of this class will have to call clearCache() whenever they wish
> to use it or else risk unecessary resource consumption.
the patch is 28.8k now, woha :)
the cache of a single element would always be needed, the cache of multiple 
elements at the moment is useful only in taskbar, probably it won't the norm

so since one cache is still needed i did that
if (!d->useCache) {
    delete d->panels[d->prefix];
    d->panels.remove(oldPrefix);
}

in setElementPrefix()

>
> why not just put a:
>
> PanelData *panel = panels[prefix];
>
> at the start of the method and then replace all instances
> of "panels[prefix]->" with "panel->"?

less ugly, still not overgorgeous but yeah :)

Cheers,
Marco Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: themedtasks4.diff
Type: text/x-diff
Size: 29491 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080420/9d222d38/attachment-0001.bin 


More information about the Panel-devel mailing list