Fix a bug with categories (again)

Disable interface during mass update (cursor not changed :()
Resize search icon
This commit is contained in:
Grégory Soutadé 2011-02-24 20:59:30 +01:00
parent 16e90b8fc0
commit 5451d3c4ce
4 changed files with 16 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1047,6 +1047,7 @@ bool Database::LoadCategory(const wxString& id, const wxString& name, Category&
category.backcolor = wxColour(set.GetAsString(wxT("backcolor"))); category.backcolor = wxColour(set.GetAsString(wxT("backcolor")));
category.forecolor = wxColour(set.GetAsString(wxT("forecolor"))); category.forecolor = wxColour(set.GetAsString(wxT("forecolor")));
category.font = set.GetAsString(wxT("font")); category.font = set.GetAsString(wxT("font"));
category.fix_cost = set.GetBool(wxT("fix_cost"));
ret = true; ret = true;
} }

View File

@ -85,7 +85,7 @@ wxString User::GetCategoryId(const wxString& catName)
Category cat; Category cat;
for (it=_categories.begin(); it !=_categories.end(); it++) for (it=_categories.begin(); it !=_categories.end(); it++)
if (it->name == catName) if (wxGetTranslation(it->name) == catName)
return it->id; return it->id;
if ( _db->LoadCategory(wxT(""), catName, cat)) if ( _db->LoadCategory(wxT(""), catName, cat))

View File

@ -1492,6 +1492,12 @@ void GridAccount::MassUpdate(std::vector<int>& rows, updateOperationFunc func, v
std::vector<Operation>::iterator it; std::vector<Operation>::iterator it;
Operation op, op2; Operation op, op2;
_parent->Disable();
_parent->SetCursor(wxCursor(wxCURSOR_ARROWWAIT));
_parent->Update();
if (rows.size()) if (rows.size())
{ {
for(i=0; i<(int)rows.size(); i++) for(i=0; i<(int)rows.size(); i++)
@ -1527,4 +1533,8 @@ void GridAccount::MassUpdate(std::vector<int>& rows, updateOperationFunc func, v
LoadOperations(_operations, false, false, 0, 0); LoadOperations(_operations, false, false, 0, 0);
Layout(); Layout();
_parent->Enable();
_parent->SetCursor(wxNullCursor);
} }