[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Jan 11 20:23:21 CET 2005


CVS commit by staikos: 

use KDE defaults for email settings, where available.


  M +10 -8     kstsettings.cpp   1.14


--- kdeextragear-2/kst/kst/kstsettings.cpp  #1.13:1.14
@@ -18,4 +18,5 @@
 // include files for KDE
 #include <kconfig.h>
+#include <kemailsettings.h>
 #include <kstaticdeleter.h>
 
@@ -167,12 +168,13 @@ void KstSettings::reload() {
   xAxisDisplay = (KstXAxisDisplay)cfg.readNumEntry("X Axis Display", X_AXIS_DISPLAY_QTLOCALDATEHHMMSS_SS);
 
-  emailSender = cfg.readEntry("EMail Sender", "");
-  emailSMTPServer = cfg.readEntry("EMail Server", "");
-  emailSMTPPort = cfg.readNumEntry("EMail Port", 25);
-  emailRequiresAuthentication = cfg.readBoolEntry("EMail Authenticate", false);
-  emailUsername = cfg.readEntry("EMail Username", "");
-  emailPassword = cfg.readEntry("EMail Password", "");
-  emailEncryption = (EMailEncryption)cfg.readNumEntry("EMail Encryption", EMailEncryptionNone);
-  emailAuthentication = (EMailAuthentication)cfg.readNumEntry("EMail Authentication", EMailAuthenticationPLAIN);
+  KEMailSettings es;
+  emailSender = cfg.readEntry("EMail Sender", es.getSetting(KEMailSettings::EmailAddress));
+  emailSMTPServer = cfg.readEntry("EMail Server", es.getSetting(KEMailSettings::OutServer));
+  emailSMTPPort = cfg.readNumEntry("EMail Port", 25); // FIXME: no KEMailSettings for this?
+  emailRequiresAuthentication = cfg.readBoolEntry("EMail Authenticate", !es.getSetting(KEMailSettings::OutServerLogin).isEmpty());
+  emailUsername = cfg.readEntry("EMail Username", es.getSetting(KEMailSettings::OutServerLogin));
+  emailPassword = cfg.readEntry("EMail Password", es.getSetting(KEMailSettings::OutServerPass));
+  emailEncryption = (EMailEncryption)cfg.readNumEntry("EMail Encryption", es.getSetting(KEMailSettings::OutServerTLS) == "true" ? EMailEncryptionTLS : EMailEncryptionNone);
+  emailAuthentication = (EMailAuthentication)cfg.readNumEntry("EMail Authentication", EMailAuthenticationPLAIN); // FIXME: no KEMailSettings for this?
 }
 




More information about the Kst mailing list