From: <oma...@us...> - 2009-11-14 02:25:12
|
Revision: 777 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=777&view=rev Author: omalleypat Date: 2009-11-14 02:24:47 +0000 (Sat, 14 Nov 2009) Log Message: ----------- hide budget related reports if there are no budget years in the db Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2009-11-13 21:04:27 UTC (rev 776) +++ trunk/mmex/src/mmex.cpp 2009-11-14 02:24:47 UTC (rev 777) @@ -1076,7 +1076,19 @@ navTreeCtrl_->SetItemData(transactionList, new mmTreeItemData(wxT("Transaction Report"))); /////////////////////////////////////////////////////////////////// - wxTreeItemId budgetPerformance; + + static const char sql[] = + "select * from BUDGETYEAR_V1"; + + + wxSQLite3Statement st = db_->PrepareStatement(sql); + //st.Bind(1, transID_); + + wxSQLite3ResultSet q1 = st.ExecuteQuery(); + if (q1.NextRow()) + { + + wxTreeItemId budgetPerformance; if (mmIniOptions::enableBudget_) { budgetPerformance = navTreeCtrl_->AppendItem(reports, @@ -1093,7 +1105,37 @@ navTreeCtrl_->SetItemData(budgetSetupPerformance, new mmTreeItemData(wxT("Budget Setup Performance"))); } - /////////////////////////////////////////////////////////////////// + if (mmIniOptions::enableBudget_) + { + static const char sql[] = + "select BUDGETYEARID, BUDGETYEARNAME " + "from BUDGETYEAR_V1 " + "order by BUDGETYEARNAME"; + + wxSQLite3ResultSet q1 = db_.get()->ExecuteQuery(sql); + + while (q1.NextRow()) + { + int id = q1.GetInt(wxT("BUDGETYEARID")); + const wxString name = q1.GetString(wxT("BUDGETYEARNAME")); + + wxTreeItemId bYear = navTreeCtrl_->AppendItem(budgeting, name, 3, 3); + navTreeCtrl_->SetItemData(bYear, new mmTreeItemData(id, true)); + + wxTreeItemId bYearData = navTreeCtrl_->AppendItem(budgetPerformance, name, 4, 4); + navTreeCtrl_->SetItemData(bYearData, new mmTreeItemData(id, true)); + + wxTreeItemId bYearSetupData = navTreeCtrl_->AppendItem(budgetSetupPerformance, name, 4, 4); + navTreeCtrl_->SetItemData(bYearSetupData, new mmTreeItemData(id, true)); + } + q1.Finalize(); + + navTreeCtrl_->Expand(budgeting); + } + + } + st.Finalize(); + /////////////////////////////////////////////////////////////////// wxTreeItemId cashFlow = navTreeCtrl_->AppendItem(reports, _("Cash Flow"), 4, 4); navTreeCtrl_->SetItemData(cashFlow, @@ -1153,34 +1195,6 @@ } } - if (mmIniOptions::enableBudget_) - { - static const char sql[] = - "select BUDGETYEARID, BUDGETYEARNAME " - "from BUDGETYEAR_V1 " - "order by BUDGETYEARNAME"; - - wxSQLite3ResultSet q1 = db_.get()->ExecuteQuery(sql); - - while (q1.NextRow()) - { - int id = q1.GetInt(wxT("BUDGETYEARID")); - const wxString name = q1.GetString(wxT("BUDGETYEARNAME")); - - wxTreeItemId bYear = navTreeCtrl_->AppendItem(budgeting, name, 3, 3); - navTreeCtrl_->SetItemData(bYear, new mmTreeItemData(id, true)); - - wxTreeItemId bYearData = navTreeCtrl_->AppendItem(budgetPerformance, name, 4, 4); - navTreeCtrl_->SetItemData(bYearData, new mmTreeItemData(id, true)); - - wxTreeItemId bYearSetupData = navTreeCtrl_->AppendItem(budgetSetupPerformance, name, 4, 4); - navTreeCtrl_->SetItemData(bYearSetupData, new mmTreeItemData(id, true)); - } - q1.Finalize(); - - navTreeCtrl_->Expand(budgeting); - } - navTreeCtrl_->Expand(accounts); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oma...@us...> - 2009-11-14 02:48:39
|
Revision: 778 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=778&view=rev Author: omalleypat Date: 2009-11-14 02:48:27 +0000 (Sat, 14 Nov 2009) Log Message: ----------- If there are no Investment accounts, display a message to the user when the stocks tree item is clicked and don't show the stocks panel. Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2009-11-14 02:24:47 UTC (rev 777) +++ trunk/mmex/src/mmex.cpp 2009-11-14 02:48:27 UTC (rev 778) @@ -3532,14 +3532,32 @@ void mmGUIFrame::OnStocks(wxCommandEvent& /*event*/) { - wxSizer *sizer = cleanupHomePanel(); - - panelCurrent_ = new mmStocksPanel(db_.get(), inidb_.get(), -1, homePanel, ID_PANEL3, - wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); - - sizer->Add(panelCurrent_, 1, wxGROW|wxALL, 1); - - homePanel->Layout(); + // First, check to see if there is a stock account setup + static const char sql[] = + "SELECT * FROM ACCOUNTLIST_V1 WHERE ACCOUNTTYPE = 'Investment' "; + + + wxSQLite3Statement st = db_->PrepareStatement(sql); + //st.Bind(1, transID_); + + wxSQLite3ResultSet q1 = st.ExecuteQuery(); + if (q1.NextRow()) + { + wxSizer *sizer = cleanupHomePanel(); + + panelCurrent_ = new mmStocksPanel(db_.get(), inidb_.get(), -1, homePanel, ID_PANEL3, + wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); + + sizer->Add(panelCurrent_, 1, wxGROW|wxALL, 1); + + homePanel->Layout(); + } + else + { + wxMessageBox(wxT("This database does not have any investment accounts associated with it. You can create one using the Accounts menu."), + wxT("No Investment Accounts Configured"),wxOK); + } + q1.Finalize(); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oma...@us...> - 2009-11-15 17:29:21
|
Revision: 793 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=793&view=rev Author: omalleypat Date: 2009-11-15 17:29:13 +0000 (Sun, 15 Nov 2009) Log Message: ----------- This should fix the bug introduced in r777. I have tested this on r777 and it works, however I am not able to compile HEAD right now due to a TinyXML issue introduced after 777 that I don't know how to fix. I am checking this in anyway so others have what should be a stable version... Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2009-11-15 09:52:39 UTC (rev 792) +++ trunk/mmex/src/mmex.cpp 2009-11-15 17:29:13 UTC (rev 793) @@ -1083,19 +1083,19 @@ new mmTreeItemData(wxT("Transaction Report"))); /////////////////////////////////////////////////////////////////// - static const char sql[] = - "select * from BUDGETYEAR_V1"; + // Check to see if there are any budget years in the db + bool budget_exists=false; + if (db_.get()) + { + static const char sql_be[] = "select * from BUDGETYEAR_V1"; + wxSQLite3ResultSet q_be = db_.get()->ExecuteQuery(sql_be); + if (q_be.NextRow()) + budget_exists = true; + q_be.Finalize(); + } - - wxSQLite3Statement st = db_->PrepareStatement(sql); - //st.Bind(1, transID_); - - wxSQLite3ResultSet q1 = st.ExecuteQuery(); - if (q1.NextRow()) - { - wxTreeItemId budgetPerformance; - if (mmIniOptions::enableBudget_) + if (mmIniOptions::enableBudget_ && budget_exists) { budgetPerformance = navTreeCtrl_->AppendItem(reports, _("Budget Performance"), 4, 4); @@ -1104,14 +1104,14 @@ } /////////////////////////////////////////////////////////////////// wxTreeItemId budgetSetupPerformance; - if (mmIniOptions::enableBudget_) + if (mmIniOptions::enableBudget_ && budget_exists) { budgetSetupPerformance = navTreeCtrl_->AppendItem(reports, _("Budget Setup and Performance"), 4, 4); navTreeCtrl_->SetItemData(budgetSetupPerformance, new mmTreeItemData(wxT("Budget Setup Performance"))); } - if (mmIniOptions::enableBudget_) + if (mmIniOptions::enableBudget_ && budget_exists) { static const char sql[] = "select BUDGETYEARID, BUDGETYEARNAME " @@ -1139,9 +1139,7 @@ navTreeCtrl_->Expand(budgeting); } - } - st.Finalize(); - /////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////// wxTreeItemId cashFlow = navTreeCtrl_->AppendItem(reports, _("Cash Flow"), 4, 4); navTreeCtrl_->SetItemData(cashFlow, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kkk...@us...> - 2009-11-15 19:22:36
|
Revision: 794 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=794&view=rev Author: kkkvadim Date: 2009-11-15 19:22:28 +0000 (Sun, 15 Nov 2009) Log Message: ----------- refactoring of if (db_ && mmIniOptions::enableBudget_) ... Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2009-11-15 17:29:13 UTC (rev 793) +++ trunk/mmex/src/mmex.cpp 2009-11-15 19:22:28 UTC (rev 794) @@ -1083,67 +1083,49 @@ new mmTreeItemData(wxT("Transaction Report"))); /////////////////////////////////////////////////////////////////// - // Check to see if there are any budget years in the db - bool budget_exists=false; - if (db_.get()) - { - static const char sql_be[] = "select * from BUDGETYEAR_V1"; - wxSQLite3ResultSet q_be = db_.get()->ExecuteQuery(sql_be); - if (q_be.NextRow()) - budget_exists = true; - q_be.Finalize(); - } - - wxTreeItemId budgetPerformance; - if (mmIniOptions::enableBudget_ && budget_exists) + if (db_ && mmIniOptions::enableBudget_) { - budgetPerformance = navTreeCtrl_->AppendItem(reports, - _("Budget Performance"), 4, 4); - navTreeCtrl_->SetItemData(budgetPerformance, - new mmTreeItemData(wxT("Budget Performance"))); + static const char sql[] = + "select BUDGETYEARID, BUDGETYEARNAME " + "from BUDGETYEAR_V1 " + "order by BUDGETYEARNAME"; + + wxTreeItemId budgetPerformance; + wxTreeItemId budgetSetupPerformance; + + wxSQLite3ResultSet q1 = db_->ExecuteQuery(sql); + + for (size_t i = 0; q1.NextRow(); ++i) + { + if (!i) { // first loop only + budgetPerformance = navTreeCtrl_->AppendItem(reports, _("Budget Performance"), 4, 4); + navTreeCtrl_->SetItemData(budgetPerformance, new mmTreeItemData(wxT("Budget Performance"))); + + budgetSetupPerformance = navTreeCtrl_->AppendItem(reports, _("Budget Setup and Performance"), 4, 4); + navTreeCtrl_->SetItemData(budgetSetupPerformance, new mmTreeItemData(wxT("Budget Setup Performance"))); + } + + int id = q1.GetInt(wxT("BUDGETYEARID")); + const wxString name = q1.GetString(wxT("BUDGETYEARNAME")); + + wxTreeItemId bYear = navTreeCtrl_->AppendItem(budgeting, name, 3, 3); + navTreeCtrl_->SetItemData(bYear, new mmTreeItemData(id, true)); + + wxTreeItemId bYearData = navTreeCtrl_->AppendItem(budgetPerformance, name, 4, 4); + navTreeCtrl_->SetItemData(bYearData, new mmTreeItemData(id, true)); + + wxTreeItemId bYearSetupData = navTreeCtrl_->AppendItem(budgetSetupPerformance, name, 4, 4); + navTreeCtrl_->SetItemData(bYearSetupData, new mmTreeItemData(id, true)); + } + + q1.Finalize(); + + navTreeCtrl_->Expand(budgeting); } - /////////////////////////////////////////////////////////////////// - wxTreeItemId budgetSetupPerformance; - if (mmIniOptions::enableBudget_ && budget_exists) - { - budgetSetupPerformance = navTreeCtrl_->AppendItem(reports, - _("Budget Setup and Performance"), 4, 4); - navTreeCtrl_->SetItemData(budgetSetupPerformance, - new mmTreeItemData(wxT("Budget Setup Performance"))); - } - if (mmIniOptions::enableBudget_ && budget_exists) - { - static const char sql[] = - "select BUDGETYEARID, BUDGETYEARNAME " - "from BUDGETYEAR_V1 " - "order by BUDGETYEARNAME"; - - wxSQLite3ResultSet q1 = db_.get()->ExecuteQuery(sql); - - while (q1.NextRow()) - { - int id = q1.GetInt(wxT("BUDGETYEARID")); - const wxString name = q1.GetString(wxT("BUDGETYEARNAME")); - - wxTreeItemId bYear = navTreeCtrl_->AppendItem(budgeting, name, 3, 3); - navTreeCtrl_->SetItemData(bYear, new mmTreeItemData(id, true)); - - wxTreeItemId bYearData = navTreeCtrl_->AppendItem(budgetPerformance, name, 4, 4); - navTreeCtrl_->SetItemData(bYearData, new mmTreeItemData(id, true)); - - wxTreeItemId bYearSetupData = navTreeCtrl_->AppendItem(budgetSetupPerformance, name, 4, 4); - navTreeCtrl_->SetItemData(bYearSetupData, new mmTreeItemData(id, true)); - } - q1.Finalize(); - - navTreeCtrl_->Expand(budgeting); - } /////////////////////////////////////////////////////////////////// - wxTreeItemId cashFlow = navTreeCtrl_->AppendItem(reports, - _("Cash Flow"), 4, 4); - navTreeCtrl_->SetItemData(cashFlow, - new mmTreeItemData(wxT("Cash Flow"))); + wxTreeItemId cashFlow = navTreeCtrl_->AppendItem(reports, _("Cash Flow"), 4, 4); + navTreeCtrl_->SetItemData(cashFlow, new mmTreeItemData(wxT("Cash Flow"))); wxTreeItemId cashflowSpecificAccounts = navTreeCtrl_->AppendItem(cashFlow, _("Cash Flow - Specific Accounts"), 4, 4); @@ -1166,7 +1148,7 @@ navTreeCtrl_->Expand(root); navTreeCtrl_->Expand(reports); - if (!db_.get()) + if (!db_) return; /* Load Nav Tree Control */ @@ -3010,7 +2992,7 @@ "where ACCOUNTTYPE = 'Checking' " "order by ACCOUNTNAME"; - wxSQLite3ResultSet q1 = db_.get()->ExecuteQuery(sql); + wxSQLite3ResultSet q1 = db_->ExecuteQuery(sql); while (q1.NextRow()) { as.Add(q1.GetString(wxT("ACCOUNTNAME"))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kkk...@us...> - 2009-11-29 10:19:09
|
Revision: 833 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=833&view=rev Author: kkkvadim Date: 2009-11-29 10:19:01 +0000 (Sun, 29 Nov 2009) Log Message: ----------- removed usage of TinyXML - EVT_MENU(MENU_IMPORT_QFX, mmGUIFrame::OnImportQFX) Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2009-11-29 09:59:24 UTC (rev 832) +++ trunk/mmex/src/mmex.cpp 2009-11-29 10:19:01 UTC (rev 833) @@ -27,8 +27,6 @@ #include "stockspanel.h" #include "assetspanel.h" #include "univcsvdialog.h" -#include "wxtinyxml.h" -#include "tinyxml.h" #include "reportbase.h" #include "reportsummary.h" #include "reportcategexp.h" @@ -112,8 +110,8 @@ #include "../resources/wrench.xpm" //---------------------------------------------------------------------------- #include <wx/debugrpt.h> -#include "wx/sysopt.h" -#include "wx/wizard.h" +#include <wx/sysopt.h> +#include <wx/wizard.h> #include <wx/xml/xml.h> //---------------------------------------------------------------------------- #include <boost/scoped_array.hpp> @@ -338,7 +336,6 @@ EVT_MENU(MENU_IMPORT_CSV, mmGUIFrame::OnImportCSV) EVT_MENU(MENU_IMPORT_MMNETCSV, mmGUIFrame::OnImportCSVMMNET) EVT_MENU(MENU_IMPORT_QIF, mmGUIFrame::OnImportQIF) - EVT_MENU(MENU_IMPORT_QFX, mmGUIFrame::OnImportQFX) EVT_MENU(MENU_IMPORT_UNIVCSV, mmGUIFrame::OnImportUniversalCSV) EVT_MENU(wxID_EXIT, mmGUIFrame::OnQuit) EVT_MENU(MENU_NEWACCT, mmGUIFrame::OnNewAccount) @@ -2251,7 +2248,6 @@ importMenu->Append(MENU_IMPORT_CSV, _("&MMEX CSV Files"), _("Import from MMEX CSV")); if (mmIniOptions::enableImportMMNETCSV_) importMenu->Append(MENU_IMPORT_MMNETCSV, _("MM.&NET CSV Files"), _("Import from MM.NET CSV")); - //importMenu->Append(MENU_IMPORT_QFX, _("&QFX Files"), _("Import from QFX")); menuFile_->Append(MENU_IMPORT, _("&Import"), importMenu); menuFile_->AppendSeparator(); @@ -2940,78 +2936,6 @@ } //---------------------------------------------------------------------------- -void mmGUIFrame::OnImportQFX(wxCommandEvent& /*event*/) -{ - if (mmDBWrapper::getNumAccounts(db_.get()) == 0) - { - mmShowErrorMessage(0, _("No Account available! Cannot Import! Create a new account first!"), - _("Error")); - return ; - } - - wxArrayString as; - int fromAccountID = -1; - - static const char sql[] = - "select ACCOUNTNAME " - "from ACCOUNTLIST_V1 " - "where ACCOUNTTYPE = 'Checking' " - "order by ACCOUNTNAME"; - - wxSQLite3ResultSet q1 = db_->ExecuteQuery(sql); - while (q1.NextRow()) - { - as.Add(q1.GetString(wxT("ACCOUNTNAME"))); - } - q1.Finalize(); - - - wxSingleChoiceDialog* scd = new wxSingleChoiceDialog(0, _("Choose Account to import to:"), - _("QFX Import"), as); - if (scd->ShowModal() == wxID_OK) - { - wxString acctName = scd->GetStringSelection(); - fromAccountID = mmDBWrapper::getAccountID(db_.get(), acctName); - - wxString fileName = wxFileSelector(_("Choose QFX data file to import"), - wxGetEmptyString(), wxGetEmptyString(), wxGetEmptyString(), wxT("*.qfx"), wxFILE_MUST_EXIST); - if ( !fileName.empty() ) - { - wxTiXmlDocument xmlDoc; - - wxFileInputStream fs(fileName); - xmlDoc.LoadFile(fs); - - - TiXmlNode* node = 0; - for( node = xmlDoc.IterateChildren( 0 ); - node; - node = xmlDoc.IterateChildren( node ) ) - { - // parse XML declaration - if (node->ToDeclaration()) - { - //TiXmlDeclaration* declaration = node->ToDeclaration(); - } - - if (node->ToElement()) - { - TiXmlElement* ele = node->ToElement(); - std::string str = ele->ValueStr(); - wxString eleStr = wxString::FromAscii(str.c_str()); - if (eleStr != wxT("mmCoreDataStore")) - { - - } - } - } - - } - } - scd->Destroy(); -} -//---------------------------------------------------------------------------- - void mmGUIFrame::OnImportQIF(wxCommandEvent& /*event*/) { int accountID = mmImportQIF(core_.get()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kkk...@us...> - 2009-12-13 11:58:34
|
Revision: 878 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=878&view=rev Author: kkkvadim Date: 2009-12-13 11:58:23 +0000 (Sun, 13 Dec 2009) Log Message: ----------- - boost::shared_ptr<wxSQLite3Database> pDB(new wxSQLite3Database()); - db_ = pDB; + db_.reset(new wxSQLite3Database); Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2009-12-13 11:57:25 UTC (rev 877) +++ trunk/mmex/src/mmex.cpp 2009-12-13 11:58:23 UTC (rev 878) @@ -2528,8 +2528,7 @@ } else { - boost::shared_ptr<wxSQLite3Database> pDB(new wxSQLite3Database()); - db_ = pDB; + db_.reset(new wxSQLite3Database); db_->Open(fileName, password); password_ = password; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kkk...@us...> - 2010-05-24 14:28:27
|
Revision: 953 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=953&view=rev Author: kkkvadim Date: 2010-05-24 14:28:21 +0000 (Mon, 24 May 2010) Log Message: ----------- OnStocks sql optimized Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2010-05-24 13:25:04 UTC (rev 952) +++ trunk/mmex/src/mmex.cpp 2010-05-24 14:28:21 UTC (rev 953) @@ -3333,32 +3333,21 @@ void mmGUIFrame::OnStocks(wxCommandEvent& /*event*/) { - // First, check to see if there is a stock account setup static const char sql[] = - "SELECT * FROM ACCOUNTLIST_V1 WHERE ACCOUNTTYPE = 'Investment' "; + "select count(*) " + "from ACCOUNTLIST_V1 " + "where ACCOUNTTYPE = 'Investment' " + "limit 1"; - - wxSQLite3Statement st = m_db->PrepareStatement(sql); - //st.Bind(1, transID_); - - wxSQLite3ResultSet q1 = st.ExecuteQuery(); - if (q1.NextRow()) - { + if (m_db->ExecuteScalar(sql)) { wxSizer *sizer = cleanupHomePanel(); - - panelCurrent_ = new mmStocksPanel(m_db.get(), m_inidb.get(), -1, homePanel, ID_PANEL3, - wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); - + panelCurrent_ = new mmStocksPanel(m_db.get(), m_inidb.get(), -1, homePanel, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); sizer->Add(panelCurrent_, 1, wxGROW|wxALL, 1); - homePanel->Layout(); + } else { + wxMessageBox(_("No investment accounts found. You can create one using the Accounts menu."), + _("Investment Accounts")); } - else - { - wxMessageBox(wxT("This database does not have any investment accounts associated with it. You can create one using the Accounts menu."), - wxT("No Investment Accounts Configured"),wxOK); - } - q1.Finalize(); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-03-26 02:11:42
|
Revision: 1207 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1207&view=rev Author: stef145g Date: 2011-03-26 02:11:35 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Remove Item: Tools -> Stock Investments Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2011-03-26 01:09:50 UTC (rev 1206) +++ trunk/mmex/src/mmex.cpp 2011-03-26 02:11:35 UTC (rev 1207) @@ -887,7 +887,7 @@ menuBar_->FindItem(wxID_PREFERENCES)->Enable(enable); if (mmIniOptions::enableRepeatingTransactions_) menuBar_->FindItem(MENU_BILLSDEPOSITS)->Enable(enable); - menuBar_->FindItem(MENU_STOCKS)->Enable(enable); +// menuBar_->FindItem(MENU_STOCKS)->Enable(enable); menuBar_->FindItem(MENU_CURRENCY)->Enable(enable); if (mmIniOptions::enableAssets_) menuBar_->FindItem(MENU_ASSETS)->Enable(enable); @@ -2746,9 +2746,9 @@ menuTools->Append(menuItemBillsDeposits); } - wxMenuItem* menuItemStocks = new wxMenuItem(menuTools, MENU_STOCKS, _("&Stock Investments"), _("Stock Investments")); - menuItemStocks->SetBitmap(wxBitmap(stock_curve_xpm)); - menuTools->Append(menuItemStocks); +// wxMenuItem* menuItemStocks = new wxMenuItem(menuTools, MENU_STOCKS, _("&Stock Investments"), _("Stock Investments")); +// menuItemStocks->SetBitmap(wxBitmap(stock_curve_xpm)); +// menuTools->Append(menuItemStocks); if (mmIniOptions::enableAssets_) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-03-05 06:13:34
|
Revision: 1916 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1916&view=rev Author: guanlisheng Date: 2012-03-05 06:13:28 +0000 (Mon, 05 Mar 2012) Log Message: ----------- format & cleanup Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2012-03-05 05:57:55 UTC (rev 1915) +++ trunk/mmex/src/mmex.cpp 2012-03-05 06:13:28 UTC (rev 1916) @@ -1624,12 +1624,8 @@ if ((acctType == ACCOUNT_TYPE_BANK) || acctType == ACCOUNT_TYPE_TERM) { gotoAccountID_ = data; - if (gotoAccountID_ != -1) - { - createCheckingAccountPage(gotoAccountID_); - } + if (gotoAccountID_ != -1) createCheckingAccountPage(gotoAccountID_); navTreeCtrl_->SetFocus(); - } else { @@ -2095,9 +2091,7 @@ wxDateTime today = wxDateTime::Now(); int year = today.GetYear(); - if (today.GetMonth() < dtBegin.GetMonth() ) { - year -- ; - } + if (today.GetMonth() < dtBegin.GetMonth()) year --; mmPrintableBase* rs = new mmReportIncExpensesOverFinancialPeriod(this, m_core.get(), year); menuPrintingEnable(true); createReportsPage(rs); @@ -2282,17 +2276,9 @@ if (pAccount) { wxString website = pAccount->website_; - if (!website.IsEmpty()) - { - wxLaunchDefaultBrowser(website); - } + if (!website.IsEmpty()) wxLaunchDefaultBrowser(website); return; } - else - { - /* cannot find accountid */ - wxASSERT(true); - } } } //---------------------------------------------------------------------------- @@ -2316,11 +2302,6 @@ } } } - else - { - /* cannot find accountid */ - wxASSERT(true); - } } } //---------------------------------------------------------------------------- @@ -2344,11 +2325,6 @@ } } } - else - { - /* cannot find accountid */ - wxASSERT(true); - } } } //---------------------------------------------------------------------------- @@ -2378,11 +2354,6 @@ } } } - else - { - /* cannot find accountid */ - wxASSERT(true); - } } } //---------------------------------------------------------------------------- @@ -2431,11 +2402,6 @@ PopupMenu(&menu, pt); } } - else - { - /* cannot find accountid */ - wxASSERT(true); - } } } else @@ -2965,9 +2931,7 @@ toolBar_->AddTool(MENU_OPEN, _("Open"), toolBarBitmaps[1], _("Open Database")); toolBar_->AddSeparator(); if (mmIniOptions::instance().enableAddAccount_) - { - toolBar_->AddTool(MENU_NEWACCT, _("New Account"), toolBarBitmaps[3], _("New Account")); - } + toolBar_->AddTool(MENU_NEWACCT, _("New Account"), toolBarBitmaps[3], _("New Account")); toolBar_->AddTool(MENU_ACCTLIST, _("Account List"), toolBarBitmaps[4], _("Show Account List")); toolBar_->AddSeparator(); toolBar_->AddTool(MENU_ORGCATEGS, _("Organize Categories"), toolBarBitmaps[5], _("Show Organize Categories Dialog")); @@ -3027,10 +2991,7 @@ m_db = mmDBWrapper::Open(fileName, password); // if the database pointer has been reset, the password is possibly incorrect - if (!m_db) - { - return ; - } + if (!m_db) return; // we need to check the db whether it is the right version if (!mmDBWrapper::checkDBVersion(m_db.get())) @@ -3203,9 +3164,7 @@ ); if (!fileName.empty()) - { SetDatabaseFile(fileName); - } } //---------------------------------------------------------------------------- @@ -3405,8 +3364,11 @@ << _("This message will not be displayed in future."); wxMessageBox(msgStr, _("Initial Term Account Activation"),wxICON_INFORMATION); } - } else + } + else + { updateNavTreeControl(); + } } if (!refreshRequested_) @@ -3653,13 +3615,12 @@ wxString mySys = wxPlatformInfo::Get().GetOperatingSystemFamilyName(); wxStringTokenizer mySysToken; - if (mySys == wxT("Windows")) { + if (mySys == wxT("Windows")) mySysToken.SetString(winSys,wxT(":")); - } else if (mySys == wxT("Unix")) { + else if (mySys == wxT("Unix")) mySysToken.SetString(unixSys,wxT(":")); - } else if (mySys == wxT("Macintosh")) { + else if (mySys == wxT("Macintosh")) mySysToken.SetString(macSys,wxT(":")); - } page = mySysToken.GetNextToken(); // the system page = mySysToken.GetNextToken().Trim(false).Trim(); // the version @@ -3690,9 +3651,7 @@ wxString urlString = wxT("http://www.codelathe.com/mmex"); versionDetails << wxT("\n\n") << _("Proceed to website: ") << urlString; if (wxMessageBox(versionDetails, _("MMEX System Information Check"), style) == wxOK) - { wxLaunchDefaultBrowser(urlString); - } } //---------------------------------------------------------------------------- @@ -4582,7 +4541,7 @@ wxString acctTypeStr = ACCOUNT_TYPE_BANK; if (acctType == 1) acctTypeStr = ACCOUNT_TYPE_STOCK; - if (acctType == 2) + else if (acctType == 2) acctTypeStr = ACCOUNT_TYPE_TERM; int currencyID = parent_->m_core->currencyList_.getBaseCurrencySettings(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-27 11:49:50
|
Revision: 2422 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2422&view=rev Author: guanlisheng Date: 2012-05-27 11:49:44 +0000 (Sun, 27 May 2012) Log Message: ----------- cleanup Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2012-05-27 11:15:30 UTC (rev 2421) +++ trunk/mmex/src/mmex.cpp 2012-05-27 11:49:44 UTC (rev 2422) @@ -291,14 +291,6 @@ inidb.Close(); -#if defined (__WXMAC__) || defined (__WXOSX__) -#if wxCHECK_VERSION(2,9,0) - wxSystemOptions::SetOption(wxT("mac.listctrl.always_use_generic"), 1); -#else - wxSystemOptions::SetOption(wxMAC_ALWAYS_USE_GENERIC_LISTCTRL, 1); -#endif -#endif - mmGUIFrame *frame = new mmGUIFrame(mmex::getProgramName(), wxPoint(valx, valy), wxSize(valw, valh)); bool ok = frame->Show(); wxASSERT(ok); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-06-04 05:44:16
|
Revision: 2524 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2524&view=rev Author: guanlisheng Date: 2012-06-04 05:44:09 +0000 (Mon, 04 Jun 2012) Log Message: ----------- wxConfig Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2012-06-04 03:54:18 UTC (rev 2523) +++ trunk/mmex/src/mmex.cpp 2012-06-04 05:44:09 UTC (rev 2524) @@ -265,30 +265,16 @@ /* Load MMEX Custom Settings */ mmIniOptions::instance().loadOptions(&inidb); + wxConfigBase *config = wxConfigBase::Get(); /* Was App Maximized? */ - wxString isMaxStrDef = ("FALSE"); - wxString isMaxStr = mmDBWrapper::getINISettingValue(&inidb, ("ISMAXIMIZED"), isMaxStrDef); + bool isMax = config->ReadBool("ISMAXIMIZED", false); /* Load Dimensions of Window */ - wxString originX = ("50"); - wxString originY = ("50"); - wxString sizeW = ("800"); - wxString sizeH = ("600"); - wxString valxStr = mmDBWrapper::getINISettingValue(&inidb, ("ORIGINX"), originX); - wxString valyStr = mmDBWrapper::getINISettingValue(&inidb, ("ORIGINY"), originY); - wxString valWStr = mmDBWrapper::getINISettingValue(&inidb, ("SIZEW"), sizeW); - wxString valHStr = mmDBWrapper::getINISettingValue(&inidb, ("SIZEH"), sizeH); + long valx = config->ReadLong("ORIGINX", 50); + long valy = config->ReadLong("ORIGINY", 50); + long valw = config->ReadLong("SIZEW", 800); + long valh = config->ReadLong("SIZEH", 600); - long valx = 0; - long valy = 0; - long valw = 0; - long valh = 0; - - valxStr.ToLong(&valx); - valyStr.ToLong(&valy); - valWStr.ToLong(&valw); - valHStr.ToLong(&valh); - mmSelectLanguage(0, &inidb, false); inidb.Close(); @@ -297,9 +283,7 @@ bool ok = frame->Show(); wxASSERT(ok); - if (isMaxStr == ("TRUE")) { - frame->Maximize(true); - } + frame->Maximize(isMax); // success: wxApp::OnRun() will be called which will enter the main message // loop and the application will run. If we returned FALSE here, the @@ -913,18 +897,12 @@ this->GetPosition(&valx, &valy); this->GetSize(&valw, &valh); - wxString valxs = wxString::Format(("%d"), valx); - wxString valys = wxString::Format(("%d"), valy); - wxString valws = wxString::Format(("%d"), valw); - wxString valhs = wxString::Format(("%d"), valh); - - m_inidb.get()->Begin(); - mmDBWrapper::setINISettingValue(m_inidb.get(), ("ORIGINX"), valxs); - mmDBWrapper::setINISettingValue(m_inidb.get(), ("ORIGINY"), valys); - mmDBWrapper::setINISettingValue(m_inidb.get(), ("SIZEW"), valws); - mmDBWrapper::setINISettingValue(m_inidb.get(), ("SIZEH"), valhs); - mmDBWrapper::setINISettingValue(m_inidb.get(), ("ISMAXIMIZED"), this->IsMaximized() ? ("TRUE") : ("FALSE")); - m_inidb.get()->Commit(); + wxConfigBase *config = wxConfigBase::Get(); + config->Write("ORIGINX", valx); + config->Write("ORIGINY", valx); + config->Write("SIZEW", valw); + config->Write("SIZEH", valh); + config->Write("ISMAXIMIZED", this->IsMaximized()); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-09 13:36:53
|
Revision: 2554 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2554&view=rev Author: vomikan Date: 2012-06-09 13:36:46 +0000 (Sat, 09 Jun 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2012-06-09 13:24:41 UTC (rev 2553) +++ trunk/mmex/src/mmex.cpp 2012-06-09 13:36:46 UTC (rev 2554) @@ -620,6 +620,7 @@ void mmGUIFrame::cleanup() { + wxConfigBase *config = wxConfigBase::Get(); printer_.reset(); if (recentFiles_) delete recentFiles_; if (!fileName_.IsEmpty()) saveConfigFile(); @@ -634,7 +635,7 @@ /// Update the database according to user requirements if (mmOptions::instance().databaseUpdated_ && - (mmDBWrapper::getINISettingValue(m_inidb.get(), ("BACKUPDB_UPDATE"), ("FALSE")) == ("TRUE"))) + (config->ReadBool("BACKUPDB_UPDATE", false))) { BackupDatabase(fileName_, true); } @@ -2895,6 +2896,7 @@ bool mmGUIFrame::createDataStore(const wxString& fileName, const wxString& pwd, bool openingNew) { + wxConfigBase *config = wxConfigBase::Get(); if (m_core) m_core.reset(); if (m_db) @@ -2904,7 +2906,7 @@ /// Update the database according to user requirements if (mmOptions::instance().databaseUpdated_ && - (mmDBWrapper::getINISettingValue(m_inidb.get(), ("BACKUPDB_UPDATE"), ("FALSE")) == ("TRUE"))) + (config->ReadBool("BACKUPDB_UPDATE", false))) { BackupDatabase(fileName_, true); mmOptions::instance().databaseUpdated_ = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-10-28 10:38:02
|
Revision: 3091 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3091&view=rev Author: vomikan Date: 2012-10-28 10:37:55 +0000 (Sun, 28 Oct 2012) Log Message: ----------- fix for Language chooser if started from scratch Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2012-10-28 09:07:30 UTC (rev 3090) +++ trunk/mmex/src/mmex.cpp 2012-10-28 10:37:55 UTC (rev 3091) @@ -493,6 +493,12 @@ custRepIndex_ = new customSQLReportIndex(); + // decide if we need to show app start dialog + bool from_scratch = m_inisettings->GetBoolSetting(wxT("SHOWBEGINAPP"), true); + + wxFileName dbpath = mmDBWrapper::getLastDbPath(m_inisettings); + if (from_scratch && !dbpath.IsOk()) mmSelectLanguage(this, m_inisettings, true); + /* Create the Controls for the frame */ createMenu(); createToolBar(); @@ -528,11 +534,7 @@ menuItemOnlineUpdateCurRate_->Enable(false); } - // decide if we need to show app start dialog - bool from_scratch = m_inisettings->GetBoolSetting(wxT("SHOWBEGINAPP"), true); - - wxFileName dbpath = from_scratch ? wxGetEmptyString() : mmDBWrapper::getLastDbPath(m_inisettings); - + if (from_scratch) dbpath = wxGetEmptyString(); if (from_scratch || !dbpath.IsOk()) { menuEnableItems(false); createHomePage(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-12-13 11:57:13
|
Revision: 3193 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3193&view=rev Author: vomikan Date: 2012-12-13 11:57:07 +0000 (Thu, 13 Dec 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2012-12-13 11:37:29 UTC (rev 3192) +++ trunk/mmex/src/mmex.cpp 2012-12-13 11:57:07 UTC (rev 3193) @@ -3869,12 +3869,13 @@ void mmGUIFrame::OnCurrency(wxCommandEvent& /*event*/) { mmMainCurrencyDialog(m_core.get(),this, false).ShowModal(); + createHomePage(); } //---------------------------------------------------------------------------- void mmGUIFrame::OnWizardCancel(wxWizardEvent& event) { - event.Veto(); + event.Veto(); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-04-16 21:32:09
|
Revision: 3703 http://sourceforge.net/p/moneymanagerex/code/3703 Author: vomikan Date: 2013-04-16 21:32:04 +0000 (Tue, 16 Apr 2013) Log Message: ----------- wxT() remove Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2013-04-16 21:13:37 UTC (rev 3702) +++ trunk/mmex/src/mmex.cpp 2013-04-16 21:32:04 UTC (rev 3703) @@ -148,7 +148,7 @@ } catch (const std::exception &e) { - wxLogError(wxString::Format(wxT("%s"), e.what())); + wxLogError(wxString::Format("%s", e.what())); } } //---------------------------------------------------------------------------- @@ -182,13 +182,13 @@ mmIniOptions::instance().loadOptions(pIniSettings); /* Was App Maximized? */ - bool isMaxStr = pIniSettings->GetBoolSetting(wxT("ISMAXIMIZED"), false); + bool isMaxStr = pIniSettings->GetBoolSetting("ISMAXIMIZED", false); /* Load Dimensions of Window */ - int valx = pIniSettings->GetIntSetting(wxT("ORIGINX"),50); - int valy = pIniSettings->GetIntSetting(wxT("ORIGINY"),50); - int valw = pIniSettings->GetIntSetting(wxT("SIZEW"),800); - int valh = pIniSettings->GetIntSetting(wxT("SIZEH"),600); + int valx = pIniSettings->GetIntSetting("ORIGINX",50); + int valy = pIniSettings->GetIntSetting("ORIGINY",50); + int valw = pIniSettings->GetIntSetting("SIZEW",800); + int valh = pIniSettings->GetIntSetting("SIZEH",600); mmSelectLanguage(0, pIniSettings, false); @@ -228,7 +228,7 @@ } catch (const std::exception &e) { - wxLogError(wxString::Format(wxT("%s"), e.what())); + wxLogError(wxString::Format("%s", e.what())); } return ok; @@ -262,9 +262,9 @@ */ page1 = new wxWizardPageSimple(this); wxString displayMsg; - displayMsg << _("The next pages will help you create a new database.") << wxT("\n\n") - << _("Your database file is stored with an extension of .mmb.")<< wxT("\n\n") - << _("As this file contains important financial information,\nwe recommended creating daily backups with the Options\nsetting: 'Backup before opening', and store your backups\nin a separate location.")<< wxT("\n\n") + displayMsg << _("The next pages will help you create a new database.") << "\n\n" + << _("Your database file is stored with an extension of .mmb.")<< "\n\n" + << _("As this file contains important financial information,\nwe recommended creating daily backups with the Options\nsetting: 'Backup before opening', and store your backups\nin a separate location.")<< "\n\n" << _("The database can later be encrypted if required, by\nusing the option: 'Save database as' and changing the\nfile type before saving."); new wxStaticText(page1, wxID_ANY,displayMsg); @@ -329,7 +329,7 @@ default, and can be changed when editing account details. ***************************************************************/ helpMsg << _("Specify the base (or default) currency to be used for the\ndatabase. The base currency can later be changed by using\nthe options dialog. New accounts, will use this currency by\ndefault, and can be changed when editing account details.") - << wxT("\n"); + << "\n"; mainSizer->Add( new wxStaticText(this, wxID_ANY, helpMsg), 0, wxALL, 5); @@ -343,7 +343,7 @@ itemBoxSizer5->Add(itemUserName_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); helpMsg.Empty(); - helpMsg << _("(Optional) Specify a title or your name.") << wxT("\n") + helpMsg << _("(Optional) Specify a title or your name.") << "\n" << _("Used as a database title for displayed and printed reports."); mainSizer->Add( new wxStaticText(this, wxID_ANY, helpMsg), 0, wxALL, 5); @@ -361,7 +361,7 @@ return false; } userName = itemUserName_->GetValue().Trim(); - parent_->m_core->dbInfoSettings_->SetStringSetting(wxT("USERNAME"), userName); + parent_->m_core->dbInfoSettings_->SetStringSetting("USERNAME", userName); return true; } @@ -445,7 +445,7 @@ mainSizer->Add( textAccountName_, 0 /* No stretching */, wxALL, 5 /* Border Size */); wxString helpMsg; - helpMsg << wxT("\n") << _("Specify a descriptive name for the account.") << wxT("\n") + helpMsg << "\n" << _("Specify a descriptive name for the account.") << "\n" << _("This is generally the name of a financial institution\nwhere the account is held. For example: 'ABC Bank'."); mainSizer->Add(new wxStaticText(this, wxID_ANY, helpMsg ), 0, wxALL, 5); @@ -472,16 +472,16 @@ mainSizer->Add( itemChoiceType_, 0 /* No stretching*/, wxALL, 5 /* Border Size */); wxString textMsg; - textMsg << wxT("\n") - << _("Select the type of account you want to create:") << wxT("\n\n") + textMsg << "\n" + << _("Select the type of account you want to create:") << "\n\n" << _("General bank accounts cover a wide variety of account\ntypes like Checking, Savings and Credit card type accounts."); mainSizer->Add( new wxStaticText(this, wxID_ANY,textMsg), 0, wxALL, 5); - textMsg = wxT("\n"); + textMsg = "\n"; textMsg << _("Investment accounts are specialized accounts that only\nhave stock/mutual fund investments associated with them."); mainSizer->Add( new wxStaticText(this, wxID_ANY,textMsg), 0, wxALL, 5); - textMsg = wxT("\n"); + textMsg = "\n"; textMsg << _("Term accounts are specialized bank accounts. Intended for asset\ntype accounts such as Term Deposits and Bonds. These accounts\ncan have regular money coming in and out, being outside the\ngeneral income stream."); mainSizer->Add( new wxStaticText(this, wxID_ANY,textMsg), 0, wxALL, 5); @@ -503,7 +503,7 @@ if (currencyID == -1) { wxString errorMsg; - errorMsg << _("Base Account Currency Not set.") << wxT("\n") + errorMsg << _("Base Account Currency Not set.") << "\n" << _("Set that first using Tools->Options menu and then add a new account."); wxMessageBox( errorMsg, _("New Account"), wxOK|wxICON_WARNING, this); return false; @@ -655,14 +655,14 @@ /* Setup Printer */ printer_.reset(new wxHtmlEasyPrinting(mmex::getProgramName(), this)); wxString printHeaderBase = mmex::getProgramName(); - printer_-> SetHeader( printHeaderBase + wxT("(@PAGENUM@/@PAGESCNT@)<hr>"), wxPAGE_ALL); + printer_-> SetHeader( printHeaderBase + "(@PAGENUM@/@PAGESCNT@<hr>", wxPAGE_ALL); restorePrinterValues(); custRepIndex_ = new CustomReportIndex(); // decide if we need to show app start dialog - bool from_scratch = m_inisettings->GetBoolSetting(wxT("SHOWBEGINAPP"), true); + bool from_scratch = m_inisettings->GetBoolSetting("SHOWBEGINAPP", true); wxFileName dbpath = mmDBWrapper::getLastDbPath(m_inisettings); if (from_scratch && !dbpath.IsOk()) mmSelectLanguage(this, m_inisettings, true); @@ -674,14 +674,14 @@ recentFiles_ = new RecentDatabaseFiles(m_inisettings, menuRecentFiles_); // Load perspective - wxString auiPerspective = m_inisettings->GetStringSetting(wxT("AUIPERSPECTIVE"), m_perspective); + wxString auiPerspective = m_inisettings->GetStringSetting("AUIPERSPECTIVE", m_perspective); m_mgr.LoadPerspective(auiPerspective); // add the toolbars to the manager m_mgr.AddPane(toolBar_, wxAuiPaneInfo(). - Name(wxT("toolbar")).Caption(_("Toolbar")).ToolbarPane().Top() + Name("toolbar").Caption(_("Toolbar")).ToolbarPane().Top() .LeftDockable(false).RightDockable(false).MinSize(1000,-1) - .Show(m_inisettings->GetBoolSetting(wxT("SHOWTOOLBAR"), true))); + .Show(m_inisettings->GetBoolSetting("SHOWTOOLBAR", true))); // change look and feel of wxAuiManager m_mgr.GetArtProvider()->SetMetric(16, 0); @@ -689,7 +689,7 @@ // Save default perspective m_perspective = m_mgr.SavePerspective(); - m_inisettings->SetStringSetting(wxT("AUIPERSPECTIVE"), m_perspective); + m_inisettings->SetStringSetting("AUIPERSPECTIVE", m_perspective); // "commit" all changes made to wxAuiManager m_mgr.Update(); @@ -746,7 +746,7 @@ if (m_db) m_db->Close(); /// Update the database according to user requirements - if (mmOptions::instance().databaseUpdated_ && m_inisettings->GetBoolSetting(wxT("BACKUPDB_UPDATE"), false)) + if (mmOptions::instance().databaseUpdated_ && m_inisettings->GetBoolSetting("BACKUPDB_UPDATE", false)) { BackupDatabase(fileName_, true); } @@ -846,27 +846,27 @@ while (q1.NextRow()) { mmBDTransactionHolder th; - th.id_ = q1.GetInt(wxT("BDID")); - th.nextOccurDate_ = mmGetStorageStringAsDate(q1.GetString(wxT("NEXTOCCURRENCEDATE"))); + th.id_ = q1.GetInt("BDID"); + th.nextOccurDate_ = mmGetStorageStringAsDate(q1.GetString("NEXTOCCURRENCEDATE")); th.nextOccurStr_ = mmGetDateForDisplay(th.nextOccurDate_); - th.payeeID_ = q1.GetInt(wxT("PAYEEID")); - th.transType_ = q1.GetString(wxT("TRANSCODE")); - th.accountID_ = q1.GetInt(wxT("ACCOUNTID")); - th.toAccountID_ = q1.GetInt(wxT("TOACCOUNTID")); + th.payeeID_ = q1.GetInt("PAYEEID"); + th.transType_ = q1.GetString("TRANSCODE"); + th.accountID_ = q1.GetInt("ACCOUNTID"); + th.toAccountID_ = q1.GetInt("TOACCOUNTID"); th.accountName_ = m_core.get()->accountList_.GetAccountName(th.accountID_); - th.amt_ = q1.GetDouble(wxT("TRANSAMOUNT")); - th.toAmt_ = q1.GetDouble(wxT("TOTRANSAMOUNT")); - th.notes_ = q1.GetString(wxT("NOTES")); - th.categID_ = q1.GetInt(wxT("CATEGID")); + th.amt_ = q1.GetDouble("TRANSAMOUNT"); + th.toAmt_ = q1.GetDouble("TOTRANSAMOUNT"); + th.notes_ = q1.GetString("NOTES"); + th.categID_ = q1.GetInt("CATEGID"); th.categoryStr_ = m_core.get()->categoryList_.GetCategoryName(th.categID_); - th.subcategID_ = q1.GetInt(wxT("SUBCATEGID")); + th.subcategID_ = q1.GetInt("SUBCATEGID"); th.subcategoryStr_ = m_core.get()->categoryList_.GetSubCategoryName(th.categID_, th.subcategID_); // DeMultiplex the Auto Executable fields from the db entry: REPEATS - int repeats = q1.GetInt(wxT("REPEATS")); - int numRepeats = q1.GetInt(wxT("NUMOCCURRENCES")); + int repeats = q1.GetInt("REPEATS"); + int numRepeats = q1.GetInt("NUMOCCURRENCES"); autoExecuteManual = false; autoExecuteSilent = false; @@ -947,8 +947,8 @@ pTransaction->payee_ = m_core.get()->payeeList_.GetPayeeSharedPtr(th.payeeID_); pTransaction->transType_ = th.transType_; pTransaction->amt_ = th.amt_; - pTransaction->status_ = q1.GetString(wxT("STATUS")); - pTransaction->transNum_ = q1.GetString(wxT("TRANSACTIONNUMBER")); + pTransaction->status_ = q1.GetString("STATUS"); + pTransaction->transNum_ = q1.GetString("TRANSACTIONNUMBER"); pTransaction->notes_ = th.notes_; pTransaction->category_ = m_core.get()->categoryList_.GetCategorySharedPtr(th.categID_, th.subcategID_); pTransaction->date_ = th.nextOccurDate_; @@ -987,25 +987,25 @@ if (! fileName_.IsEmpty()) { wxFileName fname(fileName_); - m_inisettings->SetStringSetting(wxT("LASTFILENAME"), fname.GetFullPath()); + m_inisettings->SetStringSetting("LASTFILENAME", fname.GetFullPath()); } /* Aui Settings */ - m_inisettings->SetStringSetting(wxT("AUIPERSPECTIVE"), m_mgr.SavePerspective()); + m_inisettings->SetStringSetting("AUIPERSPECTIVE", m_mgr.SavePerspective()); // prevent values being saved while window is in an iconised state. if (this->IsIconized()) this->Restore(); int value_x = 0, value_y = 0; this->GetPosition(&value_x, &value_y); - m_inisettings->SetIntSetting(wxT("ORIGINX"), value_x); - m_inisettings->SetIntSetting(wxT("ORIGINY"), value_y); + m_inisettings->SetIntSetting("ORIGINX", value_x); + m_inisettings->SetIntSetting("ORIGINY", value_y); int value_w = 0, value_h = 0; this->GetSize(&value_w, &value_h); - m_inisettings->SetIntSetting(wxT("SIZEW"), value_w); - m_inisettings->SetIntSetting(wxT("SIZEH"), value_h); - m_inisettings->SetIntSetting(wxT("ISMAXIMIZED"), this->IsMaximized()); + m_inisettings->SetIntSetting("SIZEW", value_w); + m_inisettings->SetIntSetting("SIZEH", value_h); + m_inisettings->SetIntSetting("ISMAXIMIZED", this->IsMaximized()); } //---------------------------------------------------------------------------- @@ -1073,12 +1073,12 @@ wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxTR_SINGLE | wxNO_BORDER); m_mgr.AddPane(navTreeCtrl_, wxAuiPaneInfo(). - Name(wxT("Navigation")).Caption(_("Navigation")). + Name("Navigation").Caption(_("Navigation")). BestSize(wxSize(200,100)).MinSize(wxSize(100,100)). Left()); m_mgr.AddPane(homePanel_, wxAuiPaneInfo(). - Name(wxT("Home")).Caption(wxT("Home")). + Name("Home").Caption("Home"). CenterPane().PaneBorder(false)); } //---------------------------------------------------------------------------- @@ -1097,13 +1097,13 @@ //navTreeCtrl_->SetBackgroundColour(mmColors::navTreeBkColor); wxTreeItemId root = navTreeCtrl_->AddRoot(_("Home Page"), 0, 0); - navTreeCtrl_->SetItemData(root, new mmTreeItemData(wxT("Home Page"))); + navTreeCtrl_->SetItemData(root, new mmTreeItemData("Home Page")); navTreeCtrl_->SetItemBold(root, true); navTreeCtrl_->SetFocus(); wxTreeItemId accounts = navTreeCtrl_->AppendItem(root, _("Bank Accounts"), 9, 9); - navTreeCtrl_->SetItemData(accounts, new mmTreeItemData(wxT("Bank Accounts"))); + navTreeCtrl_->SetItemData(accounts, new mmTreeItemData("Bank Accounts")); navTreeCtrl_->SetItemBold(accounts, true); wxTreeItemId termAccount; @@ -1111,26 +1111,26 @@ { // Positioning for new type of accounts: Term Accounts termAccount = navTreeCtrl_->AppendItem(root, _("Term Accounts"), 12, 12); - navTreeCtrl_->SetItemData(termAccount, new mmTreeItemData(wxT("Term Accounts"))); + navTreeCtrl_->SetItemData(termAccount, new mmTreeItemData("Term Accounts")); navTreeCtrl_->SetItemBold(termAccount, true); } wxTreeItemId stocks; stocks = navTreeCtrl_->AppendItem(root, _("Stocks"), 15, 15); - navTreeCtrl_->SetItemData(stocks, new mmTreeItemData(wxT("Stocks"))); + navTreeCtrl_->SetItemData(stocks, new mmTreeItemData("Stocks")); navTreeCtrl_->SetItemBold(stocks, true); if (mmIniOptions::instance().enableAssets_) { wxTreeItemId assets = navTreeCtrl_->AppendItem(root, _("Assets"), 7, 7); - navTreeCtrl_->SetItemData(assets, new mmTreeItemData(wxT("Assets"))); + navTreeCtrl_->SetItemData(assets, new mmTreeItemData("Assets")); navTreeCtrl_->SetItemBold(assets, true); } if (mmIniOptions::instance().enableRepeatingTransactions_) { wxTreeItemId bills = navTreeCtrl_->AppendItem(root, _("Repeating Transactions"), 2, 2); - navTreeCtrl_->SetItemData(bills, new mmTreeItemData(wxT("Bills & Deposits"))); + navTreeCtrl_->SetItemData(bills, new mmTreeItemData("Bills & Deposits")); navTreeCtrl_->SetItemBold(bills, true); } @@ -1138,7 +1138,7 @@ if (mmIniOptions::instance().enableBudget_) { budgeting = navTreeCtrl_->AppendItem(root, _("Budget Setup"), 3, 3); - navTreeCtrl_->SetItemData(budgeting, new mmTreeItemData(wxT("Budgeting"))); + navTreeCtrl_->SetItemData(budgeting, new mmTreeItemData("Budgeting")); navTreeCtrl_->SetItemBold(budgeting, true); } @@ -1171,7 +1171,7 @@ customSqlReportItem = navTreeCtrl_->AppendItem(customSqlReports,reportTitle, 8, 8); customSqlReportRootItem = customSqlReportItem; } - reportNumberStr.Printf(wxT("Custom_Report_%d"), ++reportNumber); + reportNumberStr.Printf("Custom_Report_%d", ++reportNumber); navTreeCtrl_->SetItemData(customSqlReportItem, new mmTreeItemData(reportNumberStr)); reportTitle = custRepIndex_->NextReportTitle(); } @@ -1183,19 +1183,19 @@ /* ================================================================================================= */ wxTreeItemId reportsSummary = navTreeCtrl_->AppendItem(reports, _("Summary of Accounts"), 4, 4); - navTreeCtrl_->SetItemData(reportsSummary, new mmTreeItemData(wxT("Summary of Accounts"), new mmReportSummary(m_core.get(), this))); + navTreeCtrl_->SetItemData(reportsSummary, new mmTreeItemData("Summary of Accounts", new mmReportSummary(m_core.get(), this))); wxTreeItemId reportsStocks = navTreeCtrl_->AppendItem(reportsSummary, _("Stocks"), 4, 4); - navTreeCtrl_->SetItemData(reportsStocks, new mmTreeItemData(wxT("Summary of Stocks"), new mmReportSummaryStocks(m_core.get()))); + navTreeCtrl_->SetItemData(reportsStocks, new mmTreeItemData("Summary of Stocks", new mmReportSummaryStocks(m_core.get()))); if (mmIniOptions::instance().enableAssets_) { wxTreeItemId reportsAssets = navTreeCtrl_->AppendItem(reportsSummary, _("Assets"), 4, 4); - navTreeCtrl_->SetItemData(reportsAssets, new mmTreeItemData(wxT("Summary of Assets"), new mmReportSummaryAssets(m_core.get()))); + navTreeCtrl_->SetItemData(reportsAssets, new mmTreeItemData("Summary of Assets", new mmReportSummaryAssets(m_core.get()))); } wxTreeItemId categsOverTime = navTreeCtrl_->AppendItem(reports, _("Where the Money Goes"), 4, 4); - navTreeCtrl_->SetItemData(categsOverTime, new mmTreeItemData(wxT("Where the Money Goes"), new mmReportCategoryExpensesGoes(m_core.get()))); + navTreeCtrl_->SetItemData(categsOverTime, new mmTreeItemData("Where the Money Goes", new mmReportCategoryExpensesGoes(m_core.get()))); wxTreeItemId categsOverTimeCalMonth = navTreeCtrl_->AppendItem(categsOverTime, _("Last Calendar Month"), 4, 4); navTreeCtrl_->SetItemData(categsOverTimeCalMonth, new mmTreeItemData(wxTRANSLATE("Where the Money Goes - Last Calendar Month"), new mmReportCategoryExpensesGoesLastMonth(m_core.get()))); @@ -1228,7 +1228,7 @@ /////////////////////////////////////////////////////////// wxTreeItemId posCategs = navTreeCtrl_->AppendItem(reports, _("Where the Money Comes From"), 4, 4); - navTreeCtrl_->SetItemData(posCategs, new mmTreeItemData(wxT("Where the Money Comes From"), new mmReportCategoryExpensesComesCurrentMonth(m_core.get()))); + navTreeCtrl_->SetItemData(posCategs, new mmTreeItemData("Where the Money Comes From", new mmReportCategoryExpensesComesCurrentMonth(m_core.get()))); wxTreeItemId posCategsCalMonth = navTreeCtrl_->AppendItem(posCategs, _("Last Calendar Month"), 4, 4); navTreeCtrl_->SetItemData(posCategsCalMonth, new mmTreeItemData(wxTRANSLATE("Where the Money Comes From - Last Calendar Month"), new mmReportCategoryExpensesComesLastMonth(m_core.get()))); @@ -1258,7 +1258,7 @@ /////////////////////////////////////////////////////////// wxTreeItemId categs = navTreeCtrl_->AppendItem(reports, _("Categories"), 4, 4); - navTreeCtrl_->SetItemData(categs, new mmTreeItemData(wxT("Categories - Over Time"))); + navTreeCtrl_->SetItemData(categs, new mmTreeItemData("Categories - Over Time")); wxTreeItemId categsCalMonth = navTreeCtrl_->AppendItem(categs, _("Last Calendar Month"), 4, 4); navTreeCtrl_->SetItemData(categsCalMonth, new mmTreeItemData(wxTRANSLATE("Categories - Last Calendar Month"), new mmReportCategoryOverTimePerformance(m_core.get()))); @@ -1288,7 +1288,7 @@ /////////////////////////////////////////////////////////// wxTreeItemId payeesOverTime = navTreeCtrl_->AppendItem(reports, _("Payees"), 4, 4); - navTreeCtrl_->SetItemData(payeesOverTime, new mmTreeItemData(wxT("Payee Report"))); + navTreeCtrl_->SetItemData(payeesOverTime, new mmTreeItemData("Payee Report")); wxTreeItemId payeesOverTimeCalMonth = navTreeCtrl_->AppendItem(payeesOverTime, _("Last Calendar Month"), 4, 4); navTreeCtrl_->SetItemData(payeesOverTimeCalMonth, new mmTreeItemData(wxTRANSLATE("Payees - Last Calendar Month"), new mmReportPayeeExpensesLastMonth(m_core.get()))); @@ -1318,7 +1318,7 @@ /////////////////////////////////////////////////////////////////// wxTreeItemId incexpOverTime = navTreeCtrl_->AppendItem(reports, _("Income vs Expenses"), 4, 4); - navTreeCtrl_->SetItemData(incexpOverTime, new mmTreeItemData(wxT("Income vs Expenses"))); + navTreeCtrl_->SetItemData(incexpOverTime, new mmTreeItemData("Income vs Expenses")); wxTreeItemId incexpOverTimeCalMonth = navTreeCtrl_->AppendItem(incexpOverTime, _("Last Calendar Month"), 4, 4); navTreeCtrl_->SetItemData(incexpOverTimeCalMonth, new mmTreeItemData(wxTRANSLATE("Income vs Expenses - Last Calendar Month"))); @@ -1349,7 +1349,7 @@ ////////////////////////////////////////////////////////////////// wxTreeItemId transactionList = navTreeCtrl_->AppendItem(reports, _("Transaction Report"), 4, 4); - navTreeCtrl_->SetItemData(transactionList, new mmTreeItemData(wxT("Transaction Report"))); + navTreeCtrl_->SetItemData(transactionList, new mmTreeItemData("Transaction Report")); /////////////////////////////////////////////////////////////////// @@ -1365,14 +1365,14 @@ { if (!i) { // first loop only budgetPerformance = navTreeCtrl_->AppendItem(reports, _("Budget Performance"), 4, 4); - navTreeCtrl_->SetItemData(budgetPerformance, new mmTreeItemData(wxT("Budget Performance"))); + navTreeCtrl_->SetItemData(budgetPerformance, new mmTreeItemData("Budget Performance")); budgetSetupPerformance = navTreeCtrl_->AppendItem(reports, _("Budget Category Summary"), 4, 4); - navTreeCtrl_->SetItemData(budgetSetupPerformance, new mmTreeItemData(wxT("Budget Setup Performance"))); + navTreeCtrl_->SetItemData(budgetSetupPerformance, new mmTreeItemData("Budget Setup Performance")); } - int id = q1.GetInt(wxT("BUDGETYEARID")); - const wxString name = q1.GetString(wxT("BUDGETYEARNAME")); + int id = q1.GetInt("BUDGETYEARID"); + const wxString name = q1.GetString("BUDGETYEARNAME"); wxTreeItemId bYear = navTreeCtrl_->AppendItem(budgeting, name, 3, 3); navTreeCtrl_->SetItemData(bYear, new mmTreeItemData(id, true)); @@ -1396,27 +1396,27 @@ /////////////////////////////////////////////////////////////////// wxTreeItemId cashFlow = navTreeCtrl_->AppendItem(reports, _("Cash Flow"), 4, 4); - navTreeCtrl_->SetItemData(cashFlow, new mmTreeItemData(wxT("Cash Flow"))); + navTreeCtrl_->SetItemData(cashFlow, new mmTreeItemData("Cash Flow")); wxTreeItemId cashflowWithBankAccounts = navTreeCtrl_->AppendItem(cashFlow, _("Cash Flow - With Bank Accounts"), 4, 4); - navTreeCtrl_->SetItemData(cashflowWithBankAccounts, new mmTreeItemData(wxT("Cash Flow - With Bank Accounts"))); + navTreeCtrl_->SetItemData(cashflowWithBankAccounts, new mmTreeItemData("Cash Flow - With Bank Accounts")); if ( hasActiveTermAccounts() ) { wxTreeItemId cashflowWithTermAccounts = navTreeCtrl_->AppendItem(cashFlow, _("Cash Flow - With Term Accounts"), 4, 4); - navTreeCtrl_->SetItemData(cashflowWithTermAccounts, new mmTreeItemData(wxT("Cash Flow - With Term Accounts"))); + navTreeCtrl_->SetItemData(cashflowWithTermAccounts, new mmTreeItemData("Cash Flow - With Term Accounts")); } wxTreeItemId cashflowSpecificAccounts = navTreeCtrl_->AppendItem(cashFlow, _("Cash Flow - Specific Accounts"), 4, 4); - navTreeCtrl_->SetItemData(cashflowSpecificAccounts, new mmTreeItemData(wxT("Cash Flow - Specific Accounts"))); + navTreeCtrl_->SetItemData(cashflowSpecificAccounts, new mmTreeItemData("Cash Flow - Specific Accounts")); wxTreeItemId cashflowSpecificAccountsDaily = navTreeCtrl_->AppendItem(cashFlow, _("Daily Cash Flow - Specific Accounts"), 4, 4); - navTreeCtrl_->SetItemData(cashflowSpecificAccountsDaily, new mmTreeItemData(wxT("Daily Cash Flow - Specific Accounts"))); + navTreeCtrl_->SetItemData(cashflowSpecificAccountsDaily, new mmTreeItemData("Daily Cash Flow - Specific Accounts")); /////////////////////////////////////////////////////// wxTreeItemId transactionStats = navTreeCtrl_->AppendItem(reports, _("Transaction Statistics"), 4, 4); - navTreeCtrl_->SetItemData(transactionStats, new mmTreeItemData(wxT("Transaction Statistics"))); + navTreeCtrl_->SetItemData(transactionStats, new mmTreeItemData("Transaction Statistics")); /////////////////////////////////////////////////////////////////// @@ -1434,7 +1434,7 @@ /* Load Nav Tree Control */ - wxString vAccts = m_inisettings->GetStringSetting(wxT("VIEWACCOUNTS"), wxT("ALL")); + wxString vAccts = m_inisettings->GetStringSetting("VIEWACCOUNTS", "ALL"); std::pair<mmAccountList::const_iterator, mmAccountList::const_iterator> range = m_core->accountList_.range(); for (mmAccountList::const_iterator it = range.first; it != range.second; ++ it) @@ -1444,9 +1444,9 @@ if (account->acctType_ == ACCOUNT_TYPE_BANK) { const mmAccount* pCA = account; - if ((vAccts == wxT("Open") && pCA->status_ == mmAccount::MMEX_Open) || - (vAccts == wxT("Favorites") && pCA->favoriteAcct_) || - (vAccts == wxT("ALL"))) + if ((vAccts == "Open" && pCA->status_ == mmAccount::MMEX_Open) || + (vAccts == "Favorites" && pCA->favoriteAcct_) || + (vAccts == "ALL")) { int selectedImage = mmIniOptions::instance().account_image_id(m_core.get(), pCA->id_); wxTreeItemId tacct = navTreeCtrl_->AppendItem(accounts, pCA->name_, selectedImage, selectedImage); @@ -1457,9 +1457,9 @@ else if (account->acctType_ == ACCOUNT_TYPE_TERM) { const mmAccount* pTA = account; - if ((vAccts == wxT("Open") && pTA->status_ == mmAccount::MMEX_Open) || - (vAccts == wxT("Favorites") && pTA->favoriteAcct_) || - (vAccts == wxT("ALL"))) + if ((vAccts == "Open" && pTA->status_ == mmAccount::MMEX_Open) || + (vAccts == "Favorites" && pTA->favoriteAcct_) || + (vAccts == "ALL")) { int selectedImage = mmIniOptions::instance().account_image_id(m_core.get(), pTA->id_); wxTreeItemId tacct = navTreeCtrl_->AppendItem(termAccount, pTA->name_, selectedImage, selectedImage); @@ -1470,9 +1470,9 @@ else //if (account->acctType_ == ACCOUNT_TYPE_STOCK) { const mmAccount* pIA = account; - if ((vAccts == wxT("Open") && pIA->status_ == mmAccount::MMEX_Open) || - (vAccts == wxT("Favorites") && pIA->favoriteAcct_) || - (vAccts == wxT("ALL"))) + if ((vAccts == "Open" && pIA->status_ == mmAccount::MMEX_Open) || + (vAccts == "Favorites" && pIA->favoriteAcct_) || + (vAccts == "ALL")) { int selectedImage = mmIniOptions::instance().account_image_id(m_core.get(), pIA->id_); wxTreeItemId tacct = navTreeCtrl_->AppendItem(stocks, pIA->name_, selectedImage, selectedImage); @@ -1502,7 +1502,7 @@ homePageAccountSelect_ = true; // prevent Navigation tree code execution. wxBeginBusyCursor(wxHOURGLASS_CURSOR); - if (custRepIndex_->ReportFileName(index) != wxT("")) + if (custRepIndex_->ReportFileName(index) != "") { wxString sScript; if (custRepIndex_->GetReportFileData(sScript) ) @@ -1528,7 +1528,7 @@ wxString sItemName = iData->getString(); if (wxNOT_FOUND != sItemName.Index(wxT("Custom_Report_"))) { - sItemName.Replace(wxT("Custom_Report_"), wxT("")); + sItemName.Replace("Custom_Report_", ""); long index; result = sItemName.ToLong(&index); if (result) customSqlReportID = index; @@ -1591,13 +1591,13 @@ wxTreeItemId idparent = navTreeCtrl_->GetItemParent(id); mmTreeItemData* iParentData = dynamic_cast<mmTreeItemData*>(navTreeCtrl_->GetItemData(idparent)); - if (iParentData->getString() == wxT("Budget Performance")) + if (iParentData->getString() == "Budget Performance") { int year = data; mmPrintableBase* rs = new mmReportBudgetingPerformance(m_core.get(), this, year); createReportsPage(rs); } - else if (iParentData->getString() == wxT("Budget Setup Performance")) + else if (iParentData->getString() == "Budget Setup Performance") { mmPrintableBase* rs = new mmReportBudgetCategorySummary(m_core.get(), this, year); createReportsPage(rs); @@ -1639,7 +1639,7 @@ } else { - if (iData->getString() == wxT("Home Page")) + if (iData->getString() == "Home Page") { createHomePage(); return; @@ -1690,71 +1690,71 @@ createReportsPage(iData->get_report()); } #if 0 - else if (sData == wxT("Summary of Accounts")) + else if (sData == "Summary of Accounts") { createReportsPage(iData->get_report()); } - else if (sData == wxT("Summary of Stocks")) + else if (sData == "Summary of Stocks") { createReportsPage(iData->get_report()); } - else if (sData == wxT("Summary of Assets")) + else if (sData == "Summary of Assets") { createReportsPage(iData->get_report()); } - else if (sData == wxT("Where the Money Goes")) + else if (sData == "Where the Money Goes") { createReportsPage(iData->get_report()); } - else if (sData.StartsWith(wxT("Where the Money Goes -"))) + else if (sData.StartsWith("Where the Money Goes -")) { createReportsPage(iData->get_report()); } - else if (sData == wxT("Where the Money Comes From")) + else if (sData == "Where the Money Comes From") { createReportsPage(iData->get_report()); } - else if (sData.StartsWith(wxT("Where the Money Comes From - "))) + else if (sData.StartsWith("Where the Money Comes From - ")) { createReportsPage(iData->get_report()); } - else if (sData == wxT("Categories - Over Time")) + else if (sData == "Categories - Over Time") { createReportsPage(iData->get_report()); } - else if (sData.StartsWith(wxT("Categories - "))) + else if (sData.StartsWith("Categories - ")) { createReportsPage(iData->get_report()); } - else if (sData == wxT("Payee Report")) + else if (sData == "Payee Report") { createReportsPage(iData->get_report()); } - else if (sData.StartsWith(wxT("Payees - "))) + else if (sData.StartsWith("Payees - ")) { createReportsPage(iData->get_report()); } - else if (sData == wxT("Income vs Expenses - All Time")) + else if (sData == "Income vs Expenses - All Time") { mmPrintableBase* rs = new mmReportIncomeExpensesAllTime(m_core.get()); createReportsPage(rs); } - else if (sData == wxT("Income vs Expenses")) + else if (sData == "Income vs Expenses") { mmPrintableBase* rs = new mmReportIncExpensesOverTime(m_core.get() , wxDateTime::Now().GetYear(), 10); createReportsPage(rs); } - else if (sData.StartsWith(wxT("Income vs Expenses - ")) && sData.Contains(wxT("Year"))) + else if (sData.StartsWith("Income vs Expenses - ") && sData.Contains("Year")) { mmPrintableBase* rs; GetDateRange(dtBegin, dtEnd, sData); int year = wxDateTime::Now().GetYear(); - if (sData.Contains(wxT("Last"))) year --; + if (sData.Contains("Last")) year --; - if (sData.Contains(wxT("Financial"))) + if (sData.Contains("Financial")) { if (wxDateTime::Now().GetMonth() < dtBegin.GetMonth()) year -- ; rs = new mmReportIncExpensesOverFinancialPeriod(m_core.get(), year); @@ -1765,12 +1765,12 @@ } createReportsPage(rs); } - else if (sData.StartsWith(wxT("Income vs Expenses - "))) + else if (sData.StartsWith("Income vs Expenses - ")) { mmPrintableBase* rs = new mmReportIncomeExpensesCurrentMonth(m_core.get()); createReportsPage(rs); } - else if (sData == wxT("Cash Flow")) + else if (sData == "Cash Flow") { mmReportCashFlow* report = new mmReportCashFlow(m_core.get(), this, 0); @@ -1779,43 +1779,43 @@ createReportsPage(report); } - else if (sData == wxT("Cash Flow - With Bank Accounts")) + else if (sData == "Cash Flow - With Bank Accounts") { mmReportCashFlow* report = new mmReportCashFlow(m_core.get(), this, 0); report->activateBankAccounts(); createReportsPage(report); } - else if (sData == wxT("Cash Flow - With Term Accounts")) + else if (sData == "Cash Flow - With Term Accounts") { mmReportCashFlow* report = new mmReportCashFlow(m_core.get(), this, 0); report->activateTermAccounts(); createReportsPage(report); } - else if (sData == wxT("Cash Flow - Specific Accounts")) + else if (sData == "Cash Flow - Specific Accounts") { OnCashFlowSpecificAccounts(0); } - else if (sData == wxT("Daily Cash Flow - Specific Accounts")) + else if (sData == "Daily Cash Flow - Specific Accounts") { OnCashFlowSpecificAccounts(1); } - else if (sData == wxT("Transaction Report")) + else if (sData == "Transaction Report") { wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_TRANSACTIONREPORT); AddPendingEvent(evt); // Events will be processed in due course. } - else if (sData == wxT("Bills & Deposits")) + else if (sData == "Bills & Deposits") { wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_BILLSDEPOSITS); AddPendingEvent(evt); } - else if (sData == wxT("Assets")) + else if (sData == "Assets") { wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_ASSETS); AddPendingEvent(evt); } - else if (sData == wxT("Transaction Statistics")) + else if (sData == "Transaction Statistics") { wxDateTime today = wxDateTime::Now(); int year = today.GetYear()-1; @@ -1940,9 +1940,9 @@ } else { - if (iData->getString() == wxT("Bank Accounts") || - iData->getString() == wxT("Term Accounts") || - iData->getString() == wxT("Stocks")) + if (iData->getString() == "Bank Accounts" || + iData->getString() == "Term Accounts" || + iData->getString() == "Stocks") { // Create for Bank Term & Stock Accounts //wxMenu menu; @@ -1971,7 +1971,7 @@ // menu->AppendSeparator(); // Create only for Bank Accounts - if ( (iData->getString() != wxT("Term Accounts")) && (iData->getString() != wxT("Stocks")) ) + if ( (iData->getString() != "Term Accounts") && (iData->getString() != "Stocks") ) { wxMenu *exportTo = new wxMenu; exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2CSV, _("&CSV Files...")); @@ -1996,13 +1996,13 @@ // Bring up popup menu to edit or delete the correct Custom Report customSqlReportSelectedItem_ = iData->getString(); wxString field = customSqlReportSelectedItem_.Mid(6,8); - if (field == wxT("_Report_")) + if (field == "_Report_") { wxMenu* customReportMenu = new wxMenu; customReportMenu->Append(wxID_EDIT, _("Edit Custom Report")); PopupMenu(&*customReportMenu, pt); } - else if (iData->getString() == wxT("Budgeting")) + else if (iData->getString() == "Budgeting") { wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_BUDGETSETUPDIALOG); AddPendingEvent(evt); @@ -2015,47 +2015,47 @@ void mmGUIFrame::OnViewAllAccounts(wxCommandEvent&) { //Get current settings for view accounts - wxString vAccts = m_inisettings->GetStringSetting(wxT("VIEWACCOUNTS"), wxT("ALL")); + wxString vAccts = m_inisettings->GetStringSetting("VIEWACCOUNTS", "ALL"); //Set view ALL - m_inisettings->SetStringSetting(wxT("VIEWACCOUNTS"), wxT("ALL")); + m_inisettings->SetStringSetting("VIEWACCOUNTS", "ALL"); //Refresh Navigation Panel mmGUIFrame::updateNavTreeControl(); //Restore settings - m_inisettings->SetStringSetting(wxT("VIEWACCOUNTS"), vAccts); + m_inisettings->SetStringSetting("VIEWACCOUNTS", vAccts); } //---------------------------------------------------------------------------- void mmGUIFrame::OnViewFavoriteAccounts(wxCommandEvent&) { //Get current settings for view accounts - wxString vAccts = m_inisettings->GetStringSetting(wxT("VIEWACCOUNTS"), wxT("ALL")); + wxString vAccts = m_inisettings->GetStringSetting("VIEWACCOUNTS", "ALL"); //Set view ALL - m_inisettings->SetStringSetting(wxT("VIEWACCOUNTS"), wxT("Favorites")); + m_inisettings->SetStringSetting("VIEWACCOUNTS", "Favorites"); //Refresh Navigation Panel mmGUIFrame::updateNavTreeControl(); //Restore settings - m_inisettings->SetStringSetting(wxT("VIEWACCOUNTS"), vAccts); + m_inisettings->SetStringSetting("VIEWACCOUNTS", vAccts); } //---------------------------------------------------------------------------- void mmGUIFrame::OnViewOpenAccounts(wxCommandEvent&) { //Get current settings for view accounts - wxString vAccts = m_inisettings->GetStringSetting(wxT("VIEWACCOUNTS"), wxT("ALL")); + wxString vAccts = m_inisettings->GetStringSetting("VIEWACCOUNTS", "ALL"); //Set view ALL - m_inisettings->SetStringSetting(wxT("VIEWACCOUNTS"), wxT("Open")); + m_inisettings->SetStringSetting("VIEWACCOUNTS", "Open"); //Refresh Navigation Panel mmGUIFrame::updateNavTreeControl(); //Restore settings - m_inisettings->SetStringSetting(wxT("VIEWACCOUNTS"), vAccts); + m_inisettings->SetStringSetting("VIEWACCOUNTS", vAccts); } //---------------------------------------------------------------------------- @@ -2511,7 +2511,7 @@ /// Update the database according to user requirements if (mmOptions::instance().databaseUpdated_ && - m_inisettings->GetBoolSetting(wxT("BACKUPDB_UPDATE"), false)) + m_inisettings->GetBoolSetting("BACKUPDB_UPDATE", false)) { BackupDatabase(fileName_, true); mmOptions::instance().databaseUpdated_ = false; @@ -2521,7 +2521,7 @@ wxFileName checkExt(fileName); wxString password; bool passwordCheckPassed = true; - if (checkExt.GetExt().Lower() == wxT("emb") && wxFileName::FileExists(fileName)) + if (checkExt.GetExt().Lower() == "emb" && wxFileName::FileExists(fileName)) { password = !pwd.empty() ? pwd : wxGetPasswordFromUser(_("Enter database's password")); if (password.IsEmpty()) @@ -2537,7 +2537,7 @@ && passwordCheckPassed) { /* Do a backup before opening */ - if (m_inisettings->GetBoolSetting(wxT("BACKUPDB"), false)) + if (m_inisettings->GetBoolSetting("BACKUPDB", false)) { BackupDatabase(fileName); } @@ -2618,9 +2618,9 @@ void mmGUIFrame::openDataBase(const wxString& fileName) { - wxString title = mmex::getProgramName() + wxT(" : ") + fileName; + wxString title = mmex::getProgramName() + " : " + fileName; if (mmex::isPortableMode()) - title << wxT(" [") << _("portable mode") << wxT(']'); + title << " [" << _("portable mode") << ']'; SetTitle(title); m_topCategories.Clear(); @@ -2671,7 +2671,7 @@ _("Choose database file to create"), wxEmptyString, wxEmptyString, - wxT("MMB Files(*.mmb)|*.mmb"), + "MMB Files(*.mmb|*.mmb)", wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -2680,8 +2680,8 @@ wxString fileName = dlg.GetPath(); - if (!fileName.EndsWith(wxT(".mmb"))) - fileName += wxT(".mmb"); + if (!fileName.EndsWith(".mmb")) + fileName += ".mmb"; SetDatabaseFile(fileName, true); } @@ -2692,7 +2692,7 @@ autoRepeatTransactionsTimer_.Stop(); wxString fileName = wxFileSelector(_("Choose database file to open"), wxEmptyString, wxEmptyString, wxEmptyString, - wxT("MMB Files(*.mmb)|*.mmb|Encrypted MMB files (*.emb)|*.emb"), + "MMB Files(*.mmb|*.mmb|Encrypted MMB files (*.emb)|*.emb)", wxFD_FILE_MUST_EXIST, this ); @@ -2709,7 +2709,7 @@ { wxString encFileName = wxFileSelector(_("Choose Encrypted database file to open"), wxEmptyString, wxEmptyString, wxEmptyString, - wxT("Encrypted MMB files (*.emb)|*.emb"), + "Encrypted MMB files (*.emb|*.emb)", wxFD_FILE_MUST_EXIST, this ); @@ -2725,7 +2725,7 @@ _("Choose database file to Save As"), wxEmptyString, wxEmptyString, - wxT("MMB Files(*.mmb)|*.mmb"), + "MMB Files(*.mmb|*.mmb)", wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -2734,8 +2734,8 @@ wxString fileName = dlg.GetPath(); - if (!dlg.GetPath().EndsWith(wxT(".mmb"))) - fileName += wxT(".mmb"); + if (!dlg.GetPath().EndsWith(".mmb")) + fileName += ".mmb"; wxCopyFile(encFileName, fileName); @@ -2762,7 +2762,7 @@ _("Save database file as"), wxEmptyString, wxEmptyString, - wxT("MMB Files(*.mmb)|*.mmb|Encrypted MMB files (*.emb)|*.emb"), + "MMB Files(*.mmb)|*.mmb|Encrypted MMB files (*.emb)|*.emb", wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -2773,7 +2773,7 @@ bool encrypt = dlg.GetFilterIndex() != 0; // emb -> Encrypted mMB wxFileName newFileName(dlg.GetPath()); - fixFileExt(newFileName, encrypt ? wxT("emb") : wxT("mmb")); + fixFileExt(newFileName, encrypt ? "emb" : "mmb"); wxFileName oldFileName(fileName_); // opened db's file @@ -2913,9 +2913,9 @@ This message will not be displayed in future. ************************************************************/ wxString msgStr; - msgStr << _("Term Account views have been temporarly turned on.") << wxT("\n") + msgStr << _("Term Account views have been temporarly turned on.") << "\n" << _("To maintain this view, change the defaults by using:\n\nTools -> Options\nView Options") - << wxT("\n\n") + << "\n\n" << _("This message will not be displayed in future."); wxMessageBox(msgStr, _("Initial Term Account Activation"), wxOK|wxICON_INFORMATION); } @@ -3074,7 +3074,7 @@ ignoreSubCateg = dlg->getExpandStatus(); if (!pBankTransaction->containsCategory(categID, subcategID, ignoreSubCateg)) { - pBankTransaction->reportCategAmountStr_ = wxT(""); + pBankTransaction->reportCategAmountStr_ = ""; continue; } @@ -3171,11 +3171,11 @@ menuBar_->FindItem(MENU_IGNORE_FUTURE_TRANSACTIONS)->Check(mmIniOptions::instance().ignoreFutureTransactions_); int messageIcon = wxOK|wxICON_INFORMATION; - wxString sysMsg = wxString() << _("MMEX Options have been updated.") << wxT("\n\n"); + wxString sysMsg = wxString() << _("MMEX Options have been updated.") << "\n\n"; if (systemOptions.RequiresRestart()) { messageIcon = wxOK|wxICON_WARNING; - sysMsg << _("Recommendation: Shut down and restart MMEX.") << wxT("\n") + sysMsg << _("Recommendation: Shut down and restart MMEX.") << "\n" << _("This will allow all MMEX option updates to take effect."); } wxMessageBox(sysMsg, _("New MMEX Options"), messageIcon); @@ -3195,11 +3195,11 @@ bool mmGUIFrame::IsUpdateAvailable(wxString page) { - wxStringTokenizer tkz(page, wxT('.'), wxTOKEN_RET_EMPTY_ALL); + wxStringTokenizer tkz(page, '.', wxTOKEN_RET_EMPTY_ALL); int numTokens = (int)tkz.CountTokens(); if (numTokens != 4) { - wxString url = wxT("http://www.codelathe.com/mmex"); + wxString url = "http://www.codelathe.com/mmex"; wxLaunchDefaultBrowser(url); return false; } @@ -3211,9 +3211,9 @@ // get current version wxString currentV = mmex::getProgramVersion(); - currentV = currentV.SubString(0, currentV.Find(wxT("DEV"))-1).Trim(); + currentV = currentV.SubString(0, currentV.Find("DEV")-1).Trim(); - wxStringTokenizer tkz1(currentV, wxT('.'), wxTOKEN_RET_EMPTY_ALL); + wxStringTokenizer tkz1(currentV, '.', wxTOKEN_RET_EMPTY_ALL); numTokens = (int)tkz1.CountTokens(); wxString majC = tkz1.GetNextToken(); @@ -3252,12 +3252,12 @@ { // Set up system information wxString versionDetails = wxString() - << _("Version: ")<< mmex::getProgramVersion() << wxT("\n\n") - << mmex::getProgramDescription() << wxT("\n") - << wxT("\n"); + << _("Version: ")<< mmex::getProgramVersion() << "\n\n" + << mmex::getProgramDescription() << "\n" + << "\n"; // Access current version details page - wxString site = wxT("http://www.codelathe.com/mmex/version.html"); + wxString site = "http://www.codelathe.com/mmex/version.html"; wxString page; int err_code = site_content(site, page); @@ -3270,12 +3270,12 @@ /************************************************************************* Expected format of the string from the internet. Version: 0.9.8.0 - page = wxT("x.x.x.x - Win: w.w.w.w - Unix: u.u.u.u - Mac: m.m.m.m"); + page = "x.x.x.x - Win: w.w.w.w - Unix: u.u.u.u - Mac: m.m.m.m"; string length = 53 characters **************************************************************************/ page = page.SubString(page.find(wxPlatformInfo::Get().GetOperatingSystemFamilyName().substr(0, 3)), 53); - page.Replace(wxT("-"), wxT(":")); - wxStringTokenizer mySysToken(page, wxT(":")); + page.Replace("-", ":"); + wxStringTokenizer mySysToken(page, ":"); page = mySysToken.GetNextToken(); // the system page = mySysToken.GetNextToken().Trim(false).Trim(); // the version @@ -3292,8 +3292,8 @@ style = wxICON_INFORMATION|style; } - wxString urlString = wxT("http://www.codelathe.com/mmex"); - versionDetails << wxT("\n\n") << _("Proceed to website: ") << urlString; + wxString urlString = "http://www.codelathe.com/mmex"; + versionDetails << "\n\n" << _("Proceed to website: ") << urlString; if (wxMessageBox(versionDetails, _("MMEX System Information Check"), style) == wxOK) wxLaunchDefaultBrowser(urlString); } @@ -3301,7 +3301,7 @@ void mmGUIFrame::OnOnlineUpdateCurRate(wxCommandEvent& /*event*/) { - wxString sMsg = wxT(""); + wxString sMsg = ""; if (m_core.get()->currencyList_.OnlineUpdateCurRate(sMsg)) { wxMessageDialog msgDlg(this, sMsg, _("Currency rate updated")); @@ -3328,8 +3328,8 @@ void mmGUIFrame::OnBeNotified(wxCommandEvent& /*event*/) { // New site location - // wxString url = wxT("http://groups.google.com/group/mmlist"); - wxString url = wxT("https://groups.google.com/forum/?fromgroups#!forum/mmlist"); + // wxString url = "http://groups.google.com/group/mmlist"; + wxString url = "https://groups.google.com/forum/?fromgroups#!forum/mmlist"; wxLaunchDefaultBrowser(url); } @@ -3337,7 +3337,7 @@ void mmGUIFrame::OnFacebook(wxCommandEvent& /*event*/) { - wxString url = wxT("http://www.facebook.com/pages/Money-Manager-Ex/242286559144586"); + wxString url = "http://www.facebook.com/pages/Money-Manager-Ex/242286559144586"; wxLaunchDefaultBrowser(url); } @@ -3352,12 +3352,12 @@ void mmGUIFrame::restorePrinterValues() { // Startup Default Settings - int leftMargin = m_inisettings->GetIntSetting(wxT("PRINTER_LEFT_MARGIN"), 20); - int rightMargin = m_inisettings->GetIntSetting(wxT("PRINTER_RIGHT_MARGIN"), 20); - int topMargin = m_inisettings->GetIntSetting(wxT("PRINTER_TOP_MARGIN"), 20); - int bottomMargin = m_inisettings->GetIntSetting(wxT("PRINTER_BOTTOM_MARGIN"), 20); - int pageOrientation = m_inisettings->GetIntSetting(wxT("PRINTER_PAGE_ORIENTATION"), wxPORTRAIT); - int paperID = m_inisettings->GetIntSetting(wxT("PRINTER_PAGE_ID"), wxPAPER_A4); + int leftMargin = m_inisettings->GetIntSetting("PRINTER_LEFT_MARGIN", 20); + int rightMargin = m_inisettings->GetIntSetting("PRINTER_RIGHT_MARGIN", 20); + int topMargin = m_inisettings->GetIntSetting("PRINTER_TOP_MARGIN", 20); + int bottomMargin = m_inisettings->GetIntSetting("PRINTER_BOTTOM_MARGIN", 20); + int pageOrientation = m_inisettings->GetIntSetting("PRINTER_PAGE_ORIENTATION", wxPORTRAIT); + int paperID = m_inisettings->GetIntSetting("PRINTER_PAGE_ID", wxPAPER_A4); wxPoint topLeft(leftMargin, topMargin); wxPoint bottomRight(rightMargin, bottomMargin); @@ -3390,12 +3390,12 @@ int pageOrientation = printerData->GetOrientation(); wxPaperSize paperID = printerData->GetPaperId(); - m_inisettings->SetIntSetting(wxT("PRINTER_LEFT_MARGIN"), topLeft.x); - m_inisettings->SetIntSetting(wxT("PRINTER_RIGHT_MARGIN"), bottomRight.x); - m_inisettings->SetIntSetting(wxT("PRINTER_TOP_MARGIN"), topLeft.y); - m_inisettings->SetIntSetting(wxT("PRINTER_BOTTOM_MARGIN"), bottomRight.y); - m_inisettings->SetIntSetting(wxT("PRINTER_PAGE_ORIENTATION"), pageOrientation); - m_inisettings->SetIntSetting(wxT("PRINTER_PAGE_ID"), paperID); + m_inisettings->SetIntSetting("PRINTER_LEFT_MARGIN", topLeft.x); + m_inisettings->SetIntSetting("PRINTER_RIGHT_MARGIN", bottomRight.x); + m_inisettings->SetIntSetting("PRINTER_TOP_MARGIN", topLeft.y); + m_inisettings->SetIntSetting("PRINTER_BOTTOM_MARGIN", bottomRight.y); + m_inisettings->SetIntSetting("PRINTER_PAGE_ORIENTATION", pageOrientation); + m_inisettings->SetIntSetting("PRINTER_PAGE_ID", paperID); } } //---------------------------------------------------------------------------- @@ -3471,11 +3471,11 @@ mmReportsPanel* rp = dynamic_cast<mmReportsPanel*>(panelCurrent_); if (rp) { - wxString fileName = wxFileSelector(wxT("Choose HTML file to Export"), - wxEmptyString, wxEmptyString, wxEmptyString, wxT("*.html"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + wxString fileName = wxFileSelector("Choose HTML file to Export", + wxEmptyString, wxEmptyString, wxEmptyString, "*.html", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if ( !fileName.empty() ) { - correctEmptyFileExt(wxT("html"),fileName); + correctEmptyFileExt("html",fileName); wxFileOutputStream output( fileName ); wxTextOutputStream text( output ); text << rp->getReportText(); @@ -3649,7 +3649,7 @@ int acctID = arrAcctID[choice]; wxString deletingAccountName = _("Are you sure you want to delete\n") + m_core->accountList_.accounts_[choice]->acctType_ + - _(" account: ") + m_core->accountList_.accounts_[choice]->name_ + wxT(" ?"); + _(" account: ") + m_core->accountList_.accounts_[choice]->name_ + " ?"; wxMessageDialog msgDlg(this, deletingAccountName, _("Confirm Account Deletion"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); if (msgDlg.ShowModal() == wxID_YES) @@ -3668,22 +3668,22 @@ void mmGUIFrame::OnViewToolbar(wxCommandEvent &event) { - m_mgr.GetPane(wxT("toolbar")).Show(event.IsChecked()); + m_mgr.GetPane("toolbar").Show(event.IsChecked()); m_mgr.Update(); - m_inisettings->SetBoolSetting(wxT("SHOWTOOLBAR"), event.IsChecked()); + m_inisettings->SetBoolSetting("SHOWTOOLBAR", event.IsChecked()); } //---------------------------------------------------------------------------- void mmGUIFrame::OnViewLinks(wxCommandEvent &event) { - m_mgr.GetPane(wxT("Navigation")).Show(event.IsChecked()); + m_mgr.GetPane("Navigation").Show(event.IsChecked()); m_mgr.Update(); } //---------------------------------------------------------------------------- void mmGUIFrame::OnViewToolbarUpdateUI(wxUpdateUIEvent &event) { - if(m_mgr.GetPane(wxT("toolbar")).IsShown()) + if(m_mgr.GetPane("toolbar").IsShown()) event.Check(true); else event.Check(false); @@ -3692,7 +3692,7 @@ void mmGUIFrame::OnViewLinksUpdateUI(wxUpdateUIEvent &event) { - if(m_mgr.GetPane(wxT("Navigation")).IsShown()) + if(m_mgr.GetPane("Navigation").IsShown()) event.Check(true); else event.Check(false); @@ -3701,7 +3701,7 @@ void mmGUIFrame::OnViewBankAccounts(wxCommandEvent &event) { - m_mgr.GetPane(wxT("Bank Accounts")).Show(event.IsChecked()); + m_mgr.GetPane("Bank Accounts").Show(event.IsChecked()); m_mgr.Update(); if (!refreshRequested_) @@ -3714,7 +3714,7 @@ void mmGUIFrame::OnViewTermAccounts(wxCommandEvent &event) { - m_mgr.GetPane(wxT("Term Accounts")).Show(event.IsChecked()); + m_mgr.GetPane("Term Accounts").Show(event.IsChecked()); m_mgr.Update(); if (!refreshRequested_) @@ -3728,7 +3728,7 @@ void mmGUIFrame::OnViewStockAccounts(wxCommandEvent &event) { - m_mgr.GetPane(wxT("Stock Accounts")).Show(event.IsChecked()); + m_mgr.GetPane("Stock Accounts").Show(event.IsChecked()); m_mgr.Update(); if (!refreshRequested_) @@ -3741,7 +3741,7 @@ void mmGUIFrame::OnIgnoreFutureTransactions(wxCommandEvent &event) { - m_mgr.GetPane(wxT("Ignore Future Transactions")).Show(event.IsChecked()); + m_mgr.GetPane("Ignore Future Transactions").Show(event.IsChecked()); mmIniOptions::instance().ignoreFutureTransactions_ = !mmIniOptions::instance().ignoreFutureTransactions_; if (!refreshRequested_) { @@ -3758,10 +3758,10 @@ if (dlg->ShowModal() == wxID_OK) { wxString msgStr; - msgStr << _("Category Relocation Completed.") << wxT("\n\n") + msgStr << _("Category Relocation Completed.") << "\n\n" << wxString::Format( _("Records have been updated in the database: %s"), - dlg->updatedCategoriesCount().c_str()) - << wxT("\n\n") + dlg->updatedCategoriesCount()) + << "\n\n" << _("MMEX must be shutdown and restarted for all the changes to be seen."); wxMessageBox(msgStr,_("Category Relocation Result")); mmOptions::instance().databaseUpdated_ = true; @@ -3776,10 +3776,10 @@ if (dlg->ShowModal() == wxID_OK) { wxString msgStr; - msgStr << _("Payee Relocation Completed.") << wxT("\n\n") + msgStr << _("Payee Relocation Completed.") << "\n\n" << wxString::Format(_("Records have been updated in the database: %s"), - dlg->updatedPayeesCount().c_str()) - << wxT("\n\n"); + dlg->updatedPayeesCount()) + << "\n\n"; wxMessageBox(msgStr, _("Payee Relocation Result")); mmOptions::instance().databaseUpdated_ = true; } @@ -3796,7 +3796,7 @@ int dialogStatus = wxID_MORE; while (dialogStatus == wxID_MORE) { - if (dlg->sScript() != wxT("")) + if (dlg->sScript() != "") { wxBeginBusyCursor(wxHOURGLASS_CURSOR); mmCustomReport* csr = new mmCustomReport(this, @@ -3875,10 +3875,10 @@ wxFileName fn(filename); if (!fn.IsOk()) return; - wxString backupType = wxT("_start_"); - if (updateRequired) backupType = wxT("_update_"); + wxString backupType = "_start_"; + if (updateRequired) backupType = "_update_"; - wxString backupName = filename + backupType + wxDateTime().Today().FormatISODate() + wxT(".") + fn.GetExt(); + wxString backupName = filename + backupType + wxDateTime().Today().FormatISODate() + "." + fn.GetExt(); if (updateRequired) // Create or update the backup file. { wxCopyFile(filename, backupName, true); @@ -3894,7 +3894,7 @@ // Get the list of created backup files for the given filename. wxArrayString backupFileArray; - wxString fileSearch = filename + backupType + wxT("*.") + fn.GetExt(); + wxString fileSearch = filename + backupType + "*." + fn.GetExt(); wxString backupFile = wxFindFirstFile(fileSearch); while (!backupFile.empty()) { @@ -3902,7 +3902,7 @@ backupFile = wxFindNextFile(); } - int max = m_inisettings->GetIntSetting(wxT("MAX_BACKUP_FILES"), 4); + int max = m_inisettings->GetIntSetting("MAX_BACKUP_FILES", 4); if (backupFileArray.Count() > (size_t)max) { backupFileArray.Sort(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-04-20 22:08:10
|
Revision: 3747 http://sourceforge.net/p/moneymanagerex/code/3747 Author: vomikan Date: 2013-04-20 22:08:07 +0000 (Sat, 20 Apr 2013) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2013-04-20 22:02:16 UTC (rev 3746) +++ trunk/mmex/src/mmex.cpp 2013-04-20 22:08:07 UTC (rev 3747) @@ -1245,7 +1245,7 @@ } /* ================================================================================================= */ - + bool ignoreFuture = mmIniOptions::instance().ignoreFutureTransactions_; wxTreeItemId categsOverTime = navTreeCtrl_->AppendItem(reports , _("Where the Money Goes"), 4, 4); navTreeCtrl_->SetItemData(categsOverTime, new mmTreeItemData("Where the Money Goes" @@ -1257,14 +1257,23 @@ , new mmTreeItemData(wxTRANSLATE("Where the Money Goes - Last Calendar Month") , new mmReportCategoryExpensesGoesLastMonth(m_core.get()))); - wxString currentMonthMsg = _("Current Month"); - if (mmIniOptions::instance().ignoreFutureTransactions_) currentMonthMsg = _("Current Month to Date"); + if (ignoreFuture) + { + wxTreeItemId categsOverTimeCurrentMonth = navTreeCtrl_->AppendItem(categsOverTime + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(categsOverTimeCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Where the Money Goes - Current Month") + , new mmReportCategoryExpensesGoesCurrentMonthToDate(m_core.get()))); + } + else + { + wxTreeItemId categsOverTimeCurrentMonth = navTreeCtrl_->AppendItem(categsOverTime + , _("Current Month"), 4, 4); + navTreeCtrl_->SetItemData(categsOverTimeCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Where the Money Goes - Current Month") + , new mmReportCategoryExpensesGoesCurrentMonth(m_core.get()))); + } - wxTreeItemId categsOverTimeCurrentMonth = navTreeCtrl_->AppendItem(categsOverTime, currentMonthMsg, 4, 4); - navTreeCtrl_->SetItemData(categsOverTimeCurrentMonth - , new mmTreeItemData(wxTRANSLATE("Where the Money Goes - Current Month") - , new mmReportCategoryExpensesGoesCurrentMonth(m_core.get()))); - wxTreeItemId categsOverTimeLast30 = navTreeCtrl_->AppendItem(categsOverTime , _("Last 30 Days"), 4, 4); navTreeCtrl_->SetItemData(categsOverTimeLast30 @@ -1298,7 +1307,8 @@ } /////////////////////////////////////////////////////////// - wxTreeItemId posCategs = navTreeCtrl_->AppendItem(reports, _("Where the Money Comes From"), 4, 4); + wxTreeItemId posCategs = navTreeCtrl_->AppendItem(reports + , _("Where the Money Comes From"), 4, 4); navTreeCtrl_->SetItemData(posCategs , new mmTreeItemData("Where the Money Comes From" , new mmReportCategoryExpensesComesCurrentMonth(m_core.get()))); @@ -1309,10 +1319,22 @@ , new mmTreeItemData(wxTRANSLATE("Where the Money Comes From - Last Calendar Month") , new mmReportCategoryExpensesComesLastMonth(m_core.get()))); - wxTreeItemId posCategsCurrentMonth = navTreeCtrl_->AppendItem(posCategs, currentMonthMsg, 4, 4); - navTreeCtrl_->SetItemData(posCategsCurrentMonth - , new mmTreeItemData(wxTRANSLATE("Where the Money Comes From - Current Month") - , new mmReportCategoryExpensesComesCurrentMonth(m_core.get()))); + if (ignoreFuture) + { + wxTreeItemId posCategsCurrentMonth = navTreeCtrl_->AppendItem(posCategs + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(posCategsCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Where the Money Comes From - Current Month") + , new mmReportCategoryExpensesComesCurrentMonthToDate(m_core.get()))); + } + else + { + wxTreeItemId posCategsCurrentMonth = navTreeCtrl_->AppendItem(posCategs + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(posCategsCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Where the Money Comes From - Current Month") + , new mmReportCategoryExpensesComesCurrentMonth(m_core.get()))); + } wxTreeItemId posCategsTimeLast30 = navTreeCtrl_->AppendItem(posCategs , _("Last 30 Days"), 4, 4); @@ -1358,10 +1380,22 @@ , new mmTreeItemData(wxTRANSLATE("Categories - Last Calendar Month") , new mmReportCategoryExpensesCategoriesLastMonth(m_core.get()))); - wxTreeItemId categsCurrentMonth = navTreeCtrl_->AppendItem(categs, currentMonthMsg, 4, 4); - navTreeCtrl_->SetItemData(categsCurrentMonth - , new mmTreeItemData(wxTRANSLATE("Categories - Current Month") - , new mmReportCategoryExpensesCategoriesCurrentMonth(m_core.get()))); + if (ignoreFuture) + { + wxTreeItemId categsCurrentMonth = navTreeCtrl_->AppendItem(categs + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(categsCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Categories - Current Month to Date") + , new mmReportCategoryExpensesCategoriesCurrentMonthToDate(m_core.get()))); + } + else + { + wxTreeItemId categsCurrentMonth = navTreeCtrl_->AppendItem(categs + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(categsCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Categories - Current Month") + , new mmReportCategoryExpensesCategoriesCurrentMonth(m_core.get()))); + } wxTreeItemId categsTimeLast30 = navTreeCtrl_->AppendItem(categs, _("Last 30 Days"), 4, 4); navTreeCtrl_->SetItemData(categsTimeLast30 @@ -1404,10 +1438,22 @@ , new mmTreeItemData(wxTRANSLATE("Payees - Last Calendar Month") , new mmReportPayeeExpensesLastMonth(m_core.get()))); - wxTreeItemId payeesOverTimeCurrentMonth = navTreeCtrl_->AppendItem(payeesOverTime, currentMonthMsg, 4, 4); - navTreeCtrl_->SetItemData(payeesOverTimeCurrentMonth - , new mmTreeItemData(wxTRANSLATE("Payees - Current Month") - , new mmReportPayeeExpensesCurrentMonth(m_core.get()))); + if (ignoreFuture) + { + wxTreeItemId payeesOverTimeCurrentMonth = navTreeCtrl_->AppendItem(payeesOverTime + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(payeesOverTimeCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Payees - Current Month to Date") + , new mmReportPayeeExpensesCurrentMonthToDate(m_core.get()))); + } + else + { + wxTreeItemId payeesOverTimeCurrentMonth = navTreeCtrl_->AppendItem(payeesOverTime + , _("Current Month"), 4, 4); + navTreeCtrl_->SetItemData(payeesOverTimeCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Payees - Current Month") + , new mmReportPayeeExpensesCurrentMonth(m_core.get()))); + } wxTreeItemId payeesOverTimeLast30 = navTreeCtrl_->AppendItem(payeesOverTime , _("Last 30 Days"), 4, 4); @@ -1450,9 +1496,20 @@ navTreeCtrl_->SetItemData(incexpOverTimeCalMonth , new mmTreeItemData(wxTRANSLATE("Income vs Expenses - Last Calendar Month"))); - wxTreeItemId incexpOverTimeCurrentMonth = navTreeCtrl_->AppendItem(incexpOverTime, currentMonthMsg, 4, 4); - navTreeCtrl_->SetItemData(incexpOverTimeCurrentMonth - , new mmTreeItemData(wxTRANSLATE("Income vs Expenses - Current Month"))); + if (ignoreFuture) + { + wxTreeItemId incexpOverTimeCurrentMonth = navTreeCtrl_->AppendItem(incexpOverTime + , _("Current Month to Date"), 4, 4); + navTreeCtrl_->SetItemData(incexpOverTimeCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Income vs Expenses - Current Month to Date"))); + } + else + { + wxTreeItemId incexpOverTimeCurrentMonth = navTreeCtrl_->AppendItem(incexpOverTime + , _("Current Month"), 4, 4); + navTreeCtrl_->SetItemData(incexpOverTimeCurrentMonth + , new mmTreeItemData(wxTRANSLATE("Income vs Expenses - Current Month"))); + } wxTreeItemId incexpOverTimeLast30 = navTreeCtrl_->AppendItem(incexpOverTime, _("Last 30 Days"), 4, 4); navTreeCtrl_->SetItemData(incexpOverTimeLast30 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-05-20 09:31:29
|
Revision: 3940 http://sourceforge.net/p/moneymanagerex/code/3940 Author: guanlisheng Date: 2013-05-20 09:31:26 +0000 (Mon, 20 May 2013) Log Message: ----------- use less pointer Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2013-05-20 09:17:46 UTC (rev 3939) +++ trunk/mmex/src/mmex.cpp 2013-05-20 09:31:26 UTC (rev 3940) @@ -3820,18 +3820,17 @@ void mmGUIFrame::OnPayeeRelocation(wxCommandEvent& /*event*/) { - relocatePayeeDialog* dlg = new relocatePayeeDialog(m_core.get(), this); - if (dlg->ShowModal() == wxID_OK) + relocatePayeeDialog dlg(m_core.get(), this); + if (dlg.ShowModal() == wxID_OK) { wxString msgStr; msgStr << _("Payee Relocation Completed.") << "\n\n" << wxString::Format(_("Records have been updated in the database: %s"), - dlg->updatedPayeesCount()) + dlg.updatedPayeesCount()) << "\n\n"; wxMessageBox(msgStr, _("Payee Relocation Result")); mmOptions::instance().databaseUpdated_ = true; } - delete dlg; homePanel_->Layout(); } //---------------------------------------------------------------------------- @@ -3839,22 +3838,21 @@ void mmGUIFrame::RunCustomSqlDialog(wxString customReportSelectedItem) { this->SetEvtHandlerEnabled(false); - //Use Shared pointer to ensure mmCustomSQLDialog object gets destroyed. - std::shared_ptr<mmCustomSQLDialog> dlg( new mmCustomSQLDialog(custRepIndex_, customReportSelectedItem, this )); + mmCustomSQLDialog dlg(custRepIndex_, customReportSelectedItem, this); int dialogStatus = wxID_MORE; while (dialogStatus == wxID_MORE) { - if (dlg->sScript() != "") + if (dlg.sScript() != "") { wxBeginBusyCursor(wxHOURGLASS_CURSOR); mmCustomReport* csr = new mmCustomReport(this, - m_core.get(), dlg->sReportTitle(), dlg->sScript(), dlg->sSctiptType()); + m_core.get(), dlg.sReportTitle(), dlg.sScript(), dlg.sSctiptType()); createReportsPage(csr); delete csr; // CHECK wxEndBusyCursor(); } - dialogStatus = dlg->ShowModal(); + dialogStatus = dlg.ShowModal(); } processPendingEvents(); // clear out pending events if (dialogStatus == wxID_OK) updateNavTreeControl(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2010-07-29 12:58:58
|
Revision: 986 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=986&view=rev Author: vomikan Date: 2010-07-29 12:58:52 +0000 (Thu, 29 Jul 2010) Log Message: ----------- The improvement of html export and print preview Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2010-07-29 05:51:51 UTC (rev 985) +++ trunk/mmex/src/mmex.cpp 2010-07-29 12:58:52 UTC (rev 986) @@ -3246,7 +3246,7 @@ mmHelpPanel* hp = dynamic_cast<mmHelpPanel*>(panelCurrent_); if (rp) { - printer_ ->PreviewText(panelCurrent_->getReportText()); + printer_ ->PreviewText(rp->getReportText()); } else if (hp) { @@ -3312,7 +3312,7 @@ { wxFileOutputStream output( fileName ); wxTextOutputStream text( output ); - text << panelCurrent_->getReportText(); + text << rp->getReportText(); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-12-17 23:07:53
|
Revision: 1036 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1036&view=rev Author: stef145g Date: 2010-12-17 23:07:47 +0000 (Fri, 17 Dec 2010) Log Message: ----------- Spelling mistake corrected Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2010-12-17 07:51:34 UTC (rev 1035) +++ trunk/mmex/src/mmex.cpp 2010-12-17 23:07:47 UTC (rev 1036) @@ -3992,7 +3992,7 @@ mainSizer->Add( new wxStaticText(this, wxID_ANY, - _("Term accounts are specialized bank accounts. Intended for asset\ntype accounts such as Term Deposits and Bonds. These accounts\ncan have regular money comming in and out, being outside the\ngeneral income stream.")), 0, + _("Term accounts are specialized bank accounts. Intended for asset\ntype accounts such as Term Deposits and Bonds. These accounts\ncan have regular money coming in and out, being outside the\ngeneral income stream.")), 0, wxALL, 5); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-12-18 03:22:57
|
Revision: 1037 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1037&view=rev Author: stef145g Date: 2010-12-18 03:02:53 +0000 (Sat, 18 Dec 2010) Log Message: ----------- Hide Term Accounts when none have been created. Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2010-12-17 23:07:47 UTC (rev 1036) +++ trunk/mmex/src/mmex.cpp 2010-12-18 03:02:53 UTC (rev 1037) @@ -795,6 +795,16 @@ void mmGUIFrame::updateNavTreeControl() { + bool activateTermAccounts = false; + int numAccounts = (int) m_core->accountList_.accounts_.size(); + + for (int iAdx = 0; iAdx < numAccounts; iAdx++) + { + mmTermAccount* pTA = dynamic_cast<mmTermAccount*>(m_core->accountList_.accounts_[iAdx].get()); + if (pTA) + activateTermAccounts = true; + } + navTreeCtrl_->DeleteAllItems(); navTreeCtrl_->SetBackgroundColour(mmColors::navTreeBkColor); @@ -806,10 +816,14 @@ navTreeCtrl_->SetItemData(accounts, new mmTreeItemData(wxT("Bank Accounts"))); navTreeCtrl_->SetItemBold(accounts, true); -// Positioning for new new type of accounts: Term Accounts - wxTreeItemId termAccount = navTreeCtrl_->AppendItem(root, _("Term Accounts"), 2, 2); - navTreeCtrl_->SetItemData(termAccount, new mmTreeItemData(wxT("Term Accounts"))); - navTreeCtrl_->SetItemBold(termAccount, true); + wxTreeItemId termAccount; + if (activateTermAccounts) + { + // Positioning for new new type of accounts: Term Accounts + termAccount = navTreeCtrl_->AppendItem(root, _("Term Accounts"), 2, 2); + navTreeCtrl_->SetItemData(termAccount, new mmTreeItemData(wxT("Term Accounts"))); + navTreeCtrl_->SetItemBold(termAccount, true); + } wxTreeItemId stocks; if (mmIniOptions::enableStocks_) @@ -1160,7 +1174,7 @@ wxString vAccts = mmDBWrapper::getINISettingValue(m_inidb.get(), wxT("VIEWACCOUNTS"), wxT("ALL")); - int numAccounts = (int) m_core->accountList_.accounts_.size(); +// int numAccounts = (int) m_core->accountList_.accounts_.size(); for (int iAdx = 0; iAdx < numAccounts; iAdx++) { mmCheckingAccount* pCA = dynamic_cast<mmCheckingAccount*>(m_core->accountList_.accounts_[iAdx].get()); @@ -1200,6 +1214,13 @@ } navTreeCtrl_->Expand(accounts); + if (activateTermAccounts) + { + navTreeCtrl_->Expand(termAccount); + menuBar_->FindItem(MENU_VIEW_TERMACCOUNTS)->Enable(true); + } else + menuBar_->FindItem(MENU_VIEW_TERMACCOUNTS)->Enable(false); + } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-12-19 06:03:59
|
Revision: 1042 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1042&view=rev Author: stef145g Date: 2010-12-19 06:03:52 +0000 (Sun, 19 Dec 2010) Log Message: ----------- Correct problem at with initial installation, caused by changes in last update. Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2010-12-18 17:19:35 UTC (rev 1041) +++ trunk/mmex/src/mmex.cpp 2010-12-19 06:03:52 UTC (rev 1042) @@ -796,13 +796,16 @@ void mmGUIFrame::updateNavTreeControl() { bool activateTermAccounts = false; - int numAccounts = (int) m_core->accountList_.accounts_.size(); - - for (int iAdx = 0; iAdx < numAccounts; iAdx++) + // if no database is present yet, ignore testing for Term Accounts + if (m_db) { - mmTermAccount* pTA = dynamic_cast<mmTermAccount*>(m_core->accountList_.accounts_[iAdx].get()); - if (pTA) - activateTermAccounts = true; + int numAccounts = (int) m_core->accountList_.accounts_.size(); + for (int iAdx = 0; iAdx < numAccounts; iAdx++) + { + mmTermAccount* pTA = dynamic_cast<mmTermAccount*>(m_core->accountList_.accounts_[iAdx].get()); + if (pTA) + activateTermAccounts = true; + } } navTreeCtrl_->DeleteAllItems(); @@ -1174,7 +1177,7 @@ wxString vAccts = mmDBWrapper::getINISettingValue(m_inidb.get(), wxT("VIEWACCOUNTS"), wxT("ALL")); -// int numAccounts = (int) m_core->accountList_.accounts_.size(); + int numAccounts = (int) m_core->accountList_.accounts_.size(); for (int iAdx = 0; iAdx < numAccounts; iAdx++) { mmCheckingAccount* pCA = dynamic_cast<mmCheckingAccount*>(m_core->accountList_.accounts_[iAdx].get()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-01-04 00:33:33
|
Revision: 1062 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1062&view=rev Author: stef145g Date: 2011-01-04 00:33:27 +0000 (Tue, 04 Jan 2011) Log Message: ----------- Fix: User unable to start MMEX if encrypted file password is incorrect. Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2011-01-03 18:14:06 UTC (rev 1061) +++ trunk/mmex/src/mmex.cpp 2011-01-04 00:33:27 UTC (rev 1062) @@ -2747,15 +2747,19 @@ wxFileName checkExt(fileName); wxString password; + bool passwordCheckPassed = true; if (checkExt.GetExt().Lower() == wxT("emb") && wxFileName::FileExists(fileName)) { password = !pwd.empty() ? pwd : wxGetPasswordFromUser(_("Enter database's password")); + if (password.IsEmpty()) + passwordCheckPassed = false; } // Existing Database if (!openingNew && !fileName.IsEmpty() - && wxFileName::FileExists(fileName)) + && wxFileName::FileExists(fileName) + && passwordCheckPassed) { /* Do a backup before opening */ wxString backupDBState = mmDBWrapper::getINISettingValue(m_inidb.get(), wxT("BACKUPDB"), wxT("FALSE")); @@ -2819,10 +2823,14 @@ } else // open of existing database failed { - wxString note = mmex::getProgramName() + _(" - No File opened "); - this->SetTitle(note); + wxString note = mmex::getProgramName() + _(" - No File opened "); + this->SetTitle(note); - wxMessageDialog msgDlg(this, _("Cannot locate previously opened database.\nDo you want to browse to locate the file?"), + wxString msgStr = _("Cannot locate previously opened database.\n"); + if (!passwordCheckPassed) + msgStr = _("Password not entered for encrypted Database.\n"); + + wxMessageDialog msgDlg(this, msgStr + _("Do you want to browse to locate another file?"), _("Error opening database"), wxYES_NO); if (msgDlg.ShowModal() == wxID_YES) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-01-13 15:02:41
|
Revision: 1087 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1087&view=rev Author: stef145g Date: 2011-01-13 15:02:35 +0000 (Thu, 13 Jan 2011) Log Message: ----------- Fix Home Page Navigation, Removed PopupMenu "Go to..", fixed PopupMenu for Term Accounts Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2011-01-13 06:14:51 UTC (rev 1086) +++ trunk/mmex/src/mmex.cpp 2011-01-13 15:02:35 UTC (rev 1087) @@ -1419,18 +1419,28 @@ if (pAccount) { wxString acctType = pAccount->acctType_; - if (acctType == wxT("Checking")) + + if ((acctType == wxT("Checking")) || acctType == wxT("Term") ) { gotoAccountID_ = data; - wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_GOTOACCOUNT); - GetEventHandler()->AddPendingEvent(evt); + if (gotoAccountID_ != -1) + { + createCheckingAccountPage(gotoAccountID_); + } + navTreeCtrl_->SetFocus(); + + //if (acctType == wxT("Checking")) + //{ + // gotoAccountID_ = data; + // wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_GOTOACCOUNT); + // GetEventHandler()->AddPendingEvent(evt); + //} + //else if (acctType == wxT("Term")) + //{ + // gotoAccountID_ = data; + // wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_GOTOACCOUNT); + // GetEventHandler()->AddPendingEvent(evt); } - else if (acctType == wxT("Term")) - { - gotoAccountID_ = data; - wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_GOTOACCOUNT); - GetEventHandler()->AddPendingEvent(evt); - } else { Freeze(); @@ -2224,29 +2234,29 @@ int data = iData->getData(); if (!iData->isBudgetingNode()) { - boost::shared_ptr<mmAccount> pAccount = m_core->accountList_.getAccountSharedPtr(data); - if (pAccount) - { - wxString acctType = pAccount->acctType_; - if (acctType == wxT("Checking")) - { - wxMenu menu; - menu.Append(MENU_TREEPOPUP_GOTO, _("&Go To..")); - menu.Append(MENU_TREEPOPUP_EDIT, _("&Edit Account")); - menu.Append(MENU_TREEPOPUP_DELETE, _("&Delete Account")); - menu.AppendSeparator(); - menu.Append(MENU_TREEPOPUP_LAUNCHWEBSITE, _("&Launch Account Website")); - PopupMenu(&menu, pt); - } - else if (acctType == wxT("Investment") || acctType == wxT("Term")) - { - wxMenu menu; - menu.Append(MENU_TREEPOPUP_EDIT, _("&Edit Account")); - menu.Append(MENU_TREEPOPUP_DELETE, _("&Delete Account")); - menu.AppendSeparator(); - menu.Append(MENU_TREEPOPUP_LAUNCHWEBSITE, _("&Launch Account Website")); - PopupMenu(&menu, pt); - } + boost::shared_ptr<mmAccount> pAccount = m_core->accountList_.getAccountSharedPtr(data); + if (pAccount) + { + wxString acctType = pAccount->acctType_; + if (acctType == wxT("Checking") || acctType == wxT("Term") || acctType == wxT("Investment")) + { + wxMenu menu; +// menu.Append(MENU_TREEPOPUP_GOTO, _("&Go To..")); + menu.Append(MENU_TREEPOPUP_EDIT, _("&Edit Account")); + menu.Append(MENU_TREEPOPUP_DELETE, _("&Delete Account")); + menu.AppendSeparator(); + menu.Append(MENU_TREEPOPUP_LAUNCHWEBSITE, _("&Launch Account Website")); + PopupMenu(&menu, pt); + } + //else if (acctType == wxT("Investment") || acctType == wxT("Term")) + //{ + // wxMenu menu; + // menu.Append(MENU_TREEPOPUP_EDIT, _("&Edit Account")); + // menu.Append(MENU_TREEPOPUP_DELETE, _("&Delete Account")); + // menu.AppendSeparator(); + // menu.Append(MENU_TREEPOPUP_LAUNCHWEBSITE, _("&Launch Account Website")); + // PopupMenu(&menu, pt); + //} } else { @@ -2255,10 +2265,11 @@ } } } - else - { - if (iData->getString() == wxT("Bank Accounts")) - { + else + { + if ( iData->getString() == wxT("Bank Accounts") || + iData->getString() == wxT("Term Accounts")) + { // Create for both Bank & Term Accounts //wxMenu menu; /*Popup Menu for Bank Accounts*/ @@ -2278,36 +2289,39 @@ //Favorite // //Open // + wxMenu *menu = new wxMenu; + menu->Append(MENU_TREEPOPUP_ACCOUNT_NEW, _("New &Account")); + menu->Append(MENU_TREEPOPUP_ACCOUNT_DELETE, _("&Delete Account")); + menu->Append(MENU_TREEPOPUP_ACCOUNT_EDIT, _("&Edit Account")); + menu->Append(MENU_TREEPOPUP_ACCOUNT_LIST, _("Account &List")); + menu->AppendSeparator(); + // menu->Append(menuItemOnlineUpdateCurRate_); + // menu->AppendSeparator(); - wxMenu *menu = new wxMenu; - menu->Append(MENU_TREEPOPUP_ACCOUNT_NEW, _("New &Account")); - menu->Append(MENU_TREEPOPUP_ACCOUNT_DELETE, _("&Delete Account")); - menu->Append(MENU_TREEPOPUP_ACCOUNT_EDIT, _("&Edit Account")); - menu->Append(MENU_TREEPOPUP_ACCOUNT_LIST, _("Account &List")); - - menu->AppendSeparator(); - // menu->Append(menuItemOnlineUpdateCurRate_); - // menu->AppendSeparator(); + // Create only for Bank Accounts + if (iData->getString() != wxT("Term Accounts")) + { + wxMenu *exportTo = new wxMenu; + exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2CSV, _("&CSV Files")); + exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2QIF, _("&QIF Files")); + menu->AppendSubMenu(exportTo, _("&Export")); + wxMenu *importFrom = new wxMenu; + importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTUNIVCSV, _("&Universal CSV Files")); + importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTQIF, _("&QIF Files")); + importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTCSV, _("&MMEX CSV Files")); + importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTMMNET, _("MM.&NET CSV Files")); + menu->AppendSubMenu(importFrom, _("&Import")); + menu->AppendSeparator(); + } - wxMenu *exportTo = new wxMenu; - exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2CSV, _("&CSV Files")); - exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2QIF, _("&QIF Files")); - menu->AppendSubMenu(exportTo, _("&Export")); - wxMenu *importFrom = new wxMenu; - importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTUNIVCSV, _("&Universal CSV Files")); - importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTQIF, _("&QIF Files")); - importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTCSV, _("&MMEX CSV Files")); - importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTMMNET, _("MM.&NET CSV Files")); - menu->AppendSubMenu(importFrom, _("&Import")); - menu->AppendSeparator(); - wxMenu *viewAccounts = new wxMenu; - viewAccounts->Append(MENU_TREEPOPUP_ACCOUNT_VIEWALL, _("All")); - viewAccounts->Append(MENU_TREEPOPUP_ACCOUNT_VIEWOPEN, _("Open")); - viewAccounts->Append(MENU_TREEPOPUP_ACCOUNT_VIEWFAVORITE, _("Favorites")); - menu->AppendSubMenu(viewAccounts, _("Accounts Visible")); - PopupMenu(&*menu, pt); - } - } + wxMenu *viewAccounts = new wxMenu; + viewAccounts->Append(MENU_TREEPOPUP_ACCOUNT_VIEWALL, _("All")); + viewAccounts->Append(MENU_TREEPOPUP_ACCOUNT_VIEWOPEN, _("Open")); + viewAccounts->Append(MENU_TREEPOPUP_ACCOUNT_VIEWFAVORITE, _("Favorites")); + menu->AppendSubMenu(viewAccounts, _("Accounts Visible")); + PopupMenu(&*menu, pt); + } + } } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-01-14 07:41:57
|
Revision: 1090 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1090&view=rev Author: vomikan Date: 2011-01-14 07:41:51 +0000 (Fri, 14 Jan 2011) Log Message: ----------- SetFocus() for Home Page navigation button added (for linux only) Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2011-01-14 05:37:30 UTC (rev 1089) +++ trunk/mmex/src/mmex.cpp 2011-01-14 07:41:51 UTC (rev 1090) @@ -820,7 +820,9 @@ wxTreeItemId root = navTreeCtrl_->AddRoot(_("Home Page"), 0, 0); navTreeCtrl_->SetItemData(root, new mmTreeItemData(wxT("Home Page"))); navTreeCtrl_->SetItemBold(root, true); + navTreeCtrl_->SetFocus(); + wxTreeItemId accounts = navTreeCtrl_->AppendItem(root, _("Bank Accounts"), 1, 1); navTreeCtrl_->SetItemData(accounts, new mmTreeItemData(wxT("Bank Accounts"))); navTreeCtrl_->SetItemBold(accounts, true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-01-31 11:22:58
|
Revision: 1129 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1129&view=rev Author: vomikan Date: 2011-01-31 11:22:52 +0000 (Mon, 31 Jan 2011) Log Message: ----------- UnselectAll works on Linux too Modified Paths: -------------- trunk/mmex/src/mmex.cpp Modified: trunk/mmex/src/mmex.cpp =================================================================== --- trunk/mmex/src/mmex.cpp 2011-01-31 06:30:59 UTC (rev 1128) +++ trunk/mmex/src/mmex.cpp 2011-01-31 11:22:52 UTC (rev 1129) @@ -653,7 +653,7 @@ void mmGUIFrame::unselectNavTree() { wxASSERT(navTreeCtrl_); - navTreeCtrl_->Unselect(); + navTreeCtrl_->UnselectAll(); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |