Fix bugs with new users
This commit is contained in:
parent
fb1007bfcb
commit
dd5f231f20
|
@ -286,6 +286,8 @@ void KissCount::NewUser(const wxString& name)
|
||||||
cat.parent = wxT("0") ; cat.name = _("Other") ; cat.color = OWN_GREEN;
|
cat.parent = wxT("0") ; cat.name = _("Other") ; cat.color = OWN_GREEN;
|
||||||
AddCategory(cat);
|
AddCategory(cat);
|
||||||
|
|
||||||
|
SetOperationOrder(wxT("ASC"));
|
||||||
|
|
||||||
_db->GenerateMonth(_user, -1, -1, (int)curDate.GetMonth(), curDate.GetYear());
|
_db->GenerateMonth(_user, -1, -1, (int)curDate.GetMonth(), curDate.GetYear());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -957,23 +957,6 @@ void Database::NewUser(const wxString& name)
|
||||||
|
|
||||||
set.Finalize();
|
set.Finalize();
|
||||||
|
|
||||||
req = wxT("SELECT * FROM default_preference");
|
|
||||||
|
|
||||||
EXECUTE_SQL_QUERY(req, set,);
|
|
||||||
|
|
||||||
while (set.NextRow())
|
|
||||||
{
|
|
||||||
req = wxT("INSERT INTO preference ('user', 'name', 'value') VALUES ('") ;
|
|
||||||
req += id + wxT("'");
|
|
||||||
req += wxT(", '") + set.GetAsString(wxT("type")) + wxT("'");
|
|
||||||
req += wxT(", '") + set.GetAsString(wxT("value")) + wxT("'");
|
|
||||||
req += wxT(")");
|
|
||||||
|
|
||||||
EXECUTE_SQL_UPDATE(req, );
|
|
||||||
}
|
|
||||||
|
|
||||||
set.Finalize();
|
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,8 @@ UsersDialog::UsersDialog(KissCount* kiss, wxUI *parent) : wxDialog(&(*parent), -
|
||||||
|
|
||||||
if (users_list.size() == 0)
|
if (users_list.size() == 0)
|
||||||
OnNewUser(event);
|
OnNewUser(event);
|
||||||
|
else
|
||||||
|
ShowModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UsersDialog::OnOK(wxCommandEvent& event)
|
void UsersDialog::OnOK(wxCommandEvent& event)
|
||||||
|
|
|
@ -143,7 +143,6 @@ void wxUI::ShowPreferences()
|
||||||
void wxUI::ChangeUser()
|
void wxUI::ChangeUser()
|
||||||
{
|
{
|
||||||
UsersDialog u(_kiss, this);
|
UsersDialog u(_kiss, this);
|
||||||
u.ShowModal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxUI::LoadUser()
|
void wxUI::LoadUser()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user