#include "common/preferences.h"
#include "common/dirs.h"
#include "bitmaps.h"
-#include "bitmaps/preferences.h"
#include "import/import.h"
#include "export/export.h"
wxString AccName;
wxString AccType;
- wxFileConfig *cfgfile = new wxFileConfig("", "", AccFilename);
+ // Check if an account has been selected before continuing.
- // Get the account name.
-
lstAccountsIndex = lstAccounts->GetNextItem(lstAccountsIndex,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
+ if (lstAccountsIndex == -1){
+
+ // No account has been selected so exit this subroutine.
+
+ return;
+
+ }
+
+ wxFileConfig *cfgfile = new wxFileConfig("", "", AccFilename);
+
// Check that the account type is a supported account type.
AccType = preferences->accounts.GetAccountType((int)lstAccountsIndex);
return;
}
+
+ // Get the account name.
AccName = preferences->accounts.GetAccountName((int)lstAccountsIndex);
}
+void frmPreferences::ModifyABAccount( wxMouseEvent& event )
+{
+
+ wxCommandEvent NullEvent;
+ ModifyABAccount(NullEvent);
+
+}
+
void frmPreferences::DeleteABAccount( wxCommandEvent& event )
{
// Display a confirmation dialog to confirm deletion.