Bug 119562

Summary: A patch that adds support for the Sylpheed-Claws mua
Product: [Applications] digikam Reporter: Paul Mangan <paul>
Component: Plugin-Generic-SendByMailAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 0.1.0
Attachments: add support for the Sylpheed-Claws mua

Description Paul Mangan 2006-01-05 11:55:17 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Debian testing/unstable Packages

Please add support for mailing images via Sylpheed-Claws.
A patch is attached.
Comment 1 Paul Mangan 2006-01-05 11:56:37 UTC
Created attachment 14141 [details]
add support for the Sylpheed-Claws mua
Comment 2 Tom Albers 2006-01-07 21:34:32 UTC
SVN commit 495347 by toma:

Adds support for the Sylpheed-Claws mua. Based on a patch from Paul Mangan. I modified the patch to prevent code duplication. Can you verify if this solution works as well? Thanks dor the patch.
BUG: 119562


 M  +8 -3      sendimages.cpp  
 M  +2 -0      sendimagesdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/sendimages/sendimages.cpp #495346:495347
@@ -344,12 +344,17 @@
 
     // Sylpheed mail agent call.
 
-    if ( m_sendImagesDialog->m_mailAgentName->currentText() == "Sylpheed" )
+    if ( m_sendImagesDialog->m_mailAgentName->currentText() == "Sylpheed" ||
+         m_sendImagesDialog->m_mailAgentName->currentText() == "Sylpheed-Claws" )
     {
         m_mailAgentProc = new KProcess;
-        *m_mailAgentProc << "sylpheed" << "--compose";
-        *m_mailAgentProc << "--attach";
+        if ( m_sendImagesDialog->m_mailAgentName->currentText() == "Sylpheed")
+            *m_mailAgentProc << "sylpheed";
+        else
+            *m_mailAgentProc << "sylpheed-claws";
 
+        *m_mailAgentProc << "--compose" << "--attach";
+
         for ( KURL::List::Iterator it = m_filesSendList.begin() ; it != m_filesSendList.end() ; ++it )
             *m_mailAgentProc << QFile::encodeName((*it).path());
 
--- trunk/extragear/libs/kipi-plugins/sendimages/sendimagesdialog.cpp #495346:495347
@@ -360,6 +360,7 @@
     m_mailAgentName->insertItem( "Mozilla" );
     m_mailAgentName->insertItem( "Netscape" );
     m_mailAgentName->insertItem( "Sylpheed" );
+    m_mailAgentName->insertItem( "Sylpheed-Claws" );
     m_mailAgentName->insertItem( "Thunderbird" );
     m_mailAgentName->setCurrentText( "Kmail" );
     QWhatsThis::add( m_mailAgentName, i18n("<p>Select here your preferred external mail agent program."
@@ -371,6 +372,7 @@
                                            "<b>Mozilla</b>: >= 1.4<p>"
                                            "<b>Netscape</b>: >= 7.x<p>"
                                            "<b>Sylpheed</b>: >= 0.9<p>"
+                                           "<b>Sylpheed-Claws</b>: >= 0.9<p>"
                                            "<b>Thunderbird</b>: >= 0.4<p>") );
 
     hlay10->addWidget( m_mailAgentLabel );
Comment 3 Paul Mangan 2006-01-07 23:04:17 UTC
I have verified that it works. Thanks!
Comment 4 Anders Lund 2006-01-07 23:19:20 UTC
On Saturday 07 January 2006 21:34, Tom Albers wrote:
> Adds support for the Sylpheed-Claws mua. Based on a patch from Paul Mangan.
> I modified the patch to prevent code duplication. Can you verify if this
> solution works as well? Thanks dor the patch.


I dont understand why you do not use the KDE tools for this. 
KApplication::invokeMailer() uses the mail client configured by the user in 
the KDE component chooser.

-anders
Comment 5 Tom Albers 2006-01-08 01:37:43 UTC
invokeMailer has an option to add an attachment, but every app seems to have a different sytax to launch the app if necessary and open the composer. For Thunderbird invokeMailer does not seem to work as expected (opening a composer with file attached).
Comment 6 Anders Lund 2006-01-08 01:51:05 UTC
Well, it would be smarter if that was fixed in kapplication then, otherwise 
the method should really be removed...