From: <gua...@us...> - 2013-09-19 00:11:37
|
Revision: 4509 http://sourceforge.net/p/moneymanagerex/code/4509 Author: guanlisheng Date: 2013-09-19 00:11:35 +0000 (Thu, 19 Sep 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/src/newacctdialog.cpp Modified: trunk/src/newacctdialog.cpp =================================================================== --- trunk/src/newacctdialog.cpp 2013-09-18 07:09:25 UTC (rev 4508) +++ trunk/src/newacctdialog.cpp 2013-09-19 00:11:35 UTC (rev 4509) @@ -25,6 +25,7 @@ #include "paths.h" #include <wx/valnum.h> #include "model/Model_Infotable.h" +#include "model/Model_Account.h" enum { ACCT_TYPE_CHECKING = 0, ACCT_TYPE_INVESTMENT, ACCT_TYPE_TERM }; enum { ACCT_STATUS_OPEN = 0, ACCT_STATUS_CLOSED }; @@ -163,13 +164,10 @@ grid_sizer->Add(new wxStaticText( this, wxID_STATIC, _("Account Type:")), flags); - wxArrayString itemAcctTypeStrings; - itemAcctTypeStrings.Add(_("Checking")); // ACCOUNT_TYPE_BANK - itemAcctTypeStrings.Add(_("Investment")); // ACCOUNT_TYPE_STOCK - itemAcctTypeStrings.Add(_("Term")); // ACCOUNT_TYPE_TERM + wxChoice* itemChoice61 = new wxChoice( this, ID_DIALOG_NEWACCT_COMBO_ACCTTYPE); + for (const auto& type: Model_Account::instance().types_) + itemChoice61->Append(wxGetTranslation(type), new wxStringClientData(type)); - wxChoice* itemChoice61 = new wxChoice( this, ID_DIALOG_NEWACCT_COMBO_ACCTTYPE, - wxDefaultPosition, wxDefaultSize, itemAcctTypeStrings); grid_sizer->Add(itemChoice61, flagsExpand); itemChoice61->SetSelection(ACCT_TYPE_CHECKING); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |