XABPreferences::XABPreferences(wxString PreferencesFilename){
+ // Load the settings into the XABPreferences object using the
+ // settings file received in PreferencesFilename.
+
wxString fullprefpath;
bool accountnamevalid, accountaddressvalid, accounttypevalid, accountportvalid,
bool XABPreferences::GetBoolData(wxString SettingName){
+ // GetBoolData from the XABPreferences object.
+
if (SettingName == wxT("SaveWindowPosition")) { return SaveWindowPos; }
else if (SettingName == wxT("HideLocalAddressBooks")) { return HideLocalABs; }
wxRect XABPreferences::GetMainWindowData(){
+ // Return the main window data as a wxRect object.
+
return MainWindowData;
}
void XABPreferences::SetMainWindowData(wxRect WindowData){
+ // Set the main window data from a wxRect object.
+
MainWindowData = WindowData;
}
// XABPrefAccounts
XABPrefAccounts::XABPrefAccounts(){
+
+ // Setup the default values for XABPrefAccounts.
+
AccountsCount = 0;
+
}
int XABPrefAccounts::AddAccount(wxString NewAccName,
long NewAccRefresh
){
+ // Add an account to the list of accounts in the
+ // XABPrefAccounts object.
+
AccountName.Add(NewAccName, 1);
AccountType.Add(NewAccType, 1);
AccountAddress.Add(NewAccAddress, 1);
int XABPrefAccounts::GetCount(){
+ // Get the count of accounts in the XABPrefAccounts object.
+
return AccountsCount;
}
wxString XABPrefAccounts::GetAccountName(int AccountNum){
+ // Get the account name.
+
if (AccountNum > AccountsCount){
return wxT("");
}
wxString XABPrefAccounts::GetAccountType(int AccountNum){
+ // Get the account type.
+
if (AccountNum > AccountsCount){
return wxT("");
}
wxString XABPrefAccounts::GetAccountAddress(int AccountNum){
+ // Get the account server address.
+
if (AccountNum > AccountsCount){
return wxT("");
}
int XABPrefAccounts::GetAccountPort(int AccountNum){
+ // Get the account server port.
+
if (AccountNum > AccountsCount){
return 0;
}
bool XABPrefAccounts::GetAccountSSL(int AccountNum){
+ // Get the account server SSL support.
+
if (AccountNum > AccountsCount){
return wxT("");
}
wxString XABPrefAccounts::GetAccountUsername(int AccountNum){
+ // Get the account username.
+
if (AccountNum > AccountsCount){
return wxT("");
}
wxString XABPrefAccounts::GetAccountPassword(int AccountNum){
+ // Get the account password.
+
if (AccountNum > AccountsCount){
return wxT("");
}
wxString XABPrefAccounts::GetAccountDirectory(int AccountNum){
+ // Get the account directory.
+
if (AccountNum > AccountsCount){
return wxT("");
}
wxString XABPrefAccounts::GetAccountDirPrefix(int AccountNum){
+ // Get the account server directory prefix.
+
if (AccountNum > AccountsCount){
return wxT("");
}
long XABPrefAccounts::GetAccountRefresh(int AccountNum){
+ // Get the account refresh time.
+
if (AccountNum > AccountsCount){
return 0;
}