- lstAccountsIndex = lstAccounts->GetNextItem(lstAccountsIndex,
- wxLIST_NEXT_ALL,
- wxLIST_STATE_SELECTED);
+ lstAccountsIndex = lstAccounts->GetNextItem(lstAccountsIndex,
+ wxLIST_NEXT_ALL,
+ wxLIST_STATE_SELECTED);
+
+ // Check that the account type is a supported account type.
+
+ AccType = preferences->accounts.GetAccountType((int)lstAccountsIndex);
+
+ if (AccType != "CardDAV" && AccType != "carddav" &&
+ AccType != "Local" && AccType != "local"){
+
+ wxMessageBox(_("Cannot modify the selected account settings as the account type is unsupported."), _("Unsupported account type"), wxICON_ERROR);
+ return;
+
+ }