Patch: New KRunner searches context of Dolphin Places Panel
Aaron J. Seigo
aseigo at kde.org
Thu Sep 4 23:50:21 CEST 2008
On Thursday 04 September 2008, David Edmundson wrote:
> Hey all,
>
> This krunner adds all the bookmarks and devices that you would expect to
> find in the dolphin Places panel, or the "computer" tab in the application
> launcher to the krunner list. See code attached.
>
> I had some pointers from Sebastian Kűgler, so I should thank him in this
> email.
>
> It's my first time submitting anything plasma related, so I've probably
> missed out some parts of your coding standard. Feel free to point out
> mistakes or fix it :-)
m_filePlaces = new KFilePlacesModel();
this gets leaked; you probably want to do:
m_filePlaces = new KFilePlacesModel(this);
so that it gets automatically deleted when the runner does.
the object name doesn't actually need to be translated anymore, so this:
setObjectName(i18n("Places"));
becomes just:
setObjectName("Places");
and you can get rid of:
KGlobal::locale()->insertCatalog("krunner_placesrunner");
as there are no more translated strings left =)
it would be good to show an error, perhaps via KMessageBox, when setup fails
in setupComplete; silent failures suck for the user.
otherwise it looks good.
if you'd like to add this to kdeplasma-addons you may; if you (or someone else
suggests) that we add this to kdebase, then we'll want to clean up the
whitespace in places (kdeplasma-addons is more relaxed; in kdebase we stick to
the coding style guide as much as humanly possible).
personally i think this belongs in kdebase given how key the places model has
become (file dialog, dolphin, kickoff, gwenview, etc)
--
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: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080904/d80cc7ef/attachment-0001.sig
More information about the Plasma-devel
mailing list