[Kde-pim] Running KMail and calling via D-Bus

Volker Krause vkrause at kde.org
Tue Aug 4 08:13:51 BST 2009


On Tuesday 04 August 2009 02:55:35 David Jarvie wrote:
> On Sunday 02 August 2009 16:56:46 Volker Krause wrote:
> > On Sunday 02 August 2009 13:30:31 David Jarvie wrote:
> > > Can anybody help resolve this D-Bus problem with KMail?
> > >
> > > KAlarm has functions to invoke KMail and issue a D-Bus call to show a
> > > mail. The problem is that if KMail isn't already running, the D-Bus
> > > call doesn't work when called immediately after starting up KMail,
> > > since the relevant D-Bus interface is not immediately available. I've
> > > experimented with various tweaks, and compared the code to other places
> > > in kdepim, but still can't think of any other way of doing it except to
> > > introduce timer-based calls to wait for the D- Bus interface to become
> > > active. Yet other applications (KOrganizer etc) don't seem to have this
> > > problem (or do they just ignore it?).
> >
> > IIRC KDBusServiceStarter is used there, not sure if that really waits
> > until the corresponding service is available though. If you want to be
> > really sure that KMail has been started, listening to the
> > serviceOwnerChanged() signal might help.
>
> Thanks Volker. That helps, but even when that signal is received, the
> actual interface isn't necessarily available yet, so it still looks as if
> it's necessary to do a few timer delays.

Right, but that's IMHO a bug on the service side, it should only register its 
service name once all corresponding interfaces are available. That's at least 
how we solved this problem in various places in Akonadi.

regards
Volker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090804/669f0dd1/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list