From: <vo...@us...> - 2013-04-29 16:15:44
|
Revision: 3804 http://sourceforge.net/p/moneymanagerex/code/3804 Author: vomikan Date: 2013-04-29 16:15:35 +0000 (Mon, 29 Apr 2013) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-04-29 13:49:51 UTC (rev 3803) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-04-29 16:15:35 UTC (rev 3804) @@ -23,6 +23,7 @@ #include "constants.h" //---------------------------------------------------------------------------- #include <wx/srchctrl.h> +#include <algorithm> //---------------------------------------------------------------------------- enum EColumn @@ -106,7 +107,8 @@ class TransactionListCtrl : public wxListCtrl { public: - TransactionListCtrl(mmCheckingPanel *cp, wxWindow *parent,const wxWindowID id, const wxPoint& pos,const wxSize& size, long style); + TransactionListCtrl(mmCheckingPanel *cp, wxWindow *parent + , const wxWindowID id, const wxPoint& pos,const wxSize& size, long style); bool getSortOrder() const { return m_asc; } EColumn getSortColumn() const { return m_sortCol; } @@ -705,9 +707,8 @@ **********************************************************************************/ int numTransactions = 0; std::vector<mmBankTransaction*> account_transPtr; - for (size_t i = 0; i < core_->bTransactionList_.transactions_.size(); ++i) + for (const auto& pBankTransaction: core_->bTransactionList_.transactions_) { - wxSharedPtr<mmBankTransaction> pBankTransaction = core_->bTransactionList_.transactions_[i]; if (pBankTransaction->accountID_ != m_AccountID && (pBankTransaction->toAccountID_ != m_AccountID || pBankTransaction->transType_ != TRANS_TYPE_TRANSFER_STR)) @@ -719,7 +720,6 @@ account_transPtr.push_back(pBankTransaction.get()); bool toAdd = true; -// bool getBal = false; if (transFilterActive_) { @@ -761,7 +761,9 @@ Stage 2 Sort all account transactions by date to, determine balances. **********************************************************************************/ -// std::sort(account_transPtr.begin(), account_transPtr.end(), sortTransByDateAsc); + /*std::sort(account_transPtr.begin(), account_transPtr.end() + , [&] (const wxSharedPtr<mmBankTransaction>& i, const wxSharedPtr<mmBankTransaction>& j) + { return (i->date_ < j->date_); });*/ /********************************************************************************** Stage 3 @@ -807,11 +809,14 @@ Find selected item and set focus to it. **********************************************************************************/ - for (size_t i=0; i<m_trans.size(); ++i ) + long i = 0; + for (const auto & pTrans : m_trans) { - if (trans_id == m_trans[i]->transactionID() && trans_id > 0) { - m_listCtrlAccount->m_selectedIndex = (int)i; + if (trans_id == pTrans->transactionID() && trans_id > 0) { + m_listCtrlAccount->m_selectedIndex = i; + break; } + ++i; } if (m_trans.size() > 0 && m_listCtrlAccount->m_selectedIndex < 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-05-12 20:22:31
|
Revision: 3899 http://sourceforge.net/p/moneymanagerex/code/3899 Author: vomikan Date: 2013-05-12 20:22:27 +0000 (Sun, 12 May 2013) Log Message: ----------- Deselect item imitation Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-05-12 18:40:19 UTC (rev 3898) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-05-12 20:22:27 UTC (rev 3899) @@ -150,6 +150,7 @@ virtual wxListItemAttr *OnGetItemAttr(long item) const; void OnListRightClick(wxMouseEvent& event); + void OnListLeftClick(wxMouseEvent& event); void OnItemResize(wxListEvent& event); void OnListItemSelected(wxListEvent& event); void OnListItemDeselected(wxListEvent& event); @@ -188,7 +189,8 @@ EVT_LIST_ITEM_DESELECTED(ID_PANEL_CHECKING_LISTCTRL_ACCT, TransactionListCtrl::OnListItemDeselected) EVT_LIST_ITEM_ACTIVATED(ID_PANEL_CHECKING_LISTCTRL_ACCT, TransactionListCtrl::OnListItemActivated) //EVT_LIST_ITEM_RIGHT_CLICK(ID_PANEL_CHECKING_LISTCTRL_ACCT, TransactionListCtrl::OnItemRightClick) - EVT_MOUSE_EVENTS(TransactionListCtrl::OnListRightClick) + EVT_RIGHT_DOWN(TransactionListCtrl::OnListRightClick) + EVT_LEFT_DOWN(TransactionListCtrl::OnListLeftClick) EVT_LIST_COL_END_DRAG(ID_PANEL_CHECKING_LISTCTRL_ACCT, TransactionListCtrl::OnItemResize) EVT_LIST_COL_CLICK(ID_PANEL_CHECKING_LISTCTRL_ACCT, TransactionListCtrl::OnColClick) EVT_LIST_KEY_DOWN(ID_PANEL_CHECKING_LISTCTRL_ACCT, TransactionListCtrl::OnListKeyDown) @@ -722,7 +724,7 @@ account_transPtr.push_back(pBankTransaction.get()); bool toAdd = true; - + if (transFilterActive_) { toAdd = transFilterDlg_->somethingSelected(); // remove transaction from list and add if wanted. @@ -1058,23 +1060,28 @@ int current_width = m_cp->m_listCtrlAccount->GetColumnWidth(i); m_cp->core_->iniSettings_->SetIntSetting(parameter_name, current_width); } -void TransactionListCtrl::OnListRightClick(wxMouseEvent& event) + +void TransactionListCtrl::OnListLeftClick(wxMouseEvent& event) { - - if (event.GetButton() != wxMOUSE_BTN_RIGHT) + if (m_selectedIndex > -1) { - event.Skip(); - return; + if (m_cp->m_listCtrlAccount->GetItemState(m_selectedIndex, wxLIST_STATE_SELECTED) == 0) + m_cp->updateExtraTransactionData(-1); } + event.Skip(); +} +void TransactionListCtrl::OnListRightClick(wxMouseEvent& event) +{ + long selectedIndex = m_selectedIndex; if (m_selectedIndex > -1) - { + { if (m_cp->m_listCtrlAccount->GetItemState(m_selectedIndex, wxLIST_STATE_SELECTED) == 0) selectedIndex = -1; } + bool hide_menu_item = (selectedIndex < 0); - wxMenu menu; menu.Append(MENU_TREEPOPUP_NEW, _("&New Transaction")); menu.AppendSeparator(); @@ -1597,7 +1604,7 @@ pTransaction = m_cp->core_->bTransactionList_.getBankTransactionPtr( m_cp->m_AccountID, m_cp->m_trans[m_selectedIndex]->transactionID() ); - + // Looking at transaction from A end. Transaction is a deposit, withdrawal or transfer. if (m_cp->m_AccountID == pTransaction->accountID_) pTransaction->accountID_ = toAccountID; @@ -1605,7 +1612,7 @@ // Looking at transaction from b end. Transaction is a transfer if (m_cp->m_AccountID == pTransaction->toAccountID_) pTransaction->toAccountID_ = toAccountID; - + // Update the transaction m_cp->core_->bTransactionList_.UpdateTransaction(pTransaction); refreshVisualList(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-05-18 09:23:40
|
Revision: 3932 http://sourceforge.net/p/moneymanagerex/code/3932 Author: vomikan Date: 2013-05-18 09:23:37 +0000 (Sat, 18 May 2013) Log Message: ----------- fix for visible item Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-05-18 07:00:51 UTC (rev 3931) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-05-18 09:23:37 UTC (rev 3932) @@ -691,7 +691,8 @@ header_text_->SetLabel(wxString::Format(_("Account View : %s"), pAccount->name_)); filteredBalance_ = 0.0; - + + //TODO: Stages 1-4 go away to proper place (TTransactionList) /********************************************************************************** Stage 1 For the account being viewed, we need to get: @@ -801,15 +802,17 @@ Stage 5 Find selected item and set focus to it. **********************************************************************************/ - - long i = 0; - for (const auto & pTrans : m_trans) + if (m_listCtrlAccount->m_selectedIndex > -1) { - if (trans_id == pTrans->transactionID() && trans_id > 0) { - m_listCtrlAccount->m_selectedIndex = i; - break; + long i = 0; + for (const auto & pTrans : m_trans) + { + if (trans_id == pTrans->transactionID() && trans_id > 0) { + m_listCtrlAccount->m_selectedIndex = i; + break; + } + ++i; } - ++i; } if (m_trans.size() > 0 && m_listCtrlAccount->m_selectedIndex < 0) @@ -1547,6 +1550,11 @@ if (m_selectedIndex >= (long)m_cp->m_trans.size() || m_selectedIndex < 0) m_selectedIndex = g_asc ? (long)m_cp->m_trans.size() - 1 : 0; + if (topItemIndex_ < m_selectedIndex) topItemIndex_ = m_selectedIndex; + + //debuger + //wxLogDebug(wxString("id:")<<trans_id<<"|top:"<<topItemIndex_<<"|selected:"<<m_selectedIndex); + if (m_cp->m_trans.size() > 0) { RefreshItems(0, m_cp->m_trans.size() - 1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-06-13 18:39:19
|
Revision: 4069 http://sourceforge.net/p/moneymanagerex/code/4069 Author: vomikan Date: 2013-06-13 18:39:16 +0000 (Thu, 13 Jun 2013) Log Message: ----------- sort function update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-06-13 14:17:15 UTC (rev 4068) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-06-13 18:39:16 UTC (rev 4069) @@ -282,7 +282,97 @@ void mmCheckingPanel::sortTable() { -// TODO sorting w/ ORM using database directly + std::sort(this->m_trans.begin(), this->m_trans.end()); // default sorter + if (g_sortcol == COL_DATE_OR_TRANSACTION_ID && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->date_ < y->date_; }); + } + else if (g_sortcol == COL_DATE_OR_TRANSACTION_ID && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->date_ > y->date_; }); + } + else if (g_sortcol == COL_TRANSACTION_NUMBER && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->transNum_ < y->transNum_; }); + } + else if (g_sortcol == COL_TRANSACTION_NUMBER && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->transNum_ > y->transNum_; }); + } + else if (g_sortcol == COL_PAYEE_STR && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->payeeStr_ < y->payeeStr_; }); + } + else if (g_sortcol == COL_PAYEE_STR && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->payeeStr_ > y->payeeStr_; }); + } + else if (g_sortcol == COL_STATUS && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->status_ < y->status_; }); + } + else if (g_sortcol == COL_STATUS && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->status_ > y->status_; }); + } + else if (g_sortcol == COL_CATEGORY && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->fullCatStr_ < y->fullCatStr_; }); + } + else if (g_sortcol == COL_CATEGORY && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->fullCatStr_ > y->fullCatStr_; }); + } + /*else if (g_sortcol == COL_WITHDRAWAL && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->balance_ < y->balance_; }); + } + else if (g_sortcol == COL_WITHDRAWAL && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->balance_ > y->balance_; }); + } + else if (g_sortcol == COL_DEPOSIT && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->balance_ < y->balance_; }); + } + else if (g_sortcol == COL_DEPOSIT && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->balance_ > y->balance_; }); + }*/ + else if (g_sortcol == COL_BALANCE && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->balance_ < y->balance_; }); + } + else if (g_sortcol == COL_BALANCE && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->balance_ > y->balance_; }); + } + else if (g_sortcol == COL_NOTES && g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->notes_ < y->notes_; }); + } + else if (g_sortcol == COL_NOTES && !g_asc) + { + std::stable_sort(this->m_trans.begin(), this->m_trans.end() + , [] (const mmBankTransaction* x, const mmBankTransaction* y) { return x->notes_ > y->notes_; }); + } } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2010-08-31 08:00:05
|
Revision: 1001 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1001&view=rev Author: vomikan Date: 2010-08-31 07:59:59 +0000 (Tue, 31 Aug 2010) Log Message: ----------- a bit updated Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2010-08-30 12:57:48 UTC (rev 1000) +++ trunk/mmex/src/mmcheckingpanel.cpp 2010-08-31 07:59:59 UTC (rev 1001) @@ -699,8 +699,8 @@ itemButton6->SetToolTip(_("New Transaction")); wxFont fnt = itemButton6->GetFont(); - fnt.SetWeight(wxFONTWEIGHT_BOLD); - fnt.SetPointSize(fnt.GetPointSize()*3/2); + fnt.SetWeight(wxFONTWEIGHT_NORMAL); + fnt.SetPointSize(fnt.GetPointSize()); itemButton6->SetFont(fnt); itemButton6->SetForegroundColour(wxColour(wxT("FOREST GREEN"))); @@ -744,9 +744,9 @@ if (selIndex!=-1) { enableEditDeleteButtons(true); - //wxString notes = getItem(selIndex, 4); // Category:Subcategory + //wxString notes = getItem(selIndex, COL_CATEGORY); // Category:Subcategory //notes = notes + wxT("\n"); - wxString notes = getItem(selIndex, 8); //Notes + wxString notes = getItem(selIndex, COL_NOTES); //Notes text = notes; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2010-12-02 13:46:02
|
Revision: 1018 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1018&view=rev Author: vomikan Date: 2010-12-02 13:45:56 +0000 (Thu, 02 Dec 2010) Log Message: ----------- Buttons color changed Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2010-12-02 13:42:00 UTC (rev 1017) +++ trunk/mmex/src/mmcheckingpanel.cpp 2010-12-02 13:45:56 UTC (rev 1018) @@ -716,14 +716,14 @@ wxButton* itemButton7 = new wxButton(itemPanel12, ID_BUTTON_EDIT_TRANS, _("&Edit")); itemButton7->SetToolTip(_("Edit selected transaction")); itemButton7->SetFont(fnt); - itemButton7->SetForegroundColour(wxColour(wxT("SALMON"))); + itemButton7->SetForegroundColour(wxColour(wxT("ORANGE"))); itemBoxSizer5->Add(itemButton7, flags); itemButton7->Enable(false); wxButton* itemButton8 = new wxButton(itemPanel12, ID_BUTTON_DELETE_TRANS, _("&Delete")); itemButton8->SetToolTip(_("Delete selected transaction")); itemButton8->SetFont(fnt); - itemButton8->SetForegroundColour(wxColour(wxT("ORANGE"))); // FIREBRICK + itemButton8->SetForegroundColour(wxColour(wxT("RED"))); itemBoxSizer5->Add(itemButton8, flags); itemButton8->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-08 12:02:22
|
Revision: 1026 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1026&view=rev Author: stef145g Date: 2010-12-08 12:02:15 +0000 (Wed, 08 Dec 2010) Log Message: ----------- Bug Fix: Correct balances in "View transactions for last month" on Account View Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2010-12-02 14:57:36 UTC (rev 1025) +++ trunk/mmex/src/mmcheckingpanel.cpp 2010-12-08 12:02:15 UTC (rev 1026) @@ -564,11 +564,11 @@ menu.Append(MENU_VIEW_FLAGGED, _("View Flagged Transactions")); menu.Append(MENU_VIEW_DUPLICATE, _("View Duplicate Transactions")); menu.AppendSeparator(); - menu.Append(MENU_VIEW_TODAY, _("View Transactions from today")); - menu.Append(MENU_VIEW_LAST30, _("View Transactions from last 30 days")); - menu.Append(MENU_VIEW_CURRENTMONTH, _("View Transactions from current month")); - menu.Append(MENU_VIEW_LASTMONTH, _("View Transactions from last month")); - menu.Append(MENU_VIEW_LAST3MONTHS, _("View Transactions from last 3 months")); + menu.Append(MENU_VIEW_TODAY, _("View Transactions for today")); + menu.Append(MENU_VIEW_LAST30, _("View Transactions for last 30 days")); + menu.Append(MENU_VIEW_CURRENTMONTH, _("View Transactions for current month")); + menu.Append(MENU_VIEW_LASTMONTH, _("View Transactions for last month")); + menu.Append(MENU_VIEW_LAST3MONTHS, _("View Transactions for last 3 months")); menu.AppendSeparator(); menu.Append(MENU_VIEW_DELETE_TRANS, _("Delete all transactions in current view")); menu.Append(MENU_VIEW_DELETE_FLAGGED, _("Delete all flagged transactions")); @@ -849,7 +849,7 @@ map[wxT("View 30 days")] = TransactionMatchData(TransactionPtr_MatcherPtr(new MatchTransaction_DateTime<DateTimeProviders::LastDays<30> >()), true); map[wxT("View 90 days")] = TransactionMatchData(TransactionPtr_MatcherPtr(new MatchTransaction_DateTime<DateTimeProviders::LastDays<90> >()), true); map[wxT("View Current Month")] = TransactionMatchData(TransactionPtr_MatcherPtr(new MatchTransaction_DateTime<DateTimeProviders::CurrentMonth<> >()), true); - map[wxT("View Last Month")] = TransactionMatchData(TransactionPtr_MatcherPtr(new MatchTransaction_DateTime<DateTimeProviders::LastMonths<1, 1> >()), true); + map[wxT("View Last Month")] = TransactionMatchData(TransactionPtr_MatcherPtr(new MatchTransaction_DateTime<DateTimeProviders::LastMonths<1, 0> >()), true); map[wxT("View Last 3 Months")] = TransactionMatchData(TransactionPtr_MatcherPtr(new MatchTransaction_DateTime<DateTimeProviders::LastMonths<2> >()), true); return map; @@ -910,6 +910,18 @@ } } + if ( m_currentView == wxT("View Last Month") ) + { + if (toAdd) + { + if ( pBankTransaction->date_.GetMonth() == wxDateTime::Now().GetMonth() ) + { + toAdd = false; // remove the current months transaction from the list. + getBal = false; // do not add these to the unseenBalance + } + } + } + if (toAdd) { m_trans.push_back(pBankTransaction.get()); @@ -1076,23 +1088,23 @@ } else if (m_currentView == wxT("View Today")) { - header->SetLabel(_("Viewing transactions from today")); + header->SetLabel(_("Viewing transactions for today")); } else if (m_currentView == wxT("View 30 days")) { - header->SetLabel(_("Viewing transactions from last 30 days")); + header->SetLabel(_("Viewing transactions for last 30 days")); } else if (m_currentView == wxT("View 90 days")) { - header->SetLabel(_("Viewing transactions from last 3 months")); + header->SetLabel(_("Viewing transactions for last 3 months")); } else if (m_currentView == wxT("View Current Month")) { - header->SetLabel(_("Viewing transactions from current month")); + header->SetLabel(_("Viewing transactions for current month")); } else if (m_currentView == wxT("View Last Month")) { - header->SetLabel(_("Viewing transactions from last month")); + header->SetLabel(_("Viewing transactions for last month")); } else if (m_currentView == wxT("View Not-Reconciled")) { @@ -1132,27 +1144,27 @@ } else if (evt == MENU_VIEW_TODAY) { - header->SetLabel(_("Viewing transactions from today")); + header->SetLabel(_("Viewing transactions for today")); m_currentView = wxT("View Today"); } else if (evt == MENU_VIEW_LAST30) { - header->SetLabel(_("Viewing transactions from last 30 days")); + header->SetLabel(_("Viewing transactions for last 30 days")); m_currentView = wxT("View 30 days"); } else if (evt == MENU_VIEW_LAST3MONTHS) { - header->SetLabel(_("Viewing transactions from last 3 months")); + header->SetLabel(_("Viewing transactions for last 3 months")); m_currentView = wxT("View 90 days"); } else if (evt == MENU_VIEW_CURRENTMONTH) { - header->SetLabel(_("Viewing transactions from current month")); + header->SetLabel(_("Viewing transactions for current month")); m_currentView = wxT("View Current Month"); } else if (evt == MENU_VIEW_LASTMONTH) { - header->SetLabel(_("Viewing transactions from last month")); + header->SetLabel(_("Viewing transactions for last month")); m_currentView = wxT("View Last Month"); } else if (evt == MENU_VIEW_DUPLICATE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-01-09 08:33:56
|
Revision: 1078 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1078&view=rev Author: stef145g Date: 2011-01-09 08:33:49 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Checking panel column sorts for: Payee, Status, and Category, added a secondary sort by Date. Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-01-08 14:34:16 UTC (rev 1077) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-01-09 08:33:49 UTC (rev 1078) @@ -207,7 +207,14 @@ */ bool sortTransByPayee(const mmBankTransaction *t1, const mmBankTransaction *t2, bool asc) { - return sort(t1->payeeStr_, t2->payeeStr_, asc); +// Primary sort by Payee, secondary sort by Date. + bool res = false; + if (t1->payeeStr_ == t2->payeeStr_) + res = sort(t1->date_, t2->date_, asc); + else + res = sort(t1->payeeStr_, t2->payeeStr_, asc); + + return res; } //---------------------------------------------------------------------------- @@ -216,7 +223,14 @@ */ bool sortTransByStatus(const mmBankTransaction *t1, const mmBankTransaction *t2, bool asc) { - return sort(t1->status_, t2->status_, asc); +// Primary sort by Status, Secondary sort by Date. + bool res = false; + if (t1->status_ == t2->status_) + res = sort(t1->date_, t2->date_, asc); + else + res = sort(t1->status_, t2->status_, asc); + + return res; } //---------------------------------------------------------------------------- @@ -225,7 +239,14 @@ */ bool sortTransByCateg(const mmBankTransaction *t1, const mmBankTransaction *t2, bool asc) { - return sort(t1->fullCatStr_, t2->fullCatStr_, asc); +// Primary sort by Category, Secondary sort by Date. + bool res = false; + if (t1->fullCatStr_ == t2->fullCatStr_) + res = sort(t1->date_, t2->date_, asc); + else + res = sort(t1->fullCatStr_, t2->fullCatStr_, asc); + + return res; } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-03-27 03:18:52
|
Revision: 1209 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1209&view=rev Author: stef145g Date: 2011-03-27 03:18:46 +0000 (Sun, 27 Mar 2011) Log Message: ----------- fix jumping to bottom when using key to reconcile accounts on large dataset. Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-03-26 21:47:20 UTC (rev 1208) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-03-27 03:18:46 UTC (rev 1209) @@ -1599,26 +1599,29 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event) { - if (m_selectedIndex == -1) //check if a transaction is selected + if (m_selectedIndex == -1) //check if a transaction is selected return; - //Read status of the selected transaction first - wxString status = m_cp->m_trans[m_selectedIndex]->status_; + //find the topmost visible item - this will be used to set + // where to display the list again after refresh + long topItemIndex = GetTopItem(); + + //Read status of the selected transaction first + wxString status = m_cp->m_trans[m_selectedIndex]->status_; + if (!wxGetKeyState(WXK_COMMAND) && !wxGetKeyState(WXK_ALT) && !wxGetKeyState(WXK_CONTROL)) { + // new style + int keycode = event.GetKeyCode(); + char key = '\0'; + if (keycode < 256) + { + // TODO: Unicode in non-Unicode mode ?? + key = (char)keycode; + } - // new style - int keycode = event.GetKeyCode(); - char key = '\0'; - if (keycode < 256) - { - // TODO: Unicode in non-Unicode mode ?? - key = (char)keycode; - } - - - switch ( key ) - { + switch ( key ) + { case 'v': case 'V': { @@ -1654,7 +1657,8 @@ OnMarkTransaction(evt); } } break; - case 'd': + + case 'd': case 'D': { if (status != wxT("D")) { @@ -1663,7 +1667,7 @@ } break; -/* case WXK_DELETE: +/* case WXK_DELETE: case WXK_NUMPAD_DELETE: { @@ -1671,14 +1675,27 @@ OnDeleteTransaction(evt); } break;*/ - } + + } // end switch - -// default: +// default: if (key == WXK_DELETE || key == WXK_NUMPAD_DELETE) - {wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_TREEPOPUP_DELETE); - OnDeleteTransaction(evt);} - } else { event.Skip();} + { + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_TREEPOPUP_DELETE); + OnDeleteTransaction(evt); + } + } + else + { + event.Skip(); + } + + //set the deleted transaction index to the new selection and focus on it + SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED, + wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED); + //make sure the topmost item before transaction deletion is visible, otherwise + // the control will go back to the very top or bottom when refreshed + EnsureVisible(topItemIndex); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-04-10 03:07:03
|
Revision: 1223 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1223&view=rev Author: stef145g Date: 2011-04-10 03:06:57 +0000 (Sun, 10 Apr 2011) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-04-10 00:29:20 UTC (rev 1222) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-04-10 03:06:57 UTC (rev 1223) @@ -401,9 +401,9 @@ bool m_asc; /* required overrides for virtual style list control */ - wxString OnGetItemText(long item, long column) const; - int OnGetItemColumnImage(long item, long column) const; - wxListItemAttr *OnGetItemAttr(long item) const; + virtual wxString OnGetItemText(long item, long column) const; + virtual int OnGetItemColumnImage(long item, long column) const; + virtual wxListItemAttr *OnGetItemAttr(long item) const; void OnItemRightClick(wxListEvent& event); void OnListItemSelected(wxListEvent& event); @@ -602,7 +602,7 @@ menu.Append(MENU_VIEW_LAST3MONTHS, _("View Transactions for last 3 months")); menu.AppendSeparator(); menu.Append(MENU_VIEW_DELETE_TRANS, _("Delete all transactions in current view")); - menu.Append(MENU_VIEW_DELETE_FLAGGED, _("Delete all flagged transactions")); + menu.Append(MENU_VIEW_DELETE_FLAGGED, _("Delete all \"Follow Up\" transactions")); PopupMenu(&menu, event.GetPosition()); @@ -1248,7 +1248,7 @@ } else if (evt == MENU_VIEW_DELETE_FLAGGED) { - wxMessageDialog msgDlg(this, _("Do you really want to delete all the flagged transactions?"), _("Confirm Transaction Deletion"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); + wxMessageDialog msgDlg(this, _("Do you really want to delete all the \"Follow Up\" transactions?"), _("Confirm Transaction Deletion"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); if (msgDlg.ShowModal() == wxID_YES) { //mmCheckingAccount* pAccount = dynamic_cast<mmCheckingAccount*>(m_core->accountList_.getAccountSharedPtr(m_AccountID).get()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-04-10 11:34:59
|
Revision: 1224 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1224&view=rev Author: stef145g Date: 2011-04-10 11:34:53 +0000 (Sun, 10 Apr 2011) Log Message: ----------- Change and relocation of transfer transaction icons Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-04-10 03:06:57 UTC (rev 1223) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-04-10 11:34:53 UTC (rev 1224) @@ -36,6 +36,8 @@ #include "../resources/downarrow.xpm" #include "../resources/rightarrow.xpm" #include "../resources/duplicate.xpm" +#include "../resources/trans_withdrawal.xpm" +#include "../resources/trans_deposit.xpm" #include "../resources/trans_transfer.xpm" //---------------------------------------------------------------------------- @@ -71,6 +73,8 @@ ICON_DESC, ICON_ASC, ICON_DUPLICATE, + ICON_TRANS_WITHDRAWAL, + ICON_TRANS_DEPOSIT, ICON_TRANS_TRANSFER }; //---------------------------------------------------------------------------- @@ -672,6 +676,8 @@ m_imageList->Add(wxBitmap(uparrow_xpm)); m_imageList->Add(wxBitmap(downarrow_xpm)); m_imageList->Add(wxBitmap(duplicate_xpm)); + m_imageList->Add(wxBitmap(trans_withdrawal_xpm)); + m_imageList->Add(wxBitmap(trans_deposit_xpm)); m_imageList->Add(wxBitmap(trans_transfer_xpm)); m_listCtrlAccount = new MyListCtrl( this, itemSplitterWindow10, @@ -1519,14 +1525,17 @@ } } - if(column == COL_BALANCE) + if(column == COL_PAYEE_STR) { size_t index = item; bool ok = m_cp && index < m_cp->m_trans.size(); mmBankTransaction *tr = ok ? m_cp->m_trans[index] : 0; if (tr->transType_ == TRANS_TYPE_TRANSFER) { - res = ICON_TRANS_TRANSFER; + if ( tr->accountID_ == m_cp->accountID() ) + res = ICON_TRANS_WITHDRAWAL; + else + res = ICON_TRANS_DEPOSIT; } } return res; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-05-03 17:50:09
|
Revision: 1260 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1260&view=rev Author: vomikan Date: 2011-05-03 17:50:03 +0000 (Tue, 03 May 2011) Log Message: ----------- a bit fixed Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-05-03 09:21:27 UTC (rev 1259) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-05-03 17:50:03 UTC (rev 1260) @@ -821,6 +821,7 @@ "cf.CURRENCYNAME as CURRENCYNAME, tcf.CURRENCYNAME as TOCURRENCYNAME, " "cf.CURRENCYID as CURRENCYID, tcf.CURRENCYID as TOCURRENCYID, " "cf.BASECONVRATE as BASECONVRATE, " + "tcf.BASECONVRATE as TOBASECONVRATE, " "c.ACCOUNTID as ACCOUNTID, " "c.TOACCOUNTID as TOACCOUNTID, " "i.infovalue as BASECURRENCYID " @@ -844,6 +845,8 @@ int currencyid = q1.GetInt(wxT("CURRENCYID")); double amount = q1.GetDouble(wxT("TRANSAMOUNT")); wxString amountStr; + double convrate = q1.GetDouble(wxT("BASECONVRATE")); + double toconvrate = q1.GetDouble(wxT("TOBASECONVRATE")); wxString infoStr = wxT(""); if (transcodeStr == wxT("Transfer")) @@ -851,7 +854,8 @@ int tocurrencyid = q1.GetInt(wxT("TOCURRENCYID")); double toamount = q1.GetDouble(wxT("TOTRANSAMOUNT")); wxString toamountStr; - double convertion = (tocurrencyid == basecurrencyid ? toamount/amount : amount/toamount); + double convertion; + convertion = ( convrate < toconvrate ? amount/toamount : toamount/amount); wxString convertionStr; int toaccountId = q1.GetInt(wxT("TOACCOUNTID")); @@ -859,7 +863,6 @@ wxASSERT(pCurrencyPtr); mmex::CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); mmex::formatDoubleToCurrency(toamount, toamountStr); - if (tocurrencyid == basecurrencyid) mmex::formatDoubleToCurrencyEdit(convertion, convertionStr); int accountId = q1.GetInt(wxT("ACCOUNTID")); @@ -872,15 +875,15 @@ infoStr << amountStr << wxT(" -> ") << toamountStr ; - if (tocurrencyid != currencyid) + if (tocurrencyid != currencyid) { infoStr << wxT(" ("); - if (currencyid == basecurrencyid) - {infoStr << wxT("1") << tocurrencynameStr << wxT(" = ") << convertionStr << currencynameStr;} + if (currencyid != basecurrencyid && tocurrencyid != basecurrencyid) + {infoStr << wxT("1") << tocurrencynameStr << wxT(" 1= ") << convertionStr << currencynameStr;} else if (tocurrencyid == basecurrencyid) - {infoStr << wxT("1") << currencynameStr << wxT(" = ") << convertionStr << tocurrencynameStr;} + {infoStr << wxT("1") << currencynameStr << wxT(" 2= ") << convertionStr << tocurrencynameStr;} else - {infoStr << wxT("1") << tocurrencynameStr << wxT(" = ") << convertionStr << currencynameStr;} + {infoStr << wxT("1") << tocurrencynameStr << wxT(" 3= ") << convertionStr << currencynameStr;} infoStr << wxT(")"); } } @@ -888,7 +891,6 @@ { if (currencyid != basecurrencyid) //Show nothing if account currency is base { - double convrate = q1.GetDouble(wxT("BASECONVRATE")); //load settings for base currency wxString currencyName = mmDBWrapper::getCurrencyName(m_core->db_.get(), basecurrencyid); boost::shared_ptr<mmCurrency> pCurrency = m_core->currencyList_.getCurrencySharedPtr(currencyName); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-05-04 06:55:46
|
Revision: 1261 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1261&view=rev Author: vomikan Date: 2011-05-04 06:55:37 +0000 (Wed, 04 May 2011) Log Message: ----------- mini info fixed Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-05-03 17:50:03 UTC (rev 1260) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-05-04 06:55:37 UTC (rev 1261) @@ -847,6 +847,8 @@ wxString amountStr; double convrate = q1.GetDouble(wxT("BASECONVRATE")); double toconvrate = q1.GetDouble(wxT("TOBASECONVRATE")); + int accountId = q1.GetInt(wxT("ACCOUNTID")); + int toaccountId = q1.GetInt(wxT("TOACCOUNTID")); wxString infoStr = wxT(""); if (transcodeStr == wxT("Transfer")) @@ -858,33 +860,33 @@ convertion = ( convrate < toconvrate ? amount/toamount : toamount/amount); wxString convertionStr; - int toaccountId = q1.GetInt(wxT("TOACCOUNTID")); boost::shared_ptr<mmCurrency> pCurrencyPtr = m_core->accountList_.getCurrencyWeakPtr(toaccountId).lock(); wxASSERT(pCurrencyPtr); mmex::CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); mmex::formatDoubleToCurrency(toamount, toamountStr); mmex::formatDoubleToCurrencyEdit(convertion, convertionStr); - int accountId = q1.GetInt(wxT("ACCOUNTID")); pCurrencyPtr = m_core->accountList_.getCurrencyWeakPtr(accountId).lock(); wxASSERT(pCurrencyPtr); mmex::CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); mmex::formatDoubleToCurrency(amount, amountStr); - if (currencyid == basecurrencyid) + //if (currencyid == basecurrencyid) mmex::formatDoubleToCurrencyEdit(convertion, convertionStr); infoStr << amountStr << wxT(" -> ") << toamountStr ; if (tocurrencyid != currencyid) { - infoStr << wxT(" ("); - if (currencyid != basecurrencyid && tocurrencyid != basecurrencyid) - {infoStr << wxT("1") << tocurrencynameStr << wxT(" 1= ") << convertionStr << currencynameStr;} - else if (tocurrencyid == basecurrencyid) - {infoStr << wxT("1") << currencynameStr << wxT(" 2= ") << convertionStr << tocurrencynameStr;} + infoStr << wxT(" ( 1 "); + if (accountId == m_AccountID && convrate < toconvrate) + {infoStr << tocurrencynameStr << wxT(" = ") << convertionStr << wxT(" ") << currencynameStr;} + else if (accountId == m_AccountID && convrate > toconvrate) + {infoStr << currencynameStr << wxT(" = ") << convertionStr << wxT(" ") << tocurrencynameStr;} + else if (accountId != m_AccountID && convrate < toconvrate) + {infoStr << tocurrencynameStr << wxT(" = ") << convertionStr << wxT(" ") << currencynameStr;} else - {infoStr << wxT("1") << tocurrencynameStr << wxT(" 3= ") << convertionStr << currencynameStr;} - infoStr << wxT(")"); + {infoStr << currencynameStr << wxT(" = ") << convertionStr << wxT(" ") << tocurrencynameStr;} + infoStr << wxT(" )"); } } else //For deposits and withdrawals calculates amount in base currency @@ -895,10 +897,17 @@ wxString currencyName = mmDBWrapper::getCurrencyName(m_core->db_.get(), basecurrencyid); boost::shared_ptr<mmCurrency> pCurrency = m_core->currencyList_.getCurrencySharedPtr(currencyName); wxASSERT(pCurrency); + wxString basecuramountStr; mmDBWrapper::loadSettings(m_core->db_.get(), pCurrency->currencyID_); - mmex::formatDoubleToCurrency(amount*convrate, amountStr); + mmex::formatDoubleToCurrency(amount*convrate, basecuramountStr); + + pCurrency = m_core->accountList_.getCurrencyWeakPtr(accountId).lock(); + wxASSERT(pCurrencyPtr); + mmex::CurrencyFormatter::instance().loadSettings(*pCurrency); + mmex::formatDoubleToCurrency(amount, amountStr); + //output - infoStr << _("Amount in the base currency:") << wxT(" ") << amountStr; + infoStr << amountStr << wxT(" = ") << basecuramountStr; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-05-04 12:00:31
|
Revision: 1262 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1262&view=rev Author: vomikan Date: 2011-05-04 12:00:25 +0000 (Wed, 04 May 2011) Log Message: ----------- fixed error C2065: 'pCurrencyPtr' : undeclared identifier Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-05-04 06:55:37 UTC (rev 1261) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-05-04 12:00:25 UTC (rev 1262) @@ -902,7 +902,7 @@ mmex::formatDoubleToCurrency(amount*convrate, basecuramountStr); pCurrency = m_core->accountList_.getCurrencyWeakPtr(accountId).lock(); - wxASSERT(pCurrencyPtr); + wxASSERT(pCurrency); mmex::CurrencyFormatter::instance().loadSettings(*pCurrency); mmex::formatDoubleToCurrency(amount, amountStr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-05-20 10:17:40
|
Revision: 1284 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1284&view=rev Author: vomikan Date: 2011-05-20 10:17:34 +0000 (Fri, 20 May 2011) Log Message: ----------- my mistake fixed Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-05-20 08:22:33 UTC (rev 1283) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-05-20 10:17:34 UTC (rev 1284) @@ -1874,7 +1874,6 @@ //initialize the transaction list to redo balances and images m_cp->initVirtualListControl(false); -return; if (!m_cp->m_trans.empty()) { //refresh the items showing from the point of the transaction delete down //the transactions above the deleted transaction won't change so they This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-06-01 18:33:46
|
Revision: 1303 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1303&view=rev Author: vomikan Date: 2011-06-01 18:33:39 +0000 (Wed, 01 Jun 2011) Log Message: ----------- delete all viewed transactions changed and right click menu changed Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-06-01 05:26:30 UTC (rev 1302) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-06-01 18:33:39 UTC (rev 1303) @@ -470,16 +470,16 @@ EVT_MENU(MENU_TREEPOPUP_MARK_ADD_FLAG_FOLLOWUP, MyListCtrl::OnMarkTransaction) EVT_MENU(MENU_TREEPOPUP_MARKDUPLICATE, MyListCtrl::OnMarkTransaction) - EVT_MENU(MENU_TREEPOPUP_MARKRECONCILED_ALL, MyListCtrl::OnMarkAllTransactions) - EVT_MENU(MENU_TREEPOPUP_MARKUNRECONCILED_ALL, MyListCtrl::OnMarkAllTransactions) - EVT_MENU(MENU_TREEPOPUP_MARKVOID_ALL, MyListCtrl::OnMarkAllTransactions) + EVT_MENU(MENU_TREEPOPUP_MARKRECONCILED_ALL, MyListCtrl::OnMarkAllTransactions) + EVT_MENU(MENU_TREEPOPUP_MARKUNRECONCILED_ALL, MyListCtrl::OnMarkAllTransactions) + EVT_MENU(MENU_TREEPOPUP_MARKVOID_ALL, MyListCtrl::OnMarkAllTransactions) EVT_MENU(MENU_TREEPOPUP_MARK_ADD_FLAG_FOLLOWUP_ALL, MyListCtrl::OnMarkAllTransactions) EVT_MENU(MENU_TREEPOPUP_MARKDUPLICATE_ALL, MyListCtrl::OnMarkAllTransactions) - EVT_MENU(MENU_TREEPOPUP_NEW, MyListCtrl::OnNewTransaction) - EVT_MENU(MENU_TREEPOPUP_DELETE, MyListCtrl::OnDeleteTransaction) - EVT_MENU(MENU_TREEPOPUP_EDIT, MyListCtrl::OnEditTransaction) - EVT_MENU(MENU_TREEPOPUP_MOVE, MyListCtrl::OnMoveTransaction) + EVT_MENU(MENU_TREEPOPUP_NEW, MyListCtrl::OnNewTransaction) + EVT_MENU(MENU_TREEPOPUP_DELETE, MyListCtrl::OnDeleteTransaction) + EVT_MENU(MENU_TREEPOPUP_EDIT, MyListCtrl::OnEditTransaction) + EVT_MENU(MENU_TREEPOPUP_MOVE, MyListCtrl::OnMoveTransaction) EVT_LIST_COL_CLICK(ID_PANEL_CHECKING_LISTCTRL_ACCT, MyListCtrl::OnColClick) EVT_LIST_KEY_DOWN(ID_PANEL_CHECKING_LISTCTRL_ACCT, MyListCtrl::OnListKeyDown) @@ -655,8 +655,8 @@ m_currentView = mmDBWrapper::getINISettingValue(m_inidb, wxT("VIEWTRANSACTIONS"), wxT("View All Transactions")); - initViewTransactionsHeader(); - + + initViewTransactionsHeader(); wxBoxSizer* itemBoxSizerHHeader = new wxBoxSizer(wxHORIZONTAL); itemBoxSizerVHeader->Add(itemBoxSizerHHeader, 0, wxALL, 1); @@ -1352,11 +1352,13 @@ wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); if (msgDlg.ShowModal() == wxID_YES) { - //mmCheckingAccount* pAccount = dynamic_cast<mmCheckingAccount*>(m_core->accountList_.getAccountSharedPtr(m_AccountID).get()); - for (size_t i = 0; i < m_trans.size(); ++i) + //mmCheckingAccount* pAccount = dynamic_cast<mmCheckingAccount*>(m_core->accountList_.getAccountSharedPtr(m_AccountID).get()); + mmDBWrapper::begin(m_core->db_.get()); + for (size_t i = 0; i < m_trans.size(); ++i) { m_core->bTransactionList_.deleteTransaction(m_AccountID, m_trans[i]->transactionID()); } + mmDBWrapper::commit(m_core->db_.get()); } } else if (evt == MENU_VIEW_DELETE_FLAGGED) @@ -1365,6 +1367,7 @@ if (msgDlg.ShowModal() == wxID_YES) { //mmCheckingAccount* pAccount = dynamic_cast<mmCheckingAccount*>(m_core->accountList_.getAccountSharedPtr(m_AccountID).get()); + mmDBWrapper::begin(m_core->db_.get()); for (size_t i = 0; i < m_trans.size(); ++i) { if (m_trans[i]->status_ == wxT("F")) @@ -1372,6 +1375,7 @@ m_core->bTransactionList_.deleteTransaction(m_AccountID, m_trans[i]->transactionID()); } } + mmDBWrapper::commit(m_core->db_.get()); } } else @@ -1408,12 +1412,20 @@ menu.Append(MENU_TREEPOPUP_NEW, _("&New Transaction")); menu.AppendSeparator(); menu.Append(MENU_TREEPOPUP_EDIT, _("&Edit Transaction")); - menu.Append(MENU_TREEPOPUP_DELETE, _("&Delete Transaction")); menu.Append(MENU_ON_COPY_TRANSACTION, _("&Copy Transaction")); menu.Append(MENU_TREEPOPUP_MOVE, _("&Move Transaction")); if (m_selectedForCopy != -1) menu.Append(MENU_ON_PASTE_TRANSACTION, _("&Paste Transaction")); menu.AppendSeparator(); + + wxMenu* subGlobalOpMenuDelete = new wxMenu; + subGlobalOpMenuDelete->Append(MENU_TREEPOPUP_DELETE, _("&Delete Transaction")); + //subGlobalOpMenuDelete->Append(MENU_TREEPOPUP_DELETE_VIEWED, _("Delete all transactions in current view")); + //subGlobalOpMenuDelete->Append(MENU_TREEPOPUP_DELETE_FLAGGED, _("Delete all \"Follow Up\" transactions")); + menu.Append(MENU_TREEPOPUP_DELETE, _("&Delete"), subGlobalOpMenuDelete); + + menu.AppendSeparator(); + menu.Append(MENU_TREEPOPUP_MARKRECONCILED, _("Mark As &Reconciled")); menu.Append(MENU_TREEPOPUP_MARKUNRECONCILED, _("Mark As &Unreconciled")); menu.Append(MENU_TREEPOPUP_MARKVOID, _("Mark As &Void")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-08-13 14:32:54
|
Revision: 1431 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1431&view=rev Author: vomikan Date: 2011-08-13 14:32:48 +0000 (Sat, 13 Aug 2011) Log Message: ----------- when transfer - from/to account info added Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-08-13 10:34:06 UTC (rev 1430) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-08-13 14:32:48 UTC (rev 1431) @@ -779,7 +779,7 @@ //Infobar-mini wxStaticText* itemStaticText44 = new wxStaticText( itemPanel12, ID_PANEL_CHECKING_STATIC_MINI, wxT(""), - wxPoint(-1,-1), wxSize(450, -1), wxNO_BORDER|wxST_NO_AUTORESIZE); + wxPoint(-1,-1), wxSize(650, -1), wxNO_BORDER|wxST_NO_AUTORESIZE); itemBoxSizer5->Add(itemStaticText44, 1, wxGROW|wxALL, 12); //Infobar @@ -826,8 +826,11 @@ wxString mmCheckingPanel::getMiniInfoStr(int selIndex) { char sql[] = - "select c.transcode as TRANSCODE, " + "select ta.accountname as INTOACC, " + "a.accountname as FROMACC, c.transcode as TRANSCODE, " "c.TRANSAMOUNT as TRANSAMOUNT, TOTRANSAMOUNT, " + "cf.pfx_symbol as PFX_SYMBOL, cf.sfx_symbol as SFX_SYMBOL, " + "tcf.pfx_symbol as TOPFX_SYMBOL, tcf.sfx_symbol as TOSFX_SYMBOL, " "cf.CURRENCYNAME as CURRENCYNAME, tcf.CURRENCYNAME as TOCURRENCYNAME, " "cf.CURRENCYID as CURRENCYID, tcf.CURRENCYID as TOCURRENCYID, " "cf.BASECONVRATE as BASECONVRATE, " @@ -848,8 +851,15 @@ wxSQLite3ResultSet q1 = st.ExecuteQuery(); + wxString intoaccStr = q1.GetString(wxT("INTOACC")); + wxString fromaccStr = q1.GetString(wxT("FROMACC")); int basecurrencyid = q1.GetInt(wxT("BASECURRENCYID")); wxString transcodeStr = q1.GetString(wxT("TRANSCODE")); + + wxString cursfxStr = q1.GetString(wxT("SFX_SYMBOL")); + wxString tocursfxStr = q1.GetString(wxT("TOSFX_SYMBOL")); + wxString curpfxStr = q1.GetString(wxT("PFX_SYMBOL")); + wxString tocurpfxStr = q1.GetString(wxT("TOPFX_SYMBOL")); wxString currencynameStr = q1.GetString(wxT("CURRENCYNAME")); wxString tocurrencynameStr = q1.GetString(wxT("TOCURRENCYNAME")); int currencyid = q1.GetInt(wxT("CURRENCYID")); @@ -883,19 +893,22 @@ //if (currencyid == basecurrencyid) mmex::formatDoubleToCurrencyEdit(convertion, convertionStr); - infoStr << amountStr << wxT(" -> ") << toamountStr ; + infoStr << amountStr << wxT(" "); + if (amount!=toamount || tocurrencyid != currencyid) + infoStr << wxT("-> ") << toamountStr << wxT(" "); + infoStr << _("From") << wxT(" ") << fromaccStr << wxT(" ") << _("to ") << intoaccStr; if (tocurrencyid != currencyid) { - infoStr << wxT(" ( 1 "); + infoStr << wxT(" ( "); if (accountId == m_AccountID && convrate < toconvrate) - {infoStr << tocurrencynameStr << wxT(" = ") << convertionStr << wxT(" ") << currencynameStr;} + {infoStr << tocurpfxStr << wxT("1") << tocursfxStr << wxT(" = ") << curpfxStr << convertionStr << cursfxStr << wxT(" ");} else if (accountId == m_AccountID && convrate > toconvrate) - {infoStr << currencynameStr << wxT(" = ") << convertionStr << wxT(" ") << tocurrencynameStr;} + {infoStr << curpfxStr << wxT("1") << cursfxStr << wxT(" = ") << tocurpfxStr << convertionStr << tocursfxStr << wxT(" ");} else if (accountId != m_AccountID && convrate < toconvrate) - {infoStr << tocurrencynameStr << wxT(" = ") << convertionStr << wxT(" ") << currencynameStr;} + {infoStr << tocurpfxStr << wxT("1") << tocursfxStr << wxT(" = ") << curpfxStr << convertionStr << cursfxStr << wxT(" ");} else - {infoStr << currencynameStr << wxT(" = ") << convertionStr << wxT(" ") << tocurrencynameStr;} + {infoStr << curpfxStr << wxT("1") << cursfxStr << wxT(" = ") << tocurpfxStr << convertionStr << tocursfxStr << wxT(" ");} infoStr << wxT(" )"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oma...@us...> - 2011-09-18 19:13:06
|
Revision: 1457 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1457&view=rev Author: omalleypat Date: 2011-09-18 19:12:59 +0000 (Sun, 18 Sep 2011) Log Message: ----------- added difference between account balance and reconciled balance in checking panel Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-09-17 13:34:25 UTC (rev 1456) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-09-18 19:12:59 UTC (rev 1457) @@ -669,7 +669,7 @@ itemBoxSizerVHeader->Add(itemBoxSizerHHeader, 0, wxALL, 1); wxStaticText* itemStaticText10 = new wxStaticText( headerPanel, - ID_PANEL_CHECKING_STATIC_BALHEADER, wxT(""), wxDefaultPosition, wxSize(500, 20), 0 ); + ID_PANEL_CHECKING_STATIC_BALHEADER, wxT(""), wxDefaultPosition, wxSize(650, 20), 0 ); itemBoxSizerHHeader->Add(itemStaticText10, 0, wxALL | wxEXPAND , 5); /* ---------------------- */ @@ -981,11 +981,15 @@ wxString recbalance; mmex::formatDoubleToCurrency(reconciledBal + acctInitBalance, recbalance); + + wxString diffbal; + mmex::formatDoubleToCurrency(total - (reconciledBal + acctInitBalance), diffbal); + wxStaticText* header = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_BALHEADER); - wxString lbl = wxString::Format(_("Account Balance : %s Reconciled Balance : %s"), - balance.c_str(), recbalance.c_str()); + wxString lbl = wxString::Format(_("Account Balance : %s Reconciled Balance : %s Difference : %s"), + balance.c_str(), recbalance.c_str(), diffbal.c_str()); header->SetLabel(lbl); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-09-20 12:29:10
|
Revision: 1459 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1459&view=rev Author: stef145g Date: 2011-09-20 12:29:04 +0000 (Tue, 20 Sep 2011) Log Message: ----------- Bug Fix: Prevent crash when changing status of last line when viewing via status. Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-09-19 19:21:18 UTC (rev 1458) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-09-20 12:29:04 UTC (rev 1459) @@ -1787,6 +1787,11 @@ if (m_selectedIndex == -1) //check if a transaction is selected return; + // Exit if list has been reduced and selected index no longer exists. + int currentListSize = m_cp->m_trans.size(); + if (currentListSize == m_selectedIndex) + return; + //find the topmost visible item - this will be used to set // where to display the list again after refresh long topItemIndex = GetTopItem(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-10-03 12:17:31
|
Revision: 1474 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1474&view=rev Author: stef145g Date: 2011-10-03 12:17:25 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Now using icon to indicate that the Transaction Filter is active. Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-10-02 15:49:35 UTC (rev 1473) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-10-03 12:17:25 UTC (rev 1474) @@ -39,7 +39,7 @@ #include "../resources/duplicate.xpm" #include "../resources/trans_from.xpm" #include "../resources/trans_into.xpm" -//#include "../resources/trans_transfer.xpm" +#include "../resources/tipicon.xpm" //---------------------------------------------------------------------------- namespace @@ -1508,18 +1508,23 @@ void mmCheckingPanel::OnFilterTransactions(wxCommandEvent& /*event*/) { + wxBitmap activeBitmapFilterIcon(tipicon_xpm); + wxBitmap bitmapFilterIcon(rightarrow_xpm); + int dlgResult = transFilterDlg_->ShowModal(); if ( dlgResult == wxID_OK ) { transFilterActive_ = true; - statTextTransFilter_->SetLabel( _("Transaction Filter (Active)")); + bitmapFilterIcon = activeBitmapFilterIcon; } else if ( dlgResult == wxID_CANCEL ) { transFilterActive_ = false; - statTextTransFilter_->SetLabel( _("Transaction Filter")); } + wxStaticBitmap* staticBitmap = (wxStaticBitmap*)FindWindow(ID_PANEL_CHECKING_STATIC_BITMAP_FILTER); + staticBitmap->SetBitmap(bitmapFilterIcon); + m_listCtrlAccount->DeleteAllItems(); initVirtualListControl(NULL); m_listCtrlAccount->RefreshItems(0, static_cast<long>(m_trans.size()) - 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-11-27 18:57:51
|
Revision: 1537 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1537&view=rev Author: vomikan Date: 2011-11-27 18:57:44 +0000 (Sun, 27 Nov 2011) Log Message: ----------- begin - commit deleted Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-11-27 17:54:23 UTC (rev 1536) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-11-27 18:57:44 UTC (rev 1537) @@ -1413,12 +1413,10 @@ _("Confirm Transaction Deletion"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); if (msgDlg.ShowModal() == wxID_YES) { - mmDBWrapper::begin(m_core->db_.get()); for (size_t i = 0; i < m_trans.size(); ++i) { m_core->bTransactionList_.deleteTransaction(m_AccountID, m_trans[i]->transactionID()); } - mmDBWrapper::commit(m_core->db_.get()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-11-30 11:57:40
|
Revision: 1544 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1544&view=rev Author: vomikan Date: 2011-11-30 11:57:34 +0000 (Wed, 30 Nov 2011) Log Message: ----------- Minor changes Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-11-29 19:22:57 UTC (rev 1543) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-11-30 11:57:34 UTC (rev 1544) @@ -493,13 +493,14 @@ EVT_MENU(MENU_ON_PASTE_TRANSACTION, MyListCtrl::OnPaste) EVT_MENU(MENU_ON_NEW_TRANSACTION, MyListCtrl::OnNewTransaction) - //EVT_KEY_UP(MyListCtrl::OnChar) + //EVT_KEY_UP(MyListCtrl::OnChar) // If we use EVT_KEY_DOWN instead of EVT_CHAR, capital versions // of all characters are always returned. EVT_CHAR also performs // other necessary keyboard-dependent translations. EVT_CHAR(MyListCtrl::OnChar) -END_EVENT_TABLE() +END_EVENT_TABLE(); + //---------------------------------------------------------------------------- mmCheckingPanel::mmCheckingPanel @@ -784,8 +785,8 @@ itemButton9->Enable(false); wxSearchCtrl* searchCtrl = new wxSearchCtrl(itemPanel12, - wxID_FIND, wxEmptyString, wxDefaultPosition, wxSize(100,-1), wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB); - itemBoxSizer5->Add(searchCtrl); + wxID_FIND, wxEmptyString, wxDefaultPosition, wxSize(100,-1), wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB, wxDefaultValidator, _("Search")); + itemBoxSizer5->Add(searchCtrl, 0, wxTOP, 1); searchCtrl->SetToolTip(_("Enter any string to find it in the nearest transaction notes")); //Infobar-mini @@ -1779,7 +1780,8 @@ //---------------------------------------------------------------------------- void MyListCtrl::OnChar(wxKeyEvent& event) -{ if (wxGetKeyState(WXK_ALT) || +{ + if (wxGetKeyState(WXK_ALT) || wxGetKeyState(WXK_COMMAND) || wxGetKeyState(WXK_UP) || wxGetKeyState(WXK_DOWN) || @@ -1798,10 +1800,17 @@ wxGetKeyState(WXK_NUMPAD_HOME) || wxGetKeyState(WXK_NUMPAD_END) || wxGetKeyState(WXK_DELETE) || - wxGetKeyState(WXK_NUMPAD_DELETE) + wxGetKeyState(WXK_NUMPAD_DELETE) || + wxGetKeyState(WXK_TAB)|| + wxGetKeyState(WXK_RETURN)|| + wxGetKeyState(WXK_NUMPAD_ENTER)|| + wxGetKeyState(WXK_SPACE)|| + wxGetKeyState(WXK_NUMPAD_SPACE) ) - {event.Skip();} - } + { + event.Skip(); + } +} //---------------------------------------------------------------------------- void MyListCtrl::OnCopy(wxCommandEvent& WXUNUSED(event)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-12-19 02:35:40
|
Revision: 1568 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1568&view=rev Author: stef145g Date: 2011-12-19 02:35:34 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Bugfix: MyListCtrl::OnChar(...) event processor restored to rev 1566 as new event handler causing bad side effects to keyboard processing. Revision Links: -------------- http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1566&view=rev Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-12-13 09:12:39 UTC (rev 1567) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-12-19 02:35:34 UTC (rev 1568) @@ -1817,6 +1817,41 @@ } //---------------------------------------------------------------------------- +// If any of these keys are encountered, the search for the event handler +// should continue as these keys may be processed by the operating system. +void MyListCtrl::OnChar(wxKeyEvent& event) +{ + if (wxGetKeyState(WXK_ALT) || + wxGetKeyState(WXK_COMMAND) || + wxGetKeyState(WXK_UP) || + wxGetKeyState(WXK_DOWN) || + wxGetKeyState(WXK_LEFT) || + wxGetKeyState(WXK_RIGHT) || + wxGetKeyState(WXK_HOME) || + wxGetKeyState(WXK_END) || + wxGetKeyState(WXK_PAGEUP) || + wxGetKeyState(WXK_PAGEDOWN) || + wxGetKeyState(WXK_NUMPAD_UP) || + wxGetKeyState(WXK_NUMPAD_DOWN) || + wxGetKeyState(WXK_NUMPAD_LEFT) || + wxGetKeyState(WXK_NUMPAD_RIGHT) || + wxGetKeyState(WXK_NUMPAD_PAGEDOWN) || + wxGetKeyState(WXK_NUMPAD_PAGEUP) || + wxGetKeyState(WXK_NUMPAD_HOME) || + wxGetKeyState(WXK_NUMPAD_END) || + wxGetKeyState(WXK_DELETE) || + wxGetKeyState(WXK_NUMPAD_DELETE) || + wxGetKeyState(WXK_TAB)|| + wxGetKeyState(WXK_RETURN)|| + wxGetKeyState(WXK_NUMPAD_ENTER)|| + wxGetKeyState(WXK_SPACE)|| + wxGetKeyState(WXK_NUMPAD_SPACE) + ) + { + event.Skip(); + } +} +//---------------------------------------------------------------------------- void MyListCtrl::OnCopy(wxCommandEvent& WXUNUSED(event)) { @@ -1843,13 +1878,6 @@ } //---------------------------------------------------------------------------- -void MyListCtrl::OnChar(wxKeyEvent& event) -{ - if (!wxGetKeyState(wxKeyCode('V'))&& !wxGetKeyState(wxKeyCode('R')) && !wxGetKeyState(wxKeyCode('U')) && !wxGetKeyState(wxKeyCode('F')) && !wxGetKeyState(wxKeyCode('D'))) - event.Skip(); -} -//---------------------------------------------------------------------------- - void MyListCtrl::OnListKeyDown(wxListEvent& event) { if (m_selectedIndex == -1) //check if a transaction is selected This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-12-19 03:13:53
|
Revision: 1569 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1569&view=rev Author: stef145g Date: 2011-12-19 03:13:47 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Bug fix: Prevent crash when moving the last transaction from a filtered screen. Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-12-19 02:35:34 UTC (rev 1568) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-12-19 03:13:47 UTC (rev 1569) @@ -2070,6 +2070,7 @@ m_cp->m_inidb, this); if ( dlg.ShowModal() == wxID_OK ) { + m_selectedIndex --; refreshVisualList(); } } @@ -2084,8 +2085,8 @@ pTransaction->accountID_ = toAccountID; m_cp->m_core->bTransactionList_.updateTransaction(pTransaction); + m_selectedIndex --; refreshVisualList(); - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-12-31 21:23:06
|
Revision: 1579 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1579&view=rev Author: vomikan Date: 2011-12-31 21:23:00 +0000 (Sat, 31 Dec 2011) Log Message: ----------- fixed issues with fosus for listctrl Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2011-12-27 10:08:15 UTC (rev 1578) +++ trunk/mmex/src/mmcheckingpanel.cpp 2011-12-31 21:23:00 UTC (rev 1579) @@ -817,15 +817,14 @@ { wxStaticText* st = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_DETAILS); wxStaticText* stm = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_MINI); - if (selIndex != -1) { + if (selIndex > -1) { enableEditDeleteButtons(true); - //st->SetLabel(getItem(selIndex, COL_NOTES)); st->SetLabel(m_trans[selIndex]->notes_); wxString miniStr; miniStr = getMiniInfoStr(selIndex); //Show only first line but full string set as tooltip - if (miniStr.Find(wxT("\n"))>1 && !miniStr.IsEmpty()) { + if (miniStr.Find(wxT("\n")) > 1 && !miniStr.IsEmpty()) { stm->SetLabel(miniStr.substr(0,miniStr.Find(wxT("\n"))) + wxT(" ...")); stm->SetToolTip(miniStr); } else { @@ -1477,7 +1476,6 @@ { m_selectedIndex = -1; m_cp->updateExtraTransactionData(m_selectedIndex); - //m_cp->enableEditDeleteButtons(false); } void MyListCtrl::OnItemRightClick(wxListEvent& event) @@ -1839,9 +1837,9 @@ return; // Exit if list has been reduced and selected index no longer exists. - int currentListSize = m_cp->m_trans.size(); - if (currentListSize == m_selectedIndex) - return; + //int currentListSize = m_cp->m_trans.size(); + //if (currentListSize == m_selectedIndex) + // return; //find the topmost visible item - this will be used to set // where to display the list again after refresh @@ -1889,6 +1887,11 @@ event.Skip(); } + if (m_cp->m_trans.size() == m_selectedIndex) + m_selectedIndex--; + + m_cp->updateExtraTransactionData(m_selectedIndex); + //set the deleted transaction index to the new selection and focus on it SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED); //make sure the topmost item before transaction deletion is visible, otherwise @@ -1905,11 +1908,12 @@ { m_cp->initVirtualListControl(NULL); RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); - if (m_selectedIndex != -1) + if (m_selectedIndex > -1) { - SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); - SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); - EnsureVisible(m_selectedIndex); + m_cp->updateExtraTransactionData(m_cp->m_trans.size()-1); + EnsureVisible(m_cp->m_trans.size()-1); + SetItemState(m_cp->m_trans.size()-1, wxLIST_STATE_SELECTED|wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED|wxLIST_STATE_SELECTED); EnsureVisible(m_selectedIndex); + m_cp->updateExtraTransactionData(m_cp->m_trans.size()-1); } } } @@ -1942,6 +1946,9 @@ //the transactions above the deleted transaction won't change so they // don't need to be refreshed RefreshItems(m_selectedIndex, static_cast<long>(m_cp->m_trans.size()) - 1); + + //Update info panels + m_cp->updateExtraTransactionData(m_selectedIndex); //set the deleted transaction index to the new selection and focus on it SetItemState(m_selectedIndex-1, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED, @@ -1978,10 +1985,11 @@ { m_cp->initVirtualListControl(NULL); RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); - SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); - SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); + if ((m_selectedIndex + 1) != m_cp->m_trans.size() && m_selectedIndex > -1) + m_selectedIndex--; EnsureVisible(m_selectedIndex); m_cp->updateExtraTransactionData(m_selectedIndex); + SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); } // Called only when moving a deposit/withdraw transaction to a new account. @@ -2025,7 +2033,7 @@ m_cp->m_inidb, this); if ( dlg.ShowModal() == wxID_OK ) { - m_selectedIndex --; + //m_selectedIndex --; refreshVisualList(); } } @@ -2040,7 +2048,7 @@ pTransaction->accountID_ = toAccountID; m_cp->m_core->bTransactionList_.updateTransaction(pTransaction); - m_selectedIndex --; + //m_selectedIndex --; refreshVisualList(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |