On Freitag, 14. Juni 2013 16:30:16 CEST, Jan Kundrát wrote:

I'm not sure whether DBUS is what we want here.

The traditional way for POSIX systems (including mac, but not windows) was to 
have a PID lockfile and SIGHUP the running process to make it raise/activate 
itself.
It's also poosible to "::kill(<PID>, 0)" to test whether the process is 
actually still alive (though afaik it's not possible to test whether it's actually trojita in a 
POSIX conformant way)

This has to advance of not relying on a specific IPC system nor on Qt Solutions 
(QtSingleApplication is *not* part of at least Qt4)

the single-instance support is required for acting as the mailto: URL hander in a system, and implementing the
That's a bit trickier than. Trojitá would have to read from stdin (either in a 
second thread or on sighup trigger) what will require a reliable and securing 
parser ;-)

However, i assume this will work on top of QProcess on Windows as well then.

the QtSingeApplication is enough or whether DBUS is better, and
Pro of dbus is that you've a pre-fabbed and generic IPC. You don't have to 
operate on PID files (or similar) to know the target process nor care about 
input handling.
Con is that it's linux(+ maybe bsd) only - but rather not OSX/Windows

Since you'll have to #ifdef implement IPC anyway (or add dependency on Qt 
Solutions) and because of it's omnipresence, it seems reasonable to use dbus on 
Linux (unless you're happier with common POSIX support, dropping windows)

My first reaction to this is that the plugin should probably be chosen based on what environemnt the application is running in, but perhaps it's wrong (it would certainly be a bit weird if the user suddenly "loses" her addresbook when switching from KDE to something else, for example).

That's the crap part about a hundred little addresbooks in Linux :-(
However, the alternative was to load akonadi into a GNOME/XFCE/FluxBox/... 
session. You'll be spammed with bugreports.

Tbh:
the moment you rely on a DE specific addresbook, you're spellbound to that 
environment - or loose your data or find a converter.
Trojitá effectively becomes a KDE/GNOME/whatever application for that user 
using such backend.

Cheers,
Thomas

Reply via email to