[Panel-devel] Service Runner Patch

fonz2591 fonz2591 at gmail.com
Mon Feb 26 00:53:14 CET 2007


Oops...
I actually stopped usig iostream, but forgot to take off the header :-/.
Im applying for a svn account, so hopefully I don't hafto deal w/ patches
:-) .

I just realized I made a slight error...
Someone should add && service->type() == "Application" to the return
statement.

On 2/25/07, Aaron J. Seigo <aseigo at kde.org> wrote:
>
> On February 25, 2007, fonz2591 wrote:
> > Here is a patch to allow KRunner to run programs based on the "Name="
> tag
> > in their .desktop files.
> >
> > I also included a .desktop file to test this feature.
> > Place it in KDE4 Directory/share/applications/kde4/ .
> > Test it by typing Test App into KRunner.  It should launch konsole.
>
> +#include <iostream>
> +using namespace std;
>
> woops =) some debug stuff left ... btw, KDebug is often easier to use with
> Qt/KDE objects.
>
> +    // i reccomend not trying 'service != 0' (its not worth the errors)
> +    return (service && service->name() == term);
>
> i just looked and kserviceptr does actually have a converstion to bool.
>
> so "return service;" should workd, though "return !service.isNull()" might
> be
> more readable.
>
> --
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
>
> _______________________________________________
> Panel-devel mailing list
> Panel-devel at kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
>
>
>


-- 
// Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20070225/e51d8c53/attachment.html 


More information about the Panel-devel mailing list