On Thursday, 15 August 2013 11:31:12 CEST, Pali Rohár wrote:
Now there is only support for DBus which not working on all platforms (it is used only on linux desktops?). So in future if somebody will add support for Windows, or Apple systems, it should be in separete files. #ifdef is not really good idea because some standard windows or apple IPC is totally different from DBus and code with full of #ifdef will not be readable...
I do not object to implementing the required functionality in an insolated module (the IPC:: namespace). What I was surprised to see was the "null" implementation of the IPC mechanism. I would prefer to have the code in, say, Window.cpp be like this:
#ifdef WITH_IPC IPC::invokeComposer(...); #endif
Individual options can be usefull for user who do not know full mailto: syntax and want to start writing new mail from terminal.
I like Kevin's mention of xdg-email; that's a standard tool and there is no point in duplicating its functionality in Trojita, IMHO. I believe that this code can be safely removed from Trojita.
So will be this patch enough? Mailto url could be first argument. diff --git a/src/Gui/trojita.desktop b/src/Gui/trojita.desktop index bfdc5c2..9d74d02 100644 --- a/src/Gui/trojita.desktop +++ b/src/Gui/trojita.desktop @@ -56,9 +56,10 @@ GenericName[uk]=Поштовий клієнт IMAP GenericName[x-test]=xxIMAP E-mail Clientxx GenericName[zh_TW]=IMAP 電子郵件客戶端程式 TryExec=trojita -Exec=trojita +Exec=trojita %u Terminal=false Type=Application Icon=trojita Categories=Qt;Office;Network;Email; StartupNotify=true +MimeType=x-scheme-handler/mailto;
Yes, this patch looks like it's exactly what other MUAs are doing. Cheers, Jan -- Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/