Fix two bugs (Upper case in database avoiding accents, and cat/account with the same name during modification into PreferencesPanel)

Updating translations
This commit is contained in:
2010-07-16 18:38:13 +02:00
parent 5286926588
commit d9359b2f98
7 changed files with 395 additions and 259 deletions

View File

@@ -318,6 +318,15 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
_wxUI->NeedReload();
return;
}
if (user->GetAccountId(new_account.name) != new_account.id)
{
wxMessageBox(_("Account ")+new_account.name+_(" already exists"), _("Error"), wxICON_ERROR | wxOK );
_accountsGrid->SetCellValue(row, ACCOUNT_NAME, user->_accounts[row].name);
inModification = false;
return ;
}
_kiss->UpdateAccount(new_account);
}
// New account
@@ -418,6 +427,15 @@ void PreferencesPanel::OnCategoryModified(wxGridEvent& event)
inModification = false;
return;
}
if (user->GetCategoryId(new_cat.name) != new_cat.id)
{
wxMessageBox(_("Category ")+new_cat.name+_(" already exists"), _("Error"), wxICON_ERROR | wxOK );
_categoriesGrid->SetCellValue(row, CATEGORY_NAME, user->_categories[row].name);
inModification = false;
return ;
}
_kiss->UpdateCategory(new_cat);
}
// New category