Fwd: Re: kdepim/kmail

Daniel Molkentin molkentin at kde.org
Wed Nov 26 15:03:55 GMT 2003


Ingo's idea isn't bad. Any ideas?

On Tuesday 25 November 2003 11:27, Daniel Molkentin wrote:
> CVS commit by danimo:
>
> Backport sanity checks as requested by Marc. Reviewed by Martin
> Köbele.

[snip]

> @@ -2076,13 +2077,15 @@ void KMMainWidget::setupActions()
>    (void) new KAction( i18n("&Send Queued Messages"), "mail_send", 0,
> this, SLOT(slotSendQueued()), actionCollection(), "send_queued"); -
> +  KAction *act;
>    //----- Tools menu
>    if (parent()->inherits("KMMainWin")) {
> -    (void) new KAction( i18n("&Address Book..."), "contents", 0,
> this, +    act =  new KAction( i18n("&Address Book..."), "contents",
> 0, this, SLOT(slotAddrBook()), actionCollection(), "addressbook" ); +
>    if (KStandardDirs::findExe("kaddressbook").isEmpty())
> act->setEnabled(false); }

Shouldn't something like findServiceByDesktopName be used? I mean we are
now using startServiceByDesktopName("kaddressbook") instead of
KRun("kaddressbook") for a reason. And now we look again for the
executable by its name? What if on some system the executable has a
different name, e. g. kaddressbook.exe? KLauncher will hopefully still
be able to find the executable in this case, but KMail wouldn't. No
application should ever make any assumptions about the name of the
executable of some other application. That's why the .desktop
abstraction exists.

Regards,
Ingo

-------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031126/513d12ce/attachment.sig>


More information about the kde-core-devel mailing list