+#endif
+
+void frmMain::SetupSSLStatus( int AccountID ){
+
+ // Check if account ID given is
+ // the active account and if not, do nothing.
+
+ wxString AccType;
+ wxString AccTypeLower;
+
+ AccType = prefaccounts.GetAccountType(AccountID);
+ AccTypeLower = AccType.MakeLower();
+
+ wxString AccountIDName = prefaccounts.GetAccountDirectory(AccountID) + wxT(".") +
+ AccTypeLower;
+
+ if (AccountIDName != ActiveAccount){
+
+ return;
+
+ }
+
+ // Check if the account has SSL enabled.
+
+ bool SSLInUse = prefaccounts.GetAccountSSL(AccountID);
+
+ if (SSLInUse == FALSE){
+
+ SSLToolTip->SetTip(wxT("SSL is not enabled for this account"));
+ imgSSLStatus->SetBitmap(*imgNoSSL);
+
+ } else {
+
+ // Get the SSL Collection Data.
+
+ std::map<int,int>::iterator SSLResultIter = AccountSSLResult.find(AccountID);
+
+ if (SSLResultIter->second == 1){
+
+ imgSSLStatus->SetBitmap(*imgSSLWarning);
+ SSLToolTip->SetTip(wxT("Invalid certificate(s) received for '") +
+ prefaccounts.GetAccountName(AccountID) +
+ wxT("' (Connection denied by user)\n\nDouble click for more information."));
+
+ } else if (SSLResultIter->second == 0){
+
+ imgSSLStatus->SetBitmap(*imgSSL);
+ SSLToolTip->SetTip(wxT("Account '") +
+ prefaccounts.GetAccountName(AccountID) +
+ wxT("' secured using SSL\n\nDouble click for more information."));
+
+ }
+
+ }
+
+}
+