Use class enums and constants rather than global enums and define

Fix a bug : virtual transferts must not be considered as a debit
This commit is contained in:
2011-08-16 18:22:35 +02:00
parent 6d0fe8ec7b
commit 08ba72664c
20 changed files with 97 additions and 112 deletions

View File

@@ -64,7 +64,7 @@ GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id,
for(i=0; i<NUMBER_COLS_OPS; i++)
{
SetCellValue(0, i, colsName[i]);
SetCellBackgroundColour(0, i, OWN_CYAN);
SetCellBackgroundColour(0, i, view::OWN_CYAN);
SetCellFont(0, i, font);
SetReadOnly(0, i, true);
SetCellAlignment(0, i, wxALIGN_CENTRE, wxALIGN_CENTRE);
@@ -372,7 +372,7 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
if (op.category.Length())
color = cat.backcolor;
else
color = OWN_GREEN;
color = view::OWN_GREEN;
if (op.checked)
{
@@ -421,11 +421,11 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
if (fix)
{
SET_ROW_COLOR(line, OWN_YELLOW, *wxBLACK);
SET_ROW_COLOR(line, view::OWN_YELLOW, *wxBLACK);
}
else
{
SET_ROW_COLOR(line, OWN_GREEN, *wxBLACK);
SET_ROW_COLOR(line, view::OWN_GREEN, *wxBLACK);
}
SetReadOnly(line, CHECKED, true);
@@ -962,7 +962,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
DEFAULT_FONT(font);
SET_ROW_COLOR(row, OWN_YELLOW, *wxBLACK);
SET_ROW_COLOR(row, view::OWN_YELLOW, *wxBLACK);
SET_ROW_FONT(row, font);
new_op.id = _kiss->AddOperation(new_op);
@@ -1061,7 +1061,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
DEFAULT_FONT(font);
SET_ROW_COLOR(row, OWN_GREEN, *wxBLACK);
SET_ROW_COLOR(row, view::OWN_GREEN, *wxBLACK);
SET_ROW_FONT(row, font);
new_op.id = _kiss->AddOperation(new_op);
@@ -1093,7 +1093,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
if (new_op.category.Length())
color = cat.backcolor;
else
color = OWN_GREEN;
color = view::OWN_GREEN;
if (new_op.checked)
{