if (CheckBlacklist(txtAddress->GetValue())){
- int MessageBoxResult = wxMessageBox(_("The server with the address given does not support the CardDAV protocol properly and shouldn't be used.\n\nData loss is very likely.\n\nDo you still want to continue using this server?"), _("Server warning"), wxYES_NO, this);
+ int messageBoxResult = wxMessageBox(_("The server with the address given does not support the CardDAV protocol properly and shouldn't be used.\n\nData loss is very likely.\n\nDo you still want to continue using this server?"), _("Server warning"), wxYES_NO, this);
- if (MessageBoxResult == wxNO){
+ if (messageBoxResult == wxNO){
return;
}
// Update the settings for the account.
long itemindex = 0;
- bool ContinueAcc = TRUE;
- wxString AccountName;
+ bool continueAcc = TRUE;
+ wxString accountName;
// Look for the account
- while (ContinueAcc){
+ while (continueAcc){
- if (AccountName == AccName){
+ if (accountName == accName){
// Update the settings for the account.
- cfgfile->RenameGroup(AccountName, txtAccountName->GetValue());
+ cfgFile->RenameGroup(accountName, txtAccountName->GetValue());
- cfgfile->SetPath(txtAccountName->GetValue());
+ cfgFile->SetPath(txtAccountName->GetValue());
//txtAccountName->SetValue(AccountName);
- cfgfile->DeleteEntry(wxT("address"), FALSE);
- cfgfile->Write(wxT("address"), txtAddress->GetValue());
+ cfgFile->DeleteEntry(wxT("address"), FALSE);
+ cfgFile->Write(wxT("address"), txtAddress->GetValue());
- cfgfile->DeleteEntry(wxT("port"), FALSE);
- cfgfile->Write(wxT("port"), txtPort->GetValue());
+ cfgFile->DeleteEntry(wxT("port"), FALSE);
+ cfgFile->Write(wxT("port"), txtPort->GetValue());
- cfgfile->DeleteEntry(wxT("username"), FALSE);
- cfgfile->Write(wxT("username"), txtUsername->GetValue());
+ cfgFile->DeleteEntry(wxT("username"), FALSE);
+ cfgFile->Write(wxT("username"), txtUsername->GetValue());
- cfgfile->DeleteEntry(wxT("password"), FALSE);
- cfgfile->Write(wxT("password"), txtPassword->GetValue());
+ cfgFile->DeleteEntry(wxT("password"), FALSE);
+ cfgFile->Write(wxT("password"), txtPassword->GetValue());
- cfgfile->DeleteEntry(wxT("prefix"), FALSE);
- cfgfile->Write(wxT("prefix"), txtPrefix->GetValue());
+ cfgFile->DeleteEntry(wxT("prefix"), FALSE);
+ cfgFile->Write(wxT("prefix"), txtPrefix->GetValue());
- cfgfile->DeleteEntry(wxT("ssl"), FALSE);
+ cfgFile->DeleteEntry(wxT("ssl"), FALSE);
if (chkSSL->GetValue() == TRUE){
- cfgfile->Write(wxT("ssl"), wxT("true"));
+ cfgFile->Write(wxT("ssl"), wxT("true"));
} else {
- cfgfile->Write(wxT("ssl"), wxT("false"));
+ cfgFile->Write(wxT("ssl"), wxT("false"));
}
- cfgfile->DeleteEntry(wxT("refresh"), FALSE);
- cfgfile->Write(wxT("refresh"), txtRefresh->GetValue());
+ cfgFile->DeleteEntry(wxT("refresh"), FALSE);
+ cfgFile->Write(wxT("refresh"), txtRefresh->GetValue());
break;
}
- cfgfile->SetPath(wxT("/"));
- ContinueAcc = cfgfile->GetNextGroup(AccountName, itemindex);
+ cfgFile->SetPath(wxT("/"));
+ continueAcc = cfgFile->GetNextGroup(accountName, itemIndex);
}
// Set the dialog result to true and close the window.
- DialogResult = true;
+ dialogResult = true;
this->Close();
}
-void frmEditAccount::LoadSettings( wxString AccNameIn ){
+void frmEditAccount::LoadSettings( wxString accNameIn ){
// Get the data from the accounts settings file and
// fill in the account fields.
- AccName = AccNameIn;
- long itemindex = 0;
- bool ContinueAcc = TRUE;
- wxString AccountName;
- wxString AccountData;
+ accName = accNameIn;
+ long itemIndex = 0;
+ bool continueAcc = TRUE;
+ wxString accountName;
+ wxString accountData;
- ContinueAcc = cfgfile->GetFirstGroup(AccountName, itemindex);
+ continueAcc = cfgFile->GetFirstGroup(accountName, itemIndex);
- while (ContinueAcc){
+ while (continueAcc){
- if (AccountName == AccName){
+ if (accountName == accName){
- cfgfile->SetPath(AccountName);
- txtAccountName->SetValue(AccountName);
+ cfgFile->SetPath(accountName);
+ txtAccountName->SetValue(accountName);
- cfgfile->Read("address", &AccountData);
- txtAddress->SetValue(AccountData);
+ cfgFile->Read("address", &accountData);
+ txtAddress->SetValue(accountData);
- cfgfile->Read("port", &AccountData);
- txtPort->SetValue(AccountData);
+ cfgFile->Read("port", &accountData);
+ txtPort->SetValue(accountData);
- cfgfile->Read("username", &AccountData);
- txtUsername->SetValue(AccountData);
+ cfgFile->Read("username", &accountData);
+ txtUsername->SetValue(accountData);
- cfgfile->Read("password", &AccountData);
- txtPassword->SetValue(AccountData);
+ cfgFile->Read("password", &accountData);
+ txtPassword->SetValue(accountData);
- cfgfile->Read("prefix", &AccountData);
- txtPrefix->SetValue(AccountData);
+ cfgFile->Read("prefix", &accountData);
+ txtPrefix->SetValue(accountData);
- cfgfile->Read("ssl", &AccountData);
- if (AccountData == wxT("true")){
+ cfgFile->Read("ssl", &accountData);
+ if (accountData == wxT("true")){
chkSSL->SetValue(TRUE);
}
- cfgfile->Read("refresh", &AccountData);
- txtRefresh->SetValue(AccountData);
+ cfgFile->Read("refresh", &accountData);
+ txtRefresh->SetValue(accountData);
break;
}
- cfgfile->SetPath(wxT("/"));
- ContinueAcc = cfgfile->GetNextGroup(AccountName, itemindex);
+ cfgFile->SetPath(wxT("/"));
+ continueAcc = cfgFile->GetNextGroup(accountName, itemIndex);
}
void frmEditAccount::CloseWindow( wxCommandEvent& event )
{
- DialogResult = false;
+ dialogResult = false;
this->Close();
}
// Get the result of the dialog.
- return DialogResult;
+ return dialogResult;
}
-void frmEditAccount::LoadPointers( wxFileConfig* cfgin ){
+void frmEditAccount::LoadPointers( wxFileConfig* cfgIn ){
// Setup the account configuration file pointer.
- cfgfile = cfgin;
+ cfgFile = cfgIn;
}
\ No newline at end of file