Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added the unsupported account icon
[xestiaab/.git] / source / frmEditAccount.cpp
index 4883625..d850bf8 100644 (file)
@@ -17,9 +17,6 @@
 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
 
 #include "frmEditAccount.h"
-#include "frmInvalidSSLCertificate.h"
-#include "carddav/carddav.h"
-#include "common/svrblist.h"
 
 frmEditAccount::frmEditAccount( wxWindow* parent )
 :
@@ -105,6 +102,27 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event )
 
                        int SSLResult;
                        
+#if defined(__APPLE__)
+       
+                       SSLResult = DisplayTrustPanel(&CDavObj);
+
+#elif defined(__WIN32__)
+
+                       BOOL ModifiedCertificateData;
+                       CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(&CDavObj, (HWND)this->GetHandle());
+
+                       if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)){
+                               wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog"));
+                               return;
+                       }
+
+                       if (ModifiedCertificateData == FALSE){
+                               wxMessageBox(_("Unable to get server prefix without a valid SSL certificate."), _("Error getting server prefix"));
+                               return;
+                       }
+
+#else
+                       
                        frmInvalidSSLCertificate *frmICPtr = new frmInvalidSSLCertificate(this);
 
                        frmICPtr->LoadDataNew(CDavObj.GetSSLVerifyResults(), txtAddress->GetValue());
@@ -116,7 +134,9 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event )
                                
                        delete frmICPtr;
                        frmICPtr = NULL;
-                                               
+                       
+#endif
+                       
                        // Process the response from the user.
                                                        
                        if (SSLResult == 1){
@@ -133,7 +153,6 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event )
                                return;
                                                                
                        }
-                               
 
                } else {
 
@@ -173,9 +192,9 @@ void frmEditAccount::LoadSettings( wxString AccNameIn ){
        bool ContinueAcc = TRUE;
        wxString AccountName;
        wxString AccountData;
-
+       
        ContinueAcc = cfgfile->GetFirstGroup(AccountName, itemindex);
-
+       
        while (ContinueAcc){
 
                if (AccountName == AccName){
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy