[PATCH] BR57204 mailto: urls don't work when kontact is running.
Waldo Bastian
bastian at kde.org
Mon Dec 15 20:57:21 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon December 15 2003 21:18, Ingo Klöcker wrote:
> > * KMail command line options may not get translated correctly.
>
> Okay, this will fix the KMail case. Any idea what we should do when we
> want to call KAddressBook from KMail (e.g. if the user selects Open in
> Addressbook from the context menu for email addresses? Currently we use
> startServiceByDesktopName("kaddressbook") which starts KAddressBook
> externally if the address book part hasn't been loaded yet in Kontact
> and in case the address book part has already been loaded nothing
> happens (except for the startup notification which blinks until it
> times out). Both is wrong because in both cases the Contacts part
> should be brought to the front in Kontact. The second case can easily
> be fixed by first checking if we can contact kaddressbook via DCOP. But
> what about the first case? Will a similar solution as the one for kmail
> also work for kaddressbook?
Yes, create a "kaddressbook" DCOPObject that provides a newInstance() method,
similar to the one I added for KMail.
However, I think you need a bit more than that, because with that alone you
will get inconsistent behavior depending on whether kontact has loaded
kaddressbook already or not. I can think of two ways to solve that:
1) Load kaddressbook when starting kontact
2) Intercept calls to start kaddressbook somehow
I also noticed that kontact doesn't work very well if kmail is already running
and I believe the same problem also plays with kaddressbook. I don't think
this is a big problem with kmail, since it is not very likely that you want
to run both kmail and kontact, but I think there is a real risk that a user
somehow starts kaddressbook and then only later kontact.
To go back to 2), 2) could be done by providing
KApplication::invokeAddressbook() and some sort of hook that allows to
intercept calls. That would then have the added benefit that you could
configure "use kontact as addressbook application". When kontact runs it
should then probably offer to make kontact the default mail and the default
addressbook application so that when a user clicks on a mail-to link or does
some addressbook action it will start kontact for that instead of starting a
stand-alone kmail or stand-alone kaddressbook which will causes problems when
kontact is then later started itself.
Oh, and my patch assumes that kontact always loads the kmail part. If the
kmail part is not loaded after startup, command line arguments will not be
processed. I am not sure if that assumption is valid in all cases.
Cheers,
Waldo
- --
bastian at kde.org -=|[ KDE: K Desktop for the Enterprise ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/3iA1N4pvrENfboIRAiReAJ9HXJEWMT6GmvWlFbow9udZoZbdLgCgkl40
0HHT/9B2P40zaMfFqntjA2E=
=qGCR
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list