[Panel-devel] Desktop Icons Patch

Christopher Blauvelt cblauvelt at gmail.com
Wed Dec 12 23:23:42 CET 2007


Is the patch good to commit?  I'd like to commit before it gets stale given
the changes taking place in desktop.h/cpp.
Chris

On Dec 10, 2007 11:17 PM, Christopher Blauvelt <cblauvelt at gmail.com> wrote:

>
>
> 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/20071212/9ebb9907/attachment.html 


More information about the Panel-devel mailing list