[Panel-devel] Desktop Icons Patch

Christopher Blauvelt cblauvelt at gmail.com
Tue Dec 11 06:17:21 CET 2007


On Dec 9, 2007 1:06 PM, Aaron J. Seigo <aseigo at kde.org> wrote:

> On Sunday 09 December 2007, you wrote:
> > I sent a patch on Thursday and hadn't heard anything back yet so I was
> just
> > checking to see if you'd gotten a chance to take a look at it.  Just
>
> breifly, yes. please send patches to panel-devel at kde.org though, not
> directly
> to me. i may be busy for a few days, it can get lost in my inbox (which is
> much busier and less focussed than the folders mailing lists get sorted
> out
> into), etc.
>
> as for the patch ... please follow the plasma coding style, which is the
> kdelibs coding style[1]. in particular, there must be a space between if,
> foreach, while, etc... and the openning parens. so this:
>
>  if(!desktop) {
>
> becomes
>
>  if (!desktop) {
>
> if you're wondering what the point of that is, it actually is useful not
> only
> for visual scanning but also for grepping of method calls (which don't
> have
> that space).
>
> the for loop in newItems could be a foreach as well ...
>
> the init() method will only work if it is run at desktop startup, due to
> the
> config not having the url until the Url applet is saved; so if an icon is
> created at runtime and its config checked right away, it'll come up as not
> having a url in the config. this could be adjust in the Url applet by
> having
> it set the value in its config() in Url::setUrl if it is an issue.
>
> disconnectin signals is done for you on destruction, so strictly speaking
> you
> don't need to do that in ~IconLoader.
>
> the correct way to get the home dir is KGlobalSettings::desktopPath(),
> rather
> than KUrl homedir(i18n("~/Desktop"));
>
> m_icons should not be called from constraintsUpdated without a guard since
> that gets called repeatedly over the life of the containment. you'll need
> to
> put a guard either in IconLoader::init or in
> DefaultDesktop::constraintsUpdated to ensure that it doesn't get run more
> than once.
>
> [1] http://techbase.kde.org/Policies/Kdelibs_Coding_Style
>
> --
> 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
>

Made changes and it now reacts to a launcher applets being destroyed by the
user without crashing when the corresponding file is deleted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20071210/bc8263ad/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iconloader.diff
Type: text/x-diff
Size: 8746 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071210/bc8263ad/attachment.bin 


More information about the Panel-devel mailing list