Use '0' instead of NULL
This commit is contained in:
parent
c4a88fb459
commit
66a60bf7a6
|
@ -101,7 +101,7 @@ void ParseExp(char** expr, struct parse_opt* root, bool needParenthesis)
|
|||
struct parse_opt* l, *r, *op, *op_tmp;
|
||||
char type = -1;
|
||||
bool negative = false, number = false;
|
||||
l = r = op = op_tmp = NULL;
|
||||
l = r = op = op_tmp = 0;
|
||||
|
||||
if (!**expr) return;
|
||||
|
||||
|
@ -112,7 +112,7 @@ void ParseExp(char** expr, struct parse_opt* root, bool needParenthesis)
|
|||
op_tmp = new struct parse_opt;
|
||||
op_tmp->type = CST;
|
||||
op_tmp->root = root;
|
||||
op_tmp->l = op_tmp->r = NULL;
|
||||
op_tmp->l = op_tmp->r = 0;
|
||||
(*expr)++;
|
||||
ParseExp(expr, op_tmp, true);
|
||||
l = op_tmp;
|
||||
|
@ -184,7 +184,7 @@ void ParseExp(char** expr, struct parse_opt* root, bool needParenthesis)
|
|||
l = new struct parse_opt;
|
||||
l->type = CST;
|
||||
l->root = root;
|
||||
l->l = NULL; l->r = NULL;
|
||||
l->l = 0; l->r = 0;
|
||||
l->value = atof(temp, *expr-temp);
|
||||
if (negative)
|
||||
l->value *= -1.0;
|
||||
|
@ -206,7 +206,7 @@ void ParseExp(char** expr, struct parse_opt* root, bool needParenthesis)
|
|||
|
||||
root->type = CST;
|
||||
root->value = 0.0;
|
||||
root->l = NULL ; root->r = NULL;
|
||||
root->l = 0 ; root->r = 0;
|
||||
|
||||
(*expr)++;
|
||||
ParseExp(expr, root, needParenthesis);
|
||||
|
@ -221,7 +221,7 @@ void ParseExp(char** expr, struct parse_opt* root, bool needParenthesis)
|
|||
r = new struct parse_opt;
|
||||
r->type = CST;
|
||||
r->root = root;
|
||||
r->l = NULL; r->r = NULL;
|
||||
r->l = 0; r->r = 0;
|
||||
r->value = 0.0;
|
||||
root->r = r;
|
||||
|
||||
|
@ -246,7 +246,7 @@ void ParseExp(char** expr, struct parse_opt* root, bool needParenthesis)
|
|||
else
|
||||
{
|
||||
root->type = CST;
|
||||
root->l = NULL; root->r = NULL;
|
||||
root->l = 0; root->r = 0;
|
||||
root->value = atof(temp, *expr-temp);
|
||||
if (negative)
|
||||
root->value *= -1.0;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
std::vector<ImportEngine*> * KissCount::_importEngines;
|
||||
std::vector<ExportEngine*> * KissCount::_exportEngines;
|
||||
|
||||
KissCount::KissCount(const char* bdd_filename) : _user(NULL)
|
||||
KissCount::KissCount(const char* bdd_filename) : _user(0)
|
||||
{
|
||||
wxRect rect = wxDisplay().GetGeometry();
|
||||
|
||||
|
@ -78,12 +78,12 @@ void KissCount::LoadUser(const wxString& user)
|
|||
|
||||
void KissCount::LoadYear(int year, bool force)
|
||||
{
|
||||
if (!force && _user->_operations[year] != NULL) return;
|
||||
if (!force && _user->_operations[year] != 0) return;
|
||||
|
||||
if (_user->_operations[year] != NULL)
|
||||
if (_user->_operations[year] != 0)
|
||||
{
|
||||
delete _user->_operations[year];
|
||||
_user->_operations[year] = NULL;
|
||||
_user->_operations[year] = 0;
|
||||
}
|
||||
|
||||
_db->LoadYear(_user, year);
|
||||
|
@ -408,7 +408,7 @@ void KissCount::KillMe()
|
|||
_wxUI->KillMe();
|
||||
_db->KillMe(_user);
|
||||
delete _user;
|
||||
_user = NULL;
|
||||
_user = 0;
|
||||
_wxUI->ChangeUser();
|
||||
}
|
||||
|
||||
|
@ -458,9 +458,9 @@ bool KissCount::SearchPreviousOperation(Operation* res, Operation& op, int month
|
|||
date = new wxDateTime(0, (wxDateTime::Month)month, year);
|
||||
|
||||
if (limitToType)
|
||||
operations = _db->Search(_user, &op.description, date, NULL, NULL, NULL, v, op.fix_cost ? FIX_OP : NON_FIX_OP, v, false);
|
||||
operations = _db->Search(_user, &op.description, date, 0, 0, 0, v, op.fix_cost ? FIX_OP : NON_FIX_OP, v, false);
|
||||
else
|
||||
operations = _db->Search(_user, &op.description, date, NULL, NULL, NULL, v, ALL_OP, v, false);
|
||||
operations = _db->Search(_user, &op.description, date, 0, 0, 0, v, ALL_OP, v, false);
|
||||
|
||||
|
||||
delete date;
|
||||
|
@ -618,7 +618,7 @@ ImportEngine* KissCount::GetImportEngine(wxString path)
|
|||
if ((*it)->HandleFile(path, _user, _db, this))
|
||||
return *it;
|
||||
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KissCount::UpdateImportPattern()
|
||||
|
@ -671,7 +671,7 @@ ExportEngine* KissCount::GetExportEngine(wxString path)
|
|||
if ((*it)->HandleFile(path, _user, _db, this))
|
||||
return *it;
|
||||
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<ImportEngine*>* KissCount::GetImportEngines()
|
||||
|
|
|
@ -28,7 +28,7 @@ class MyApp: public wxApp
|
|||
if (argc == 2)
|
||||
new KissCount(wxString(argv[1]).mb_str());
|
||||
else
|
||||
new KissCount(NULL);
|
||||
new KissCount(0);
|
||||
}
|
||||
catch (std::string s)
|
||||
{
|
||||
|
|
|
@ -93,7 +93,7 @@ void Database::CreateDatabase()
|
|||
|
||||
if (dirname.DirExists())
|
||||
{
|
||||
wxMessageDialog dialog(NULL, message, wxT("KissCount"), wxYES_NO);
|
||||
wxMessageDialog dialog(0, message, wxT("KissCount"), wxYES_NO);
|
||||
|
||||
if (dialog.ShowModal() == wxID_NO)
|
||||
throw std::string("No database") ;
|
||||
|
@ -218,10 +218,10 @@ User* Database::LoadUser(const wxString& name)
|
|||
|
||||
req = wxT("SELECT * FROM user WHERE name='") + name + wxT("'");
|
||||
|
||||
EXECUTE_SQL_QUERY(req, set, NULL);
|
||||
EXECUTE_SQL_QUERY(req, set, 0);
|
||||
|
||||
if (!set.NextRow())
|
||||
return NULL;
|
||||
return 0;
|
||||
|
||||
user = new User(this);
|
||||
|
||||
|
@ -235,7 +235,7 @@ User* Database::LoadUser(const wxString& name)
|
|||
|
||||
req = wxT("SELECT * FROM account WHERE user='") + user->_id + wxT("' ORDER BY default_account DESC, virtual, blocked, name ASC");
|
||||
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, {delete user;}, {delete user;});
|
||||
|
||||
while (set.NextRow())
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ User* Database::LoadUser(const wxString& name)
|
|||
|
||||
req = wxT("SELECT * FROM account WHERE id IN (SELECT account FROM shared_account WHERE user='") + user->_id + wxT("') ORDER BY name, blocked, virtual ASC");
|
||||
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, {delete user;}, {delete user;});
|
||||
|
||||
while (set.NextRow())
|
||||
{
|
||||
|
@ -282,17 +282,17 @@ User* Database::LoadUser(const wxString& name)
|
|||
req += wxT(" OR user='") + user->_id + wxT("'");
|
||||
req += wxT(" ORDER BY year ASC");
|
||||
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, {delete user;}, {delete user;});
|
||||
|
||||
while (set.NextRow())
|
||||
{
|
||||
user->_operations[set.GetInt(wxT("year"))] = NULL;
|
||||
user->_operations[set.GetInt(wxT("year"))] = 0;
|
||||
}
|
||||
set.Finalize();
|
||||
}
|
||||
|
||||
req = wxT("SELECT * FROM category WHERE user='") + user->_id + wxT("' ORDER BY fix_cost DESC, name ASC");
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, {delete user;}, {delete user;});
|
||||
|
||||
while (set.NextRow())
|
||||
{
|
||||
|
@ -311,7 +311,7 @@ User* Database::LoadUser(const wxString& name)
|
|||
set.Finalize();
|
||||
|
||||
req = wxT("SELECT name, value FROM preference WHERE user='") + user->_id + wxT("' ORDER BY value ASC");
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, {delete user;}, {delete user;});
|
||||
|
||||
while (set.NextRow())
|
||||
user->_preferences[set.GetAsString(wxT("name"))] = set.GetAsString(wxT("value"));
|
||||
|
@ -319,7 +319,7 @@ User* Database::LoadUser(const wxString& name)
|
|||
set.Finalize();
|
||||
|
||||
req = wxT("SELECT * FROM import_pattern WHERE user='") + user->_id + wxT("'");
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, {delete user;}, {delete user;});
|
||||
|
||||
while (set.NextRow())
|
||||
{
|
||||
|
@ -341,7 +341,7 @@ void Database::LoadYear(User* user, int year)
|
|||
wxString req;
|
||||
std::vector<Account>::iterator it;
|
||||
|
||||
if (user->_operations[year] == NULL)
|
||||
if (user->_operations[year] == 0)
|
||||
user->_operations[year] = new std::map<unsigned int, std::vector<Operation> >();
|
||||
|
||||
if (!user->_accounts.size()) return;
|
||||
|
@ -513,7 +513,7 @@ void Database::LinkOrUnlinkOperation(User* user, Operation& op)
|
|||
req += wxT(" AND amount='") + DoubleToString(-op.amount) + wxT("'");
|
||||
req += wxT(" AND meta='0'");
|
||||
req += wxT(" AND account !='") + op.account + wxT("'");
|
||||
req += wxT(" AND (transfert='' OR transfert IS NULL)");
|
||||
req += wxT(" AND (transfert='' OR transfert IS 0)");
|
||||
|
||||
EXECUTE_SQL_QUERY(req, set, );
|
||||
|
||||
|
@ -1563,7 +1563,7 @@ void Database::GetStats(User* user, const wxString& monthFrom, const wxString& y
|
|||
req += wxT(" AND (year < '") + yearTo + wxT("' OR (year == '") + yearTo + wxT("' AND month <= '") + monthTo + wxT("'))");
|
||||
req += wxT(" AND meta='0'");
|
||||
|
||||
req2 = req + wxT(" AND (transfert='' OR transfert IS NULL)");
|
||||
req2 = req + wxT(" AND (transfert='' OR transfert IS 0)");
|
||||
req2 += wxT(" AND amount < 0");
|
||||
|
||||
EXECUTE_SQL_QUERY(req2, set, );
|
||||
|
@ -1652,7 +1652,7 @@ void Database::GetMonthStats(User* user, const wxString& month, const wxString&
|
|||
}
|
||||
|
||||
// Fill categories
|
||||
GetStats(user, month, year, month, year, NULL, categories) ;
|
||||
GetStats(user, month, year, month, year, 0, categories) ;
|
||||
}
|
||||
|
||||
std::map<wxString, double>* Database::GetNotChecked(User* user, int month, int year)
|
||||
|
@ -1672,7 +1672,7 @@ std::map<wxString, double>* Database::GetNotChecked(User* user, int month, int y
|
|||
req += wxT(" AND month < '") + wxString::Format(wxT("%d"), month) + wxT("'") ;
|
||||
req += wxT("))");
|
||||
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, delete res, delete res);
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, delete res, delete res);
|
||||
|
||||
if (set.NextRow())
|
||||
(*res)[accountIt->id] = set.GetDouble(wxT("amount"));
|
||||
|
@ -1698,7 +1698,7 @@ std::map<wxString, double>* Database::GetVirtualAmount(User* user, int month, in
|
|||
req += wxT(" AND month < '") + wxString::Format(wxT("%d"), month) + wxT("'") ;
|
||||
req += wxT("))");
|
||||
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, delete res, delete res);
|
||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, 0, delete res, delete res);
|
||||
|
||||
if (set.NextRow())
|
||||
(*res)[accountIt->id] = set.GetDouble(wxT("amount"));
|
||||
|
|
|
@ -109,7 +109,7 @@ void Database::CheckDatabaseVersion()
|
|||
}
|
||||
}
|
||||
|
||||
wxMessageDialog dialog(NULL, wxT("You use an old database model. KissCount will try to upgrade it to the lastest version"), wxT("KissCount"), wxICON_INFORMATION | wxOK | wxCANCEL);
|
||||
wxMessageDialog dialog(0, wxT("You use an old database model. KissCount will try to upgrade it to the lastest version"), wxT("KissCount"), wxICON_INFORMATION | wxOK | wxCANCEL);
|
||||
if (dialog.ShowModal() == wxID_CANCEL)
|
||||
throw std::string("can't load this database");
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ bool ExportEngine::SaveFile(std::vector<Operation>* operations)
|
|||
unsigned int month, year;
|
||||
std::map<wxString, int>::iterator it;
|
||||
|
||||
if (!operations) return NULL;
|
||||
if (!operations) return 0;
|
||||
|
||||
_accounts.clear();
|
||||
_categories.clear();
|
||||
|
|
|
@ -159,7 +159,7 @@ bool XMLExportEngine::SaveFile(std::vector<Operation>* operations)
|
|||
return false;
|
||||
}
|
||||
|
||||
rc = xmlTextWriterStartDocument(_writer, NULL, "UTF-8", NULL);
|
||||
rc = xmlTextWriterStartDocument(_writer, 0, "UTF-8", 0);
|
||||
|
||||
if (rc < 0) return false;
|
||||
|
||||
|
|
|
@ -454,8 +454,8 @@ void AccountPanel::UpdateStats()
|
|||
std::vector<Account>::iterator accountIt;
|
||||
unsigned int day;
|
||||
int mode;
|
||||
std::map<wxString, double>* notChecked = NULL;
|
||||
std::map<wxString, double>* virtuals = NULL;
|
||||
std::map<wxString, double>* notChecked = 0;
|
||||
std::map<wxString, double>* virtuals = 0;
|
||||
Account account;
|
||||
Operation op;
|
||||
bool blocked_account ;
|
||||
|
|
|
@ -27,7 +27,7 @@ EVT_BUTTON(SEARCH_ID, ExportPanel::OnButtonSearch)
|
|||
EVT_SHOW(ExportPanel::OnShow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
ExportPanel::ExportPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _operations(NULL)
|
||||
ExportPanel::ExportPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _operations(0)
|
||||
{
|
||||
DEFAULT_FONT(font);
|
||||
std::vector<Account>::iterator accountIt;
|
||||
|
|
|
@ -34,12 +34,12 @@ public:
|
|||
wxScrolledWindow((wxFrame*)parent),
|
||||
_kiss(kiss),
|
||||
_wxUI(parent),
|
||||
_KissButton(NULL)
|
||||
_KissButton(0)
|
||||
{Hide();}
|
||||
|
||||
virtual void OnShow(wxShowEvent& event)=0;
|
||||
virtual KissPanel* CreatePanel()=0;
|
||||
virtual wxBitmapButton* GetButton(int id) {return NULL;}
|
||||
virtual wxBitmapButton* GetButton(int id) {return 0;}
|
||||
virtual wxString GetToolTip() {return wxT("");}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -38,7 +38,7 @@ EVT_CHECKLISTBOX(SHARED_WITH_ID, PreferencesPanel::OnSharedChange)
|
|||
EVT_SHOW(PreferencesPanel::OnShow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
PreferencesPanel::PreferencesPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _sharedWith(NULL), _curAccountRow(-1)
|
||||
PreferencesPanel::PreferencesPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _sharedWith(0), _curAccountRow(-1)
|
||||
{
|
||||
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer *hbox1 = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
|
@ -26,7 +26,7 @@ EVT_CALENDAR_SEL_CHANGED(CALENDAR_TO_ID, SearchBanner::OnCalendarToChange)
|
|||
EVT_TEXT_ENTER(DESCRIPTION_ID, SearchBanner::OnEnter)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
SearchBanner::SearchBanner(KissCount* kiss, wxPanel *parent, void* caller, OnButtonEnter enterCallback) : wxPanel(parent), _kiss(kiss), _caller(caller), _enterCallback(enterCallback), _operations(NULL)
|
||||
SearchBanner::SearchBanner(KissCount* kiss, wxPanel *parent, void* caller, OnButtonEnter enterCallback) : wxPanel(parent), _kiss(kiss), _caller(caller), _enterCallback(enterCallback), _operations(0)
|
||||
{
|
||||
DEFAULT_FONT(font);
|
||||
User* user = _kiss->GetUser();
|
||||
|
@ -109,9 +109,9 @@ SearchBanner::~SearchBanner()
|
|||
|
||||
std::vector<Operation> * SearchBanner::Search()
|
||||
{
|
||||
wxString *description=NULL, *amountFrom=NULL, *amountTo=NULL;
|
||||
wxString *description=0, *amountFrom=0, *amountTo=0;
|
||||
std::vector<wxString> categories, accounts;
|
||||
wxDateTime *dateFrom=NULL, *dateTo=NULL;
|
||||
wxDateTime *dateFrom=0, *dateTo=0;
|
||||
User* user= _kiss->GetUser();
|
||||
int i, types=0;
|
||||
std::vector<Operation>::iterator it;
|
||||
|
@ -120,7 +120,7 @@ std::vector<Operation> * SearchBanner::Search()
|
|||
if (_operations)
|
||||
{
|
||||
delete _operations;
|
||||
_operations = NULL;
|
||||
_operations = 0;
|
||||
}
|
||||
|
||||
if (_checkDateFrom->IsChecked())
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef void (*OnButtonEnter)(void* caller, wxCommandEvent& event);
|
|||
class SearchBanner: public wxPanel
|
||||
{
|
||||
public:
|
||||
SearchBanner(KissCount* kiss, wxPanel* parent, void* caller=NULL, OnButtonEnter enterCallback=NULL);
|
||||
SearchBanner(KissCount* kiss, wxPanel* parent, void* caller=0, OnButtonEnter enterCallback=0);
|
||||
~SearchBanner();
|
||||
|
||||
void OnEnter(wxCommandEvent& event);
|
||||
|
|
|
@ -31,7 +31,7 @@ EVT_BUTTON(RENAME_ID, SearchPanel::OnButtonRename)
|
|||
EVT_SHOW(SearchPanel::OnShow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _operations(NULL)
|
||||
SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _operations(0)
|
||||
{
|
||||
DEFAULT_FONT(font);
|
||||
std::vector<Account>::iterator accountIt;
|
||||
|
|
|
@ -26,7 +26,7 @@ EVT_CHOICE(RANGE_ID, StatsPanel::OnRangeChange)
|
|||
EVT_CHECKLISTBOX(ACCOUNTS_ID, StatsPanel::OnAccountsChange)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
StatsPanel::StatsPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _plot(NULL), _chart(NULL)
|
||||
StatsPanel::StatsPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _plot(0), _chart(0)
|
||||
{
|
||||
wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
|
||||
|
@ -292,7 +292,7 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT
|
|||
*/
|
||||
amounts[size*2+1] =
|
||||
accountAmounts[accountIt->id][accountYearIt->first][b-1]
|
||||
+ _kiss->CalcAccountAmount(accountIt->id, b-1, accountYearIt->first, NULL);
|
||||
+ _kiss->CalcAccountAmount(accountIt->id, b-1, accountYearIt->first, 0);
|
||||
failed = true;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "CalendarEditor.h"
|
||||
|
||||
CalendarEditor::CalendarEditor(int day, int month, int year) : _day(day), _month(month), _year(year), _parent(NULL), _days(NULL), _editor(NULL)
|
||||
CalendarEditor::CalendarEditor(int day, int month, int year) : _day(day), _month(month), _year(year), _parent(0), _days(0), _editor(0)
|
||||
{
|
||||
wxDateTime date;
|
||||
int i;
|
||||
|
@ -60,7 +60,7 @@ void CalendarEditor::Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHa
|
|||
_parent = parent;
|
||||
_editor->Create(parent, id, wxDefaultPosition, wxDefaultSize, _maxDay, _days);
|
||||
_editor->Select(_day);
|
||||
_editor->Connect((int)id, (int)wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CalendarEditor::OnDateChanged), NULL, this);
|
||||
_editor->Connect((int)id, (int)wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CalendarEditor::OnDateChanged), 0, this);
|
||||
}
|
||||
|
||||
bool CalendarEditor::EndEdit (int row, int col, wxGrid *grid)
|
||||
|
@ -97,7 +97,7 @@ void CalendarEditor::SetSize (const wxRect &rect)
|
|||
|
||||
void CalendarEditor::StartingClick()
|
||||
{
|
||||
Show(true, NULL);
|
||||
Show(true, 0);
|
||||
}
|
||||
|
||||
bool CalendarEditor::IsAcceptedKey(wxKeyEvent &event)
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
void ApplyEdit(int row, int col, wxGrid *grid);
|
||||
wxString GetValue() const;
|
||||
void Reset();
|
||||
void Show(bool show, wxGridCellAttr *attr=NULL);
|
||||
void Show(bool show, wxGridCellAttr *attr=0);
|
||||
void SetSize (const wxRect &rect);
|
||||
/* void OnCalendarChange(wxCommandEvent& event); */
|
||||
void OnDateChanged(wxCommandEvent& event);
|
||||
|
|
|
@ -87,7 +87,7 @@ GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id,
|
|||
_categories[i] = wxGetTranslation(categoryIt->name) ;
|
||||
}
|
||||
|
||||
Connect(id, wxEVT_GRID_CELL_CHANGE, wxGridEventHandler(GridAccount::OnOperationModified), NULL, this);
|
||||
Connect(id, wxEVT_GRID_CELL_CHANGE, wxGridEventHandler(GridAccount::OnOperationModified), 0, this);
|
||||
|
||||
AutoSizeColumn(TREE, false);
|
||||
AutoSizeColumn(CATEGORY, false);
|
||||
|
@ -468,7 +468,7 @@ void GridAccount::OnCellLeftClick(wxGridEvent& evt)
|
|||
if (/*evt.GetCol() == 0 && */IsInSelection(evt.GetRow(), evt.GetCol()))
|
||||
{
|
||||
//m_selTemp = m_selection;
|
||||
m_selection = NULL;
|
||||
m_selection = 0;
|
||||
}
|
||||
pEditor->DecRef();
|
||||
evt.Skip();
|
||||
|
|
|
@ -25,7 +25,7 @@ enum {BUTTON_ID = 1} ;
|
|||
// EVT_BUTTON(BUTTON_ID, wxGridCellButtonEditor::OnButton)
|
||||
// END_EVENT_TABLE()
|
||||
|
||||
wxGridCellButtonEditor::wxGridCellButtonEditor(const wxString& text) : _text(text), _button(NULL)
|
||||
wxGridCellButtonEditor::wxGridCellButtonEditor(const wxString& text) : _text(text), _button(0)
|
||||
{}
|
||||
|
||||
wxGridCellButtonEditor::~wxGridCellButtonEditor()
|
||||
|
@ -55,7 +55,7 @@ void wxGridCellButtonEditor::Create (wxWindow *parent, wxWindowID id, wxEvtHandl
|
|||
{
|
||||
if (_button) return;
|
||||
_button = new wxButton(parent, id, _text);
|
||||
_button->Connect(id, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxGridCellButtonEditor::OnButton), NULL, this);
|
||||
_button->Connect(id, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxGridCellButtonEditor::OnButton), 0, this);
|
||||
}
|
||||
|
||||
bool wxGridCellButtonEditor::EndEdit (int row, int col, /*const*/ wxGrid *grid/*, const wxString &oldval, wxString *newval*/)
|
||||
|
@ -79,7 +79,7 @@ void wxGridCellButtonEditor::SetSize (const wxRect &rect)
|
|||
if (_button) _button->SetSize(rect);
|
||||
}
|
||||
|
||||
void wxGridCellButtonEditor::Show (bool show, wxGridCellAttr *attr=NULL)
|
||||
void wxGridCellButtonEditor::Show (bool show, wxGridCellAttr *attr=0)
|
||||
{
|
||||
if (_button) _button->Show(show);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ wxGridCellEditor* wxGridCellTreeButtonEditor::Clone () const
|
|||
|
||||
void wxGridCellTreeButtonEditor::BeginEdit (int row, int col, wxGrid *grid)
|
||||
{
|
||||
wxGridEvent evt(0, 0, NULL, row, col);
|
||||
wxGridEvent evt(0, 0, 0, row, col);
|
||||
|
||||
_row = row;
|
||||
_col = col;
|
||||
|
@ -71,6 +71,6 @@ void wxGridCellTreeButtonEditor::SetSize (const wxRect &rect)
|
|||
{
|
||||
}
|
||||
|
||||
void wxGridCellTreeButtonEditor::Show (bool show, wxGridCellAttr *attr=NULL)
|
||||
void wxGridCellTreeButtonEditor::Show (bool show, wxGridCellAttr *attr=0)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ void wxMyGrid::OnCellLeftClick(wxGridEvent& evt)
|
|||
if (evt.GetCol() == 0 && IsInSelection(evt.GetRow(), evt.GetCol()))
|
||||
{
|
||||
//m_selTemp = m_selection;
|
||||
m_selection = NULL;
|
||||
m_selection = 0;
|
||||
}
|
||||
pEditor->DecRef();
|
||||
break;
|
||||
|
|
|
@ -42,8 +42,8 @@ wxColour categoryColors[MAX_CATEGORY] = {wxColour(0x00, 0x45, 0x86),
|
|||
wxColour(0x00, 0x84, 0xD1)};
|
||||
|
||||
wxUI::wxUI(KissCount* kiss, const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame(NULL, -1, title, pos, size), _kiss(kiss),
|
||||
_curPanel(NULL), _locale(NULL), _needReload(false)
|
||||
: wxFrame(0, -1, title, pos, size), _kiss(kiss),
|
||||
_curPanel(0), _locale(0), _needReload(false)
|
||||
{
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
|
@ -87,7 +87,7 @@ bool wxUI::SetLanguage(long language)
|
|||
bool res = true;
|
||||
|
||||
if (_locale) delete _locale;
|
||||
_locale = NULL;
|
||||
_locale = 0;
|
||||
|
||||
// load language if possible, fall back to english otherwise
|
||||
if(wxLocale::IsAvailable(language))
|
||||
|
@ -104,7 +104,7 @@ bool wxUI::SetLanguage(long language)
|
|||
_language = (wxLanguage) language;
|
||||
}
|
||||
|
||||
if (_locale == NULL || !_locale->IsOk())
|
||||
if (_locale == 0 || !_locale->IsOk())
|
||||
{
|
||||
if (_locale) delete _locale;
|
||||
_locale = new wxLocale();
|
||||
|
@ -167,7 +167,7 @@ void wxUI::LoadPanels()
|
|||
if (_curPanel)
|
||||
{
|
||||
_vbox->Detach(_curPanel);
|
||||
_curPanel = NULL;
|
||||
_curPanel = 0;
|
||||
}
|
||||
|
||||
if (_panels.size())
|
||||
|
@ -275,7 +275,7 @@ void wxUI::KillMe()
|
|||
if (_curPanel)
|
||||
{
|
||||
_vbox->Detach(_curPanel);
|
||||
_curPanel = NULL;
|
||||
_curPanel = 0;
|
||||
}
|
||||
|
||||
for (it=_panels.begin(); it!= _panels.end(); it++)
|
||||
|
|
Loading…
Reference in New Issue
Block a user