[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kcontrol/componentchooser
From:       David Faure <faure () kde ! org>
Date:       2003-02-12 17:16:52
[Download RAW message or body]

CVS commit by faure: 

Applied patch by Willy De La Court:

Made the selection of the e-mail client with KOpenWith terminal independant 
using the TerminalApplication config item in kdeglobals.
Used hideNoCloseOnExit new method of KOpenWith, to hide the NoCloseOnExit 
checkbox in KOpenWith as all mail clients run in Terminal mode are 
interactive anyway.


  M +10 -2     componentchooser.cpp   1.16


--- kdebase/kcontrol/componentchooser/componentchooser.cpp  #1.15:1.16
@@ -165,9 +165,17 @@ void CfgEmailClient::selectEmailClient()
         KURL::List urlList;
         KOpenWithDlg dlg(urlList, i18n("Select preferred email client:"), \
QString::null, this); +        // hide "Do not &close when command exits" here, we \
don't need it for a mail client +        dlg.hideNoCloseOnExit();
         if (dlg.exec() != QDialog::Accepted) return;
         QString client = dlg.text();
 
-        bool b = client.left(11) == "konsole -e ";
-        if (b) client = client.mid(11);
+        // get the preferred Terminal Application 
+        KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
+        QString preferredTerminal = \
confGroup.readEntry(QString::fromLatin1("TerminalApplication"), \
QString::fromLatin1("konsole")); +        preferredTerminal += QString::fromLatin1(" \
-e "); +        
+        int len = preferredTerminal.length();
+        bool b = client.left(len) == preferredTerminal;
+        if (b) client = client.mid(len);
         if (!client.isEmpty())
         {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic