From: <gua...@us...> - 2013-09-18 07:09:29
|
Revision: 4508 http://sourceforge.net/p/moneymanagerex/code/4508 Author: guanlisheng Date: 2013-09-18 07:09:25 +0000 (Wed, 18 Sep 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-18 06:46:41 UTC (rev 4507) +++ trunk/src/mmex.cpp 2013-09-18 07:09:25 UTC (rev 4508) @@ -461,7 +461,9 @@ wxWizardPageSimple(parent), parent_(parent) { - itemChoiceType_ = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, Model_Account::instance().types_); + itemChoiceType_ = new wxChoice(this, wxID_ANY); + for (const auto& type: Model_Account::instance().types_) + itemChoiceType_->Append(wxGetTranslation(type), new wxStringClientData(type)); itemChoiceType_->SetToolTip(_("Specify the type of account to be created.")); wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); @@ -490,12 +492,8 @@ bool mmAddAccountPage2::TransferDataFromWindow() { - int acctType = itemChoiceType_->GetSelection(); - wxString acctTypeStr = ACCOUNT_TYPE_BANK; - if (acctType == 1) - acctTypeStr = ACCOUNT_TYPE_STOCK; - else if (acctType == 2) - acctTypeStr = ACCOUNT_TYPE_TERM; + const wxStringClientData* type_obj = (wxStringClientData *)itemChoiceType_->GetClientObject(itemChoiceType_->GetSelection()); + wxString acctTypeStr = (type_obj) ? type_obj->GetData() : ACCOUNT_TYPE_BANK; int currencyID = Model_Infotable::instance().GetBaseCurrencyId(); if (currencyID == -1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-09-19 05:34:06
|
Revision: 4513 http://sourceforge.net/p/moneymanagerex/code/4513 Author: guanlisheng Date: 2013-09-19 05:34:03 +0000 (Thu, 19 Sep 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-19 04:48:22 UTC (rev 4512) +++ trunk/src/mmex.cpp 2013-09-19 05:34:03 UTC (rev 4513) @@ -1880,19 +1880,15 @@ if (selectedItemData_) { int data = selectedItemData_->getData(); - mmAccount* pAccount = m_core->accountList_.GetAccountSharedPtr(data); - if (pAccount) + Model_Account::Data* account = Model_Account::instance().get(data); + if (account) { - wxString acctType = pAccount->acctType_; - if (acctType == ACCOUNT_TYPE_BANK || acctType == ACCOUNT_TYPE_STOCK || acctType == ACCOUNT_TYPE_TERM) - { - mmNewAcctDialog dlg(m_core.get(), true, data, this); - if ( dlg.ShowModal() == wxID_OK ) - { - createHomePage(); - updateNavTreeControl(); - } - } + mmNewAcctDialog dlg(m_core.get(), true, account->ACCOUNTID, this); + if (dlg.ShowModal() == wxID_OK) + { + createHomePage(); + updateNavTreeControl(); + } } } } @@ -3616,20 +3612,19 @@ void mmGUIFrame::OnEditAccount(wxCommandEvent& /*event*/) { - if (m_core->accountList_.accounts_.size() == 0) + Model_Account::Data_Set accounts = Model_Account::instance().all(); + if (accounts.empty()) { wxMessageBox(_("No account available to edit!"), _("Accounts"), wxOK|wxICON_WARNING); return; } wxArrayString as; - std::vector<int> arrAcctID; - - int idx = 0; - for (const auto& account: m_core->accountList_.accounts_) + wxArrayInt arrAcctID; + for (const auto& account: accounts) { - as.Add(account->name_); - arrAcctID[idx ++] = account->id_; + as.Add(account.ACCOUNTNAME); + arrAcctID.Add(account.ACCOUNTID); } wxSingleChoiceDialog scd(this, _("Choose Account to Edit"), _("Accounts"), as); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-09-23 06:32:32
|
Revision: 4553 http://sourceforge.net/p/moneymanagerex/code/4553 Author: vomikan Date: 2013-09-23 06:32:27 +0000 (Mon, 23 Sep 2013) Log Message: ----------- wxAcceleratorEntry fommain fraim added Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-23 05:27:11 UTC (rev 4552) +++ trunk/src/mmex.cpp 2013-09-23 06:32:27 UTC (rev 4553) @@ -707,6 +707,15 @@ if (!openFile(dbpath.GetFullPath(), false)) showBeginAppDialog(true); } + + const wxAcceleratorEntry entries[] = + { + wxAcceleratorEntry(wxACCEL_NORMAL, WXK_F9, wxID_NEW), + }; + + wxAcceleratorTable tab(sizeof(entries)/sizeof(*entries), entries); + SetAcceleratorTable(tab); + } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-09-25 12:36:43
|
Revision: 4580 http://sourceforge.net/p/moneymanagerex/code/4580 Author: guanlisheng Date: 2013-09-25 12:36:35 +0000 (Wed, 25 Sep 2013) Log Message: ----------- init more models in mmex.cpp Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-25 10:36:48 UTC (rev 4579) +++ trunk/src/mmex.cpp 2013-09-25 12:36:35 UTC (rev 4580) @@ -72,6 +72,7 @@ #include "model/Model_Checking.h" #include "model/Model_Category.h" #include "model/Model_Subcategory.h" +#include "model/Model_Billsdeposits.h" //---------------------------------------------------------------------------- @@ -2589,6 +2590,9 @@ Model_Currency::instance(m_db.get()); Model_Budgetyear::instance(m_db.get()); Model_Infotable::instance(m_db.get()); + Model_Category::instance(m_db.get()); + Model_Subcategory::instance(m_db.get()); + Model_Billsdeposits::instance(m_db.get()); // we need to check the db whether it is the right version if (!Model_Infotable::instance().checkDBVersion()) { @@ -2616,9 +2620,15 @@ password_ = password; Model_Asset::instance(m_db.get()); Model_Stock::instance(m_db.get()); + Model_Account::instance(m_db.get()); + Model_Payee::instance(m_db.get()); + Model_Checking::instance(m_db.get()); Model_Currency::instance(m_db.get()); Model_Budgetyear::instance(m_db.get()); Model_Infotable::instance(m_db.get()); + Model_Category::instance(m_db.get()); + Model_Subcategory::instance(m_db.get()); + Model_Billsdeposits::instance(m_db.get()); m_core.reset(new mmCoreDB(m_db)); } @@ -2628,10 +2638,15 @@ password_ = password; Model_Asset::instance(m_db.get()); Model_Stock::instance(m_db.get()); + Model_Account::instance(m_db.get()); + Model_Payee::instance(m_db.get()); + Model_Checking::instance(m_db.get()); Model_Currency::instance(m_db.get()); - Model_Currency::instance().all(); Model_Budgetyear::instance(m_db.get()); Model_Infotable::instance(m_db.get()); + Model_Category::instance(m_db.get()); + Model_Subcategory::instance(m_db.get()); + Model_Billsdeposits::instance(m_db.get()); openDataBase(fileName); m_core.reset(new mmCoreDB(m_db)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-09-27 12:59:27
|
Revision: 4585 http://sourceforge.net/p/moneymanagerex/code/4585 Author: guanlisheng Date: 2013-09-27 12:59:23 +0000 (Fri, 27 Sep 2013) Log Message: ----------- use model class to access data Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-26 13:27:44 UTC (rev 4584) +++ trunk/src/mmex.cpp 2013-09-27 12:59:23 UTC (rev 4585) @@ -838,38 +838,36 @@ void mmGUIFrame::OnAutoRepeatTransactionsTimer(wxTimerEvent& /*event*/) { bool continueExecution = false; + m_db.get()->Begin(); - m_core->currencyList_.LoadBaseCurrencySettings(); - m_db.get()->Begin(); - wxSQLite3ResultSet q1 = m_db.get()->ExecuteQuery(SELECT_ALL_FROM_BILLSDEPOSITS_V1); - while (q1.NextRow()) + for (const auto& q1: Model_Billsdeposits::instance().all()) { bool autoExecuteManual = false; // Used when decoding: REPEATS bool autoExecuteSilent = false; bool requireExecution = false; mmBDTransactionHolder th; - th.id_ = q1.GetInt("BDID"); - th.nextOccurDate_ = q1.GetDate("NEXTOCCURRENCEDATE"); + th.id_ = q1.BDID; + th.nextOccurDate_ = Model_Billsdeposits::NEXTOCCURRENCEDATE(q1); th.nextOccurStr_ = mmGetDateForDisplay(th.nextOccurDate_); - th.payeeID_ = q1.GetInt("PAYEEID"); - th.transType_ = q1.GetString("TRANSCODE"); - th.accountID_ = q1.GetInt("ACCOUNTID"); - th.toAccountID_ = q1.GetInt("TOACCOUNTID"); + th.payeeID_ = q1.PAYEEID; + th.transType_ = q1.TRANSCODE; + th.accountID_ = q1.ACCOUNTID; + th.toAccountID_ = q1.TOACCOUNTID; th.accountName_ = m_core.get()->accountList_.GetAccountName(th.accountID_); - th.amt_ = q1.GetDouble("TRANSAMOUNT"); - th.toAmt_ = q1.GetDouble("TOTRANSAMOUNT"); - th.notes_ = q1.GetString("NOTES"); - th.categID_ = q1.GetInt("CATEGID"); + th.amt_ = q1.TRANSAMOUNT; + th.toAmt_ = q1.TOTRANSAMOUNT; + th.notes_ = q1.NOTES; + th.categID_ = q1.CATEGID; th.categoryStr_ = m_core.get()->categoryList_.GetCategoryName(th.categID_); - th.subcategID_ = q1.GetInt("SUBCATEGID"); + th.subcategID_ = q1.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("REPEATS"); - int numRepeats = q1.GetInt("NUMOCCURRENCES"); + int repeats = q1.REPEATS; + int numRepeats = q1.NUMOCCURRENCES; if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute User Acknowlegement required { @@ -947,8 +945,8 @@ tran.payeeStr_ = th.payeeStr_; tran.transType_ = th.transType_; tran.amt_ = th.amt_; - tran.status_ = q1.GetString("STATUS"); - tran.transNum_ = q1.GetString("TRANSACTIONNUMBER"); + tran.status_ = q1.STATUS; + tran.transNum_ = q1.TRANSACTIONNUMBER; tran.notes_ = th.notes_; tran.categID_ = th.categID_; tran.subcategID_ = th.subcategID_; @@ -970,7 +968,6 @@ } } } - q1.Finalize(); m_db.get()->Commit(); if (continueExecution) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-09-27 13:53:14
|
Revision: 4591 http://sourceforge.net/p/moneymanagerex/code/4591 Author: guanlisheng Date: 2013-09-27 13:53:12 +0000 (Fri, 27 Sep 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-27 13:50:53 UTC (rev 4590) +++ trunk/src/mmex.cpp 2013-09-27 13:53:12 UTC (rev 4591) @@ -420,7 +420,7 @@ bool mmAddAccountPage1::TransferDataFromWindow() { bool result = true; - const wxString account_name = textAccountName_->GetValue().Trim(); + const wxString& account_name = textAccountName_->GetValue().Trim(); if ( account_name.IsEmpty()) { wxMessageBox(_("Account Name Invalid"), _("New Account"), wxOK|wxICON_ERROR, this); @@ -2562,7 +2562,7 @@ passwordCheckPassed = false; } - const wxString dialogErrorMessageHeading = _("Opening MMEX Database - Error"); + const wxString& dialogErrorMessageHeading = _("Opening MMEX Database - Error"); // Existing Database if (!openingNew @@ -3139,8 +3139,8 @@ if (dlg->getNumberCheckBox()) { - const wxString transNumber = dlg->getNumber().Trim().Lower(); - const wxString orig = tran->transNum_.Lower(); + const wxString& transNumber = dlg->getNumber().Trim().Lower(); + const wxString& orig = tran->transNum_.Lower(); if (!orig.Matches(transNumber)) continue; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-09-16 11:49:51
|
Revision: 4492 http://sourceforge.net/p/moneymanagerex/code/4492 Author: siena123 Date: 2013-09-16 11:49:48 +0000 (Mon, 16 Sep 2013) Log Message: ----------- Feature-Request[255] - fixed cancel button Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-16 10:41:11 UTC (rev 4491) +++ trunk/src/mmex.cpp 2013-09-16 11:49:48 UTC (rev 4492) @@ -916,7 +916,9 @@ mmBDDialog repeatTransactionsDlg(m_core.get() , th.id_ ,false ,true , this, SYMBOL_BDDIALOG_IDNAME , _(" Auto Repeat Transactions")); if ( repeatTransactionsDlg.ShowModal() == wxID_OK ) + { if (activeHomePage_) createHomePage(); + } else // stop repeat executions from occuring continueExecution = false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-09-28 01:21:17
|
Revision: 4600 http://sourceforge.net/p/moneymanagerex/code/4600 Author: siena123 Date: 2013-09-28 01:21:14 +0000 (Sat, 28 Sep 2013) Log Message: ----------- Fix crash - quit from start page before database opened Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-28 00:55:02 UTC (rev 4599) +++ trunk/src/mmex.cpp 2013-09-28 01:21:14 UTC (rev 4600) @@ -764,7 +764,8 @@ printer_.reset(); delete recentFiles_; delete custRepIndex_; - saveSettings(); + if(!fileName_.IsEmpty()) // Exiting before file is opened + saveSettings(); m_mgr.UnInit(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-09-28 03:39:25
|
Revision: 4604 http://sourceforge.net/p/moneymanagerex/code/4604 Author: siena123 Date: 2013-09-28 03:39:23 +0000 (Sat, 28 Sep 2013) Log Message: ----------- remove debug message Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-28 03:37:15 UTC (rev 4603) +++ trunk/src/mmex.cpp 2013-09-28 03:39:23 UTC (rev 4604) @@ -789,8 +789,6 @@ wxTreeItemIdValue cookie; while (item.IsOk()) { - wxString s = navTreeCtrl_->GetItemText(item); - wxMessageBox(s, "Debug", wxOK); if (navTreeCtrl_->ItemHasChildren(item)) { wxTreeItemId childitem = navTreeCtrl_->GetFirstChild(item, cookie); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-09-28 04:35:58
|
Revision: 4605 http://sourceforge.net/p/moneymanagerex/code/4605 Author: siena123 Date: 2013-09-28 04:35:55 +0000 (Sat, 28 Sep 2013) Log Message: ----------- update previous cleanup Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-28 03:39:23 UTC (rev 4604) +++ trunk/src/mmex.cpp 2013-09-28 04:35:55 UTC (rev 4605) @@ -786,11 +786,11 @@ void mmGUIFrame::cleanupNavTreeControl(wxTreeItemId& item) { - wxTreeItemIdValue cookie; while (item.IsOk()) { if (navTreeCtrl_->ItemHasChildren(item)) { + wxTreeItemIdValue cookie; wxTreeItemId childitem = navTreeCtrl_->GetFirstChild(item, cookie); cleanupNavTreeControl(childitem); } @@ -798,7 +798,7 @@ navTreeCtrl_->SetItemData(item, 0); if (iData) delete iData; - item = navTreeCtrl_->GetNextChild(item, cookie); + item = navTreeCtrl_->GetNextSibling(item); } } @@ -1143,12 +1143,12 @@ } navTreeCtrl_->SetEvtHandlerEnabled(false); - wxTreeItemId rootitem = navTreeCtrl_->GetRootItem(); - cleanupNavTreeControl(rootitem); + wxTreeItemId root = navTreeCtrl_->GetRootItem(); + cleanupNavTreeControl(root); navTreeCtrl_->DeleteAllItems(); //navTreeCtrl_->SetBackgroundColour(mmColors::navTreeBkColor); - wxTreeItemId root = navTreeCtrl_->AddRoot(_("Home Page"), 0, 0); + root = navTreeCtrl_->AddRoot(_("Home Page"), 0, 0); navTreeCtrl_->SetItemData(root, new mmTreeItemData("Home Page")); navTreeCtrl_->SetItemBold(root, true); navTreeCtrl_->SetFocus(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-09-29 17:58:06
|
Revision: 4637 http://sourceforge.net/p/moneymanagerex/code/4637 Author: siena123 Date: 2013-09-29 17:58:03 +0000 (Sun, 29 Sep 2013) Log Message: ----------- fix add new account wizard Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-09-29 16:40:56 UTC (rev 4636) +++ trunk/src/mmex.cpp 2013-09-29 17:58:03 UTC (rev 4637) @@ -441,7 +441,7 @@ bool mmAddAccountPage1::TransferDataFromWindow() { bool result = true; - const wxString& account_name = textAccountName_->GetValue().Trim(); + const wxString account_name = textAccountName_->GetValue().Trim(); if ( account_name.IsEmpty()) { wxMessageBox(_("Account Name Invalid"), _("New Account"), wxOK|wxICON_ERROR, this); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-10-05 21:18:55
|
Revision: 4719 http://sourceforge.net/p/moneymanagerex/code/4719 Author: siena123 Date: 2013-10-05 21:18:52 +0000 (Sat, 05 Oct 2013) Log Message: ----------- Fix - account id -1 Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-05 19:28:10 UTC (rev 4718) +++ trunk/src/mmex.cpp 2013-10-05 21:18:52 UTC (rev 4719) @@ -904,7 +904,7 @@ th.toAccountID_ = q1.TOACCOUNTID; Model_Account::Data* account = Model_Account::instance().get(q1.ACCOUNTID); - Model_Account::Data* to_account = Model_Account::instance().get(q1.TOACCOUNTID); + Model_Account::Data* to_account = (q1.TRANSCODE == TRANS_TYPE_TRANSFER_STR ? Model_Account::instance().get(q1.TOACCOUNTID) : NULL); th.accountName_ = account ? account->ACCOUNTNAME : ""; th.amt_ = q1.TRANSAMOUNT; th.toAmt_ = q1.TOTRANSAMOUNT; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2013-10-05 23:37:47
|
Revision: 4723 http://sourceforge.net/p/moneymanagerex/code/4723 Author: siena123 Date: 2013-10-05 23:37:45 +0000 (Sat, 05 Oct 2013) Log Message: ----------- clean up - free memory Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-05 23:28:51 UTC (rev 4722) +++ trunk/src/mmex.cpp 2013-10-05 23:37:45 UTC (rev 4723) @@ -2038,12 +2038,12 @@ //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 (Home)")); - menu->AppendSeparator(); + wxMenu menu; + 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 (Home)")); + menu.AppendSeparator(); // menu->Append(menuItemOnlineUpdateCurRate_); // menu->AppendSeparator(); @@ -2053,20 +2053,20 @@ wxMenu *exportTo = new wxMenu; exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2CSV, _("&CSV Files...")); exportTo->Append(MENU_TREEPOPUP_ACCOUNT_EXPORT2QIF, _("&QIF Files...")); - menu->AppendSubMenu(exportTo, _("&Export")); + menu.AppendSubMenu(exportTo, _("&Export")); wxMenu *importFrom = new wxMenu; importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTUNIVCSV, _("&CSV Files...")); importFrom->Append(MENU_TREEPOPUP_ACCOUNT_IMPORTQIF, _("&QIF Files...")); - menu->AppendSubMenu(importFrom, _("&Import")); - menu->AppendSeparator(); + 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); + menu.AppendSubMenu(viewAccounts, _("Accounts Visible")); + PopupMenu(&menu, pt); } else { @@ -2075,9 +2075,9 @@ wxString field = customSqlReportSelectedItem_.Mid(6,8); if (field == "_Report_") { - wxMenu* customReportMenu = new wxMenu; - customReportMenu->Append(wxID_EDIT, _("Edit Custom Report")); - PopupMenu(&*customReportMenu, pt); + wxMenu customReportMenu; + customReportMenu.Append(wxID_EDIT, _("Edit Custom Report")); + PopupMenu(&customReportMenu, pt); } else if (iData->getString() == "Budgeting") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-10-06 06:04:47
|
Revision: 4742 http://sourceforge.net/p/moneymanagerex/code/4742 Author: guanlisheng Date: 2013-10-06 06:04:44 +0000 (Sun, 06 Oct 2013) Log Message: ----------- cleanup categoryList_ Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-06 05:58:43 UTC (rev 4741) +++ trunk/src/mmex.cpp 2013-10-06 06:04:44 UTC (rev 4742) @@ -908,9 +908,11 @@ th.toAmt_ = q1.TOTRANSAMOUNT; th.notes_ = q1.NOTES; th.categID_ = q1.CATEGID; - th.categoryStr_ = m_core.get()->categoryList_.GetCategoryName(th.categID_); + Model_Category::Data* category = Model_Category::instance().get(q1.CATEGID); + th.categoryStr_ = category->CATEGNAME; th.subcategID_ = q1.SUBCATEGID; - th.subcategoryStr_ = m_core.get()->categoryList_.GetSubCategoryName(th.categID_, th.subcategID_); + Model_Subcategory::Data* sub_category = Model_Subcategory::instance().get(q1.SUBCATEGID); + th.subcategoryStr_ = Model_Category::full_name(category, sub_category); // DeMultiplex the Auto Executable fields from the db entry: REPEATS int repeats = q1.REPEATS; @@ -994,7 +996,7 @@ tran.notes_ = th.notes_; tran.categID_ = th.categID_; tran.subcategID_ = th.subcategID_; - tran.fullCatStr_ = m_core->categoryList_.GetFullCategoryString(th.categID_, th.subcategID_); + tran.fullCatStr_ = Model_Category::full_name(category, sub_category); tran.date_ = th.nextOccurDate_; tran.toAmt_ = th.toAmt_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-10-06 21:24:59
|
Revision: 4762 http://sourceforge.net/p/moneymanagerex/code/4762 Author: vomikan Date: 2013-10-06 21:24:56 +0000 (Sun, 06 Oct 2013) Log Message: ----------- delete accaunt functions update Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-06 20:17:44 UTC (rev 4761) +++ trunk/src/mmex.cpp 2013-10-06 21:24:56 UTC (rev 4762) @@ -1961,7 +1961,23 @@ , wxYES_NO | wxNO_DEFAULT | wxICON_WARNING); if (msgDlg.ShowModal() == wxID_YES) { - m_core->bTransactionList_.deleteTransactions(account->ACCOUNTID); + //m_core->bTransactionList_.deleteTransactions(account->ACCOUNTID); + Model_Checking::Data_Set transactions = Model_Checking::instance().all(); + for (const auto& transaction : transactions) + { + if (transaction.ACCOUNTID == account->ACCOUNTID || transaction.TOACCOUNTID == account->ACCOUNTID) + { + Model_Checking::instance().remove(transaction.TRANSID, m_core->db_.get()); + } + } + Model_Billsdeposits::Data_Set billsdeposits = Model_Billsdeposits::instance().all(); + for (const auto& billsdeposit : billsdeposits) + { + if (billsdeposit.ACCOUNTID == account->ACCOUNTID || billsdeposit.TOACCOUNTID == account->ACCOUNTID) + { + Model_Checking::instance().remove(billsdeposit.BDID, m_core->db_.get()); + } + } Model_Account::instance().remove(account->ACCOUNTID); updateNavTreeControl(); createHomePage(); @@ -3104,7 +3120,6 @@ { Model_Checking::Data *transaction = Model_Checking::instance().create(); transaction->ACCOUNTID = gotoAccountID_; //m_cp->m_AccountID; - int id = transaction->TRANSID; //id is -1 here Model_Splittransaction::Data_Set split = Model_Checking::splittransaction(transaction); mmTransDialog dlg(transaction, split, this @@ -3731,32 +3746,48 @@ } wxArrayString as; - std::vector<int> arrAcctID; + wxArrayInt arrAcctID; - int idx = 0; - for (const auto& account: Model_Account::instance().all()) + for (const auto& account: Model_Account::instance().all(Model_Account::COL_ACCOUNTNAME)) { as.Add(account.ACCOUNTNAME); - arrAcctID[idx ++] = account.ACCOUNTID; + arrAcctID.Add(account.ACCOUNTID); } wxSingleChoiceDialog scd (this, _("Choose Account to Delete"), _("Accounts"), as); if (scd.ShowModal() == wxID_OK) { - int choice = scd.GetSelection(); - int acctID = arrAcctID[choice]; + int acctID = arrAcctID[scd.GetSelection()]; Model_Account::Data* account = Model_Account::instance().get(acctID); - wxString deletingAccountName = _("Are you sure you want to delete\n") + account->ACCOUNTTYPE + - _(" account: ") + account->ACCOUNTNAME + " ?"; + wxString deletingAccountName = wxString::Format( + _("Are you sure you want to delete\n %s account: %s ?") + , wxGetTranslation(account->ACCOUNTTYPE) + , account->ACCOUNTNAME); wxMessageDialog msgDlg(this, deletingAccountName, _("Confirm Account Deletion"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); if (msgDlg.ShowModal() == wxID_YES) { - m_core->bTransactionList_.deleteTransactions(acctID); + //m_core->bTransactionList_.deleteTransactions(acctID); + //TODO: Before delete account all transaction should be deleted the all repeted transactions too + //Separate function to delete account needed + Model_Checking::Data_Set transactions = Model_Checking::instance().all(); + for (const auto& transaction : transactions) + { + if (transaction.ACCOUNTID == acctID || transaction.TOACCOUNTID == acctID) + { + Model_Checking::instance().remove(transaction.TRANSID, m_core->db_.get()); + } + } + Model_Billsdeposits::Data_Set billsdeposits = Model_Billsdeposits::instance().all(); + for (const auto& billsdeposit : billsdeposits) + { + if (billsdeposit.ACCOUNTID == acctID || billsdeposit.TOACCOUNTID == acctID) + { + Model_Checking::instance().remove(billsdeposit.BDID, m_core->db_.get()); + } + } Model_Account::instance().remove(acctID); - - updateNavTreeControl(); } } updateNavTreeControl(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-10-10 15:42:42
|
Revision: 4825 http://sourceforge.net/p/moneymanagerex/code/4825 Author: vomikan Date: 2013-10-10 15:42:39 +0000 (Thu, 10 Oct 2013) Log Message: ----------- fix for error: 'wxHandleFatalExceptions' was not declared in this scope Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-10 13:30:25 UTC (rev 4824) +++ trunk/src/mmex.cpp 2013-10-10 15:42:39 UTC (rev 4825) @@ -93,7 +93,10 @@ mmGUIApp::mmGUIApp(): m_frame(0), m_setting_db(0), m_optParam("") { - wxHandleFatalExceptions(); // tell the library to call OnFatalException() +#if wxUSE_ON_FATAL_EXCEPTION + // catch fatal exceptions + wxHandleFatalExceptions(true); +#endif } wxLocale& mmGUIApp::getLocale() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-10-11 10:59:22
|
Revision: 4837 http://sourceforge.net/p/moneymanagerex/code/4837 Author: vomikan Date: 2013-10-11 10:59:19 +0000 (Fri, 11 Oct 2013) Log Message: ----------- #if wxUSE_STATUSBAR Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-11 10:37:17 UTC (rev 4836) +++ trunk/src/mmex.cpp 2013-10-11 10:59:19 UTC (rev 4837) @@ -694,7 +694,9 @@ createMenu(); CreateToolBar(wxTB_FLAT | wxTB_NODIVIDER, wxID_ANY, "ToolBar"); createControls(); +#if wxUSE_STATUSBAR CreateStatusBar(); +#endif // wxUSE_STATUSBAR recentFiles_ = new RecentDatabaseFiles(menuRecentFiles_); // Load perspective This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-10-17 06:26:07
|
Revision: 4890 http://sourceforge.net/p/moneymanagerex/code/4890 Author: vomikan Date: 2013-10-17 06:26:00 +0000 (Thu, 17 Oct 2013) Log Message: ----------- typo fix Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-17 04:23:05 UTC (rev 4889) +++ trunk/src/mmex.cpp 2013-10-17 06:26:00 UTC (rev 4890) @@ -1969,11 +1969,11 @@ { for (const auto& transaction : Model_Account::transaction(account)) { - Model_Checking::instance().remove(transaction.TRANSID); + Model_Checking::instance().remove(transaction.TRANSID , m_core->db_.get()); } - for (const auto& billsdeposit : Model_Account::billsdeposit(account)) + for (const auto& billsdeposit : Model_Account::billsdeposits(account)) { - Model_Billsdeposits::instance().remove(billsdeposit.BDID); + Model_Billsdeposits::instance().remove(billsdeposit.BDID, m_core->db_.get()); } Model_Account::instance().remove(account->ACCOUNTID); updateNavTreeControl(); @@ -3771,11 +3771,11 @@ //Separate function to delete account needed for (const auto& transaction : Model_Account::transaction(account)) { - Model_Checking::instance().remove(transaction.TRANSID); + Model_Checking::instance().remove(transaction.TRANSID, m_core->db_.get()); } for (const auto& billsdeposit : Model_Account::billsdeposits(account)) { - Model_Billsdeposits::instance().remove(billsdeposit.BDID); + Model_Billsdeposits::instance().remove(billsdeposit.BDID, m_core->db_.get()); } Model_Account::instance().remove(acctID); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-10-17 14:36:21
|
Revision: 4897 http://sourceforge.net/p/moneymanagerex/code/4897 Author: guanlisheng Date: 2013-10-17 14:36:17 +0000 (Thu, 17 Oct 2013) Log Message: ----------- cleanup wxLogError Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-17 14:34:05 UTC (rev 4896) +++ trunk/src/mmex.cpp 2013-10-17 14:36:17 UTC (rev 4897) @@ -154,7 +154,7 @@ } catch (const std::exception &e) { - wxLogError(wxString::Format("%s", e.what())); + wxLogError("%s", e.what()); } } //---------------------------------------------------------------------------- @@ -232,7 +232,7 @@ } catch (const std::exception &e) { - wxLogError(wxString::Format("%s", e.what())); + wxLogError("%s", e.what()); } return ok; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-10-26 10:55:12
|
Revision: 4981 http://sourceforge.net/p/moneymanagerex/code/4981 Author: vomikan Date: 2013-10-26 10:55:09 +0000 (Sat, 26 Oct 2013) Log Message: ----------- fix for account id value in transaction just created Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-26 10:45:35 UTC (rev 4980) +++ trunk/src/mmex.cpp 2013-10-26 10:55:09 UTC (rev 4981) @@ -3115,7 +3115,7 @@ if (gotoAccountID_ == dlg.getToAccountID() || gotoAccountID_ == dlg.getAccountID()) { refreshRequested_ = true; - createCheckingAccountPage(gotoAccountID_); + createCheckingAccountPage(dlg.getAccountID()); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-10-27 01:29:27
|
Revision: 5004 http://sourceforge.net/p/moneymanagerex/code/5004 Author: guanlisheng Date: 2013-10-27 01:29:22 +0000 (Sun, 27 Oct 2013) Log Message: ----------- cleanup repeated trans Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-10-27 01:07:07 UTC (rev 5003) +++ trunk/src/mmex.cpp 2013-10-27 01:29:22 UTC (rev 5004) @@ -989,28 +989,23 @@ if ( (repeats < 11) || (numRepeats > 0) || (repeats > 14)) { continueExecution = true; - mmBankTransaction tran(m_core.get()); + Model_Checking::Data* tran = Model_Checking::instance().create(); + + tran->ACCOUNTID = q1.ACCOUNTID; + tran->TOACCOUNTID = q1.TOACCOUNTID; + tran->PAYEEID = q1.PAYEEID; + tran->TRANSCODE = q1.TRANSCODE; + tran->TRANSAMOUNT = q1.TRANSAMOUNT; + tran->TOTRANSAMOUNT = q1.TOTRANSAMOUNT; + tran->STATUS = q1.STATUS; + tran->TRANSACTIONNUMBER = q1.TRANSACTIONNUMBER; + tran->NOTES = q1.NOTES; + tran->CATEGID = q1.CATEGID; + tran->SUBCATEGID = q1.SUBCATEGID; + tran->TRANSDATE = q1.NEXTOCCURRENCEDATE; - tran.accountID_ = th.accountID_; - tran.toAccountID_ = th.toAccountID_; - tran.payeeID_ = th.payeeID_; - tran.payeeStr_ = th.payeeStr_; - tran.transType_ = th.transType_; - tran.amt_ = th.amt_; - tran.status_ = q1.STATUS; - tran.transNum_ = q1.TRANSACTIONNUMBER; - tran.notes_ = th.notes_; - tran.categID_ = th.categID_; - tran.subcategID_ = th.subcategID_; - tran.fullCatStr_ = Model_Category::full_name(category, sub_category); - tran.date_ = th.nextOccurDate_; - tran.toAmt_ = th.toAmt_; - - mmSplitTransactionEntries* split(new mmSplitTransactionEntries()); - split->loadFromBDDB(m_core.get(),th.id_); - *tran.splitEntries_ = *split; - - m_core.get()->bTransactionList_.addTransaction(&tran); + Model_Checking::instance().save(tran); + // TODO split } mmDBWrapper::completeBDInSeries(m_db.get(), th.id_); @@ -3141,7 +3136,6 @@ if (Model_Account::instance().all().empty()) return; - //std::vector<mmBankTransaction*> trans; Model_Checking::Data_Set trans; mmFilterTransactionsDialog* dlg= new mmFilterTransactionsDialog(this); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2013-11-03 09:02:06
|
Revision: 5089 http://sourceforge.net/p/moneymanagerex/code/5089 Author: stef145g Date: 2013-11-03 09:02:02 +0000 (Sun, 03 Nov 2013) Log Message: ----------- Fix: Base Currency not being set correctly when creating a new database. Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-11-03 08:53:33 UTC (rev 5088) +++ trunk/src/mmex.cpp 2013-11-03 09:02:02 UTC (rev 5089) @@ -385,7 +385,6 @@ Model_Infotable::instance().Set("DATAVERSION", mmex::DATAVERSION); Model_Infotable::instance().Set("CREATEDATE", wxDateTime::Now()); Model_Infotable::instance().Set("DATEFORMAT", mmex::DEFDATEFORMAT); - Model_Infotable::instance().Set("BASECURRENCYID", 1); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2013-11-03 10:11:38
|
Revision: 5090 http://sourceforge.net/p/moneymanagerex/code/5090 Author: stef145g Date: 2013-11-03 10:11:34 +0000 (Sun, 03 Nov 2013) Log Message: ----------- Correction to Rev 5086: Normal language setting on start-up Revision Links: -------------- http://sourceforge.net/p/moneymanagerex/code/5086 Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-11-03 09:02:02 UTC (rev 5089) +++ trunk/src/mmex.cpp 2013-11-03 10:11:34 UTC (rev 5090) @@ -182,11 +182,12 @@ app->m_setting_db->Open(mmex::getPathUser(mmex::SETTINGS)); Model_Setting::instance(app->m_setting_db); - /* Set MMEX language parameter if it has not been set. */ - if (!Model_Setting::instance().ContainsSetting(LANGUAGE_PARAMETER)) + /* Force setting MMEX language parameter if it has not been set. */ + if (Model_Setting::instance().ContainsSetting(LANGUAGE_PARAMETER)) { - mmSelectLanguage(0, true); + mmSelectLanguage(0, false); } + else mmSelectLanguage(0, true); /* Load Colors from Database */ mmLoadColorsFromDatabase(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-11-03 14:14:11
|
Revision: 5092 http://sourceforge.net/p/moneymanagerex/code/5092 Author: vomikan Date: 2013-11-03 14:14:09 +0000 (Sun, 03 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-11-03 13:04:46 UTC (rev 5091) +++ trunk/src/mmex.cpp 2013-11-03 14:14:09 UTC (rev 5092) @@ -3142,7 +3142,7 @@ continue; // skip } - if (dlg->checkPayee(tran.PAYEEID)) + if (!dlg->checkPayee(tran.PAYEEID)) { continue; // skip } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2013-11-04 08:56:41
|
Revision: 5101 http://sourceforge.net/p/moneymanagerex/code/5101 Author: stef145g Date: 2013-11-04 08:56:38 +0000 (Mon, 04 Nov 2013) Log Message: ----------- Update - remove if statement Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-11-04 03:16:42 UTC (rev 5100) +++ trunk/src/mmex.cpp 2013-11-04 08:56:38 UTC (rev 5101) @@ -183,11 +183,7 @@ Model_Setting::instance(app->m_setting_db); /* Force setting MMEX language parameter if it has not been set. */ - if (Model_Setting::instance().ContainsSetting(LANGUAGE_PARAMETER)) - { - mmSelectLanguage(0, false); - } - else mmSelectLanguage(0, true); + mmSelectLanguage(0, !Model_Setting::instance().ContainsSetting(LANGUAGE_PARAMETER)); /* Load Colors from Database */ mmLoadColorsFromDatabase(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |