From: <vo...@us...> - 2012-03-22 12:39:08
|
Revision: 2068 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2068&view=rev Author: vomikan Date: 2012-03-22 12:38:57 +0000 (Thu, 22 Mar 2012) Log Message: ----------- fix for assert false Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-03-22 11:55:44 UTC (rev 2067) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-03-22 12:38:57 UTC (rev 2068) @@ -1266,6 +1266,17 @@ wxMessageBox(messageStr,_("Transaction Filter"),wxICON_WARNING); return; } + + itemStaticBitmap31_->Enable(false); + statTextTransFilter_->Enable(false); + + if (evt == MENU_VIEW_ALLTRANSACTIONS) + { + itemStaticTextMainFilter_->SetLabel(_("Viewing all transactions")); + m_currentView = VIEW_TRANS_ALL_STR; + itemStaticBitmap31_->Enable(true); + statTextTransFilter_->Enable(true); + } else if (evt == MENU_VIEW_RECONCILED) { itemStaticTextMainFilter_->SetLabel(_("Viewing Reconciled transactions")); @@ -1281,21 +1292,31 @@ itemStaticTextMainFilter_->SetLabel(_("Viewing Un-Reconciled transactions")); m_currentView = VIEW_TRANS_UNRECONCILED_STR; } + else if (evt == MENU_VIEW_FLAGGED) + { + itemStaticTextMainFilter_->SetLabel(_("Viewing Follow-Up transactions")); + m_currentView = VIEW_TRANS_FLAGGED; + } + else if (evt == MENU_VIEW_DUPLICATE) + { + itemStaticTextMainFilter_->SetLabel(_("Viewing duplicate transactions")); + m_currentView = VIEW_TRANS_DUPLICATES; + } else if (evt == MENU_VIEW_VOID) { itemStaticTextMainFilter_->SetLabel(_("Viewing Void transactions")); m_currentView = VIEW_TRANS_VOID; } - else if (evt == MENU_VIEW_FLAGGED) - { - itemStaticTextMainFilter_->SetLabel(_("Viewing Follow-Up transactions")); - m_currentView = VIEW_TRANS_FLAGGED; - } else if (evt == MENU_VIEW_TODAY) { itemStaticTextMainFilter_->SetLabel(_("Viewing transactions for today")); m_currentView = VIEW_TRANS_TODAY_STR; } + else if (evt == MENU_VIEW_CURRENTMONTH) + { + itemStaticTextMainFilter_->SetLabel(_("Viewing transactions for current month")); + m_currentView = VIEW_TRANS_CURRENT_MONTH_STR; + } else if (evt == MENU_VIEW_LAST30) { itemStaticTextMainFilter_->SetLabel(_("Viewing transactions for last 30 days")); @@ -1311,21 +1332,11 @@ itemStaticTextMainFilter_->SetLabel(_("Viewing transactions for last 3 months")); m_currentView = VIEW_TRANS_LAST_3MONTHS_STR; } - else if (evt == MENU_VIEW_CURRENTMONTH) - { - itemStaticTextMainFilter_->SetLabel(_("Viewing transactions for current month")); - m_currentView = VIEW_TRANS_CURRENT_MONTH_STR; - } else if (evt == MENU_VIEW_LASTMONTH) { itemStaticTextMainFilter_->SetLabel(_("Viewing transactions for last month")); m_currentView = VIEW_TRANS_LAST_MONTH_STR; } - else if (evt == MENU_VIEW_DUPLICATE) - { - itemStaticTextMainFilter_->SetLabel(_("Viewing duplicate transactions")); - m_currentView = VIEW_TRANS_DUPLICATES; - } else if (evt == MENU_VIEW_DELETE_TRANS || evt == MENU_TREEPOPUP_DELETE_VIEWED) { DeleteViewedTransactions(); @@ -1339,16 +1350,6 @@ wxASSERT(false); } - itemStaticBitmap31_->Enable(false); - statTextTransFilter_->Enable(false); - - if (evt == MENU_VIEW_ALLTRANSACTIONS) - { - itemStaticTextMainFilter_->SetLabel(_("Viewing all transactions")); - m_currentView = VIEW_TRANS_ALL_STR; - itemStaticBitmap31_->Enable(true); - statTextTransFilter_->Enable(true); - } m_listCtrlAccount->DeleteAllItems(); initVirtualListControl(NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-13 03:37:36
|
Revision: 2326 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2326&view=rev Author: guanlisheng Date: 2012-05-13 03:37:30 +0000 (Sun, 13 May 2012) Log Message: ----------- cleanup Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-05-13 03:21:56 UTC (rev 2325) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-05-13 03:37:30 UTC (rev 2326) @@ -25,7 +25,6 @@ //---------------------------------------------------------------------------- #include <wx/event.h> #include <algorithm> -#include <vector> #include <boost/unordered_map.hpp> #include <wx/srchctrl.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-05-28 13:50:28
|
Revision: 2445 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2445&view=rev Author: vomikan Date: 2012-05-28 13:50:22 +0000 (Mon, 28 May 2012) Log Message: ----------- fixed missing ico Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-05-28 12:31:39 UTC (rev 2444) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-05-28 13:50:22 UTC (rev 2445) @@ -655,12 +655,12 @@ m_imageList->Add(wxBitmap(void_xpm)); m_imageList->Add(wxBitmap(flag_xpm)); m_imageList->Add(wxBitmap(unreconciled_xpm)); + m_imageList->Add(wxBitmap(empty_xpm)); m_imageList->Add(wxBitmap(uparrow_xpm)); m_imageList->Add(wxBitmap(downarrow_xpm)); m_imageList->Add(wxBitmap(duplicate_xpm)); m_imageList->Add(wxBitmap(trans_from_xpm)); m_imageList->Add(wxBitmap(trans_into_xpm)); - //m_imageList->Add(wxBitmap(trans_transfer_xpm)); m_listCtrlAccount = new TransactionListCtrl( this, itemSplitterWindow10, ID_PANEL_CHECKING_LISTCTRL_ACCT, wxDefaultPosition, wxDefaultSize, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-31 07:13:08
|
Revision: 2478 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2478&view=rev Author: guanlisheng Date: 2012-05-31 07:12:57 +0000 (Thu, 31 May 2012) Log Message: ----------- cleanup chcking panel Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-05-31 07:06:45 UTC (rev 2477) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-05-31 07:12:57 UTC (rev 2478) @@ -464,11 +464,8 @@ */ mmCheckingPanel::~mmCheckingPanel() { - try { - saveSettings(); - } catch (...) { - wxASSERT(false); - } + this->save_config(m_listCtrlAccount, wxT("CHECK")); + saveSettings(); } //---------------------------------------------------------------------------- @@ -506,18 +503,10 @@ */ void mmCheckingPanel::saveSettings() { - int cols = m_listCtrlAccount->GetColumnCount(); + this->save_config(m_listCtrlAccount, wxT("CHECK")); inidb_->Begin(); { - for (int i = 0; i < cols; ++i) - { - wxString name = wxString::Format(wxT("CHECK_COL%d_WIDTH"), i); - int width = m_listCtrlAccount->GetColumnWidth(i); - - mmDBWrapper::setINISettingValue(inidb_, name, wxString() << width); - } - // sorting column index mmDBWrapper::setINISettingValue(inidb_, wxT("CHECK_SORT_COL"), wxString() << g_sortcol); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-31 07:30:39
|
Revision: 2479 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2479&view=rev Author: guanlisheng Date: 2012-05-31 07:30:32 +0000 (Thu, 31 May 2012) Log Message: ----------- cleanup chcking panel Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-05-31 07:12:57 UTC (rev 2478) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-05-31 07:30:32 UTC (rev 2479) @@ -329,10 +329,8 @@ long m_selectedIndex; long m_selectedForCopy; - wxListItemAttr m_attr1; // style1 - wxListItemAttr m_attr2; // style2 - wxListItemAttr m_attr3; // style, for future dates - wxListItemAttr m_attr4; // style, for future dates + wxListItemAttr* m_attr3; // style, for future dates + wxListItemAttr* m_attr4; // style, for future dates EColumn m_sortCol; bool m_asc; @@ -1685,24 +1683,18 @@ */ wxListItemAttr* TransactionListCtrl::OnGetItemAttr(long item) const { - wxASSERT(m_cp); - wxASSERT(item >= 0); - size_t idx = item; bool ok = m_cp && idx < m_cp->m_trans.size(); - mmBankTransaction *tr = ok ? m_cp->m_trans[idx] : 0; + const mmBankTransaction *tr = ok ? m_cp->m_trans.at(idx) : 0; bool in_the_future = tr && tr->date_ > wxDateTime::Now(); - TransactionListCtrl &self = *const_cast<TransactionListCtrl*>(this); - if (in_the_future) // apply alternating background pattern { - return item % 2 ? &self.m_attr3 : &self.m_attr4; + return item % 2 ? this->m_attr3 : this->m_attr4; } - return item % 2 ? &self.m_attr1 : &self.m_attr2; - + return item % 2 ? this->m_attr1 : this->m_attr2; } //---------------------------------------------------------------------------- // If any of these keys are encountered, the search for the event handler @@ -2038,10 +2030,8 @@ m_cp(cp), m_selectedIndex(-1), m_selectedForCopy(-1), - m_attr1(*wxBLACK, mmColors::listAlternativeColor0, wxNullFont), - m_attr2(*wxBLACK, mmColors::listAlternativeColor1, wxNullFont), - m_attr3(mmColors::listFutureDateColor, mmColors::listAlternativeColor0, wxNullFont), - m_attr4(mmColors::listFutureDateColor, mmColors::listAlternativeColor1, wxNullFont), + m_attr3(new wxListItemAttr(mmColors::listFutureDateColor, mmColors::listAlternativeColor0, wxNullFont)), + m_attr4(new wxListItemAttr(mmColors::listFutureDateColor, mmColors::listAlternativeColor1, wxNullFont)), m_sortCol(COL_DEF_SORT), m_asc(true) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-31 08:37:07
|
Revision: 2482 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2482&view=rev Author: guanlisheng Date: 2012-05-31 08:36:56 +0000 (Thu, 31 May 2012) Log Message: ----------- clean up Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-05-31 07:46:57 UTC (rev 2481) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-05-31 08:36:56 UTC (rev 2482) @@ -22,6 +22,7 @@ #include "util.h" #include "dbwrapper.h" #include "transactionfilterdialog.h" +#include "mmex_db_view.h" //---------------------------------------------------------------------------- #include <wx/event.h> #include <algorithm> @@ -764,130 +765,12 @@ //---------------------------------------------------------------------------- wxString mmCheckingPanel::getMiniInfoStr(int selIndex) const { - char sql[] = - "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, " - "tcf.BASECONVRATE as TOBASECONVRATE, " - "c.ACCOUNTID as ACCOUNTID, " - "c.TOACCOUNTID as TOACCOUNTID, " - "i.infovalue as BASECURRENCYID " - "from checkingaccount_v1 c " - "left join accountlist_v1 ta on ta.ACCOUNTID=c.TOACCOUNTID " - "left join accountlist_v1 a on a.ACCOUNTID=c.ACCOUNTID " - "left join currencyformats_v1 tcf on tcf.currencyid=ta.currencyid " - "left join currencyformats_v1 cf on cf.currencyid=a.currencyid " - "left join infotable_v1 i on i.infoname='BASECURRENCYID' " - "where c.transid = ? "; + const mmBankTransaction *tr = m_trans.at(selIndex); + if (!tr) return wxT(""); - wxSQLite3Statement st = core_->db_.get()->PrepareStatement(sql); - st.Bind(1, m_trans[selIndex]->transactionID()); - - 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")); - double amount = q1.GetDouble(wxT("TRANSAMOUNT")); - 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 == TRANS_TYPE_TRANSFER_STR) - { - int tocurrencyid = q1.GetInt(wxT("TOCURRENCYID")); - double toamount = q1.GetDouble(wxT("TOTRANSAMOUNT")); - wxString toamountStr; - double convertion = 0.0; - if (toamount != 0.0 && amount != 0.0) - convertion = ( convrate < toconvrate ? amount/toamount : toamount/amount); - wxString convertionStr; - - boost::shared_ptr<mmCurrency> pCurrencyPtr = core_->getCurrencyWeakPtr(toaccountId).lock(); - wxASSERT(pCurrencyPtr); - mmex::CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); - mmex::formatDoubleToCurrency(toamount, toamountStr); - mmex::formatDoubleToCurrencyEdit(convertion, convertionStr); - - pCurrencyPtr = core_->getCurrencyWeakPtr(accountId).lock(); - wxASSERT(pCurrencyPtr); - mmex::CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); - mmex::formatDoubleToCurrency(amount, amountStr); - //if (currencyid == basecurrencyid) - mmex::formatDoubleToCurrencyEdit(convertion, convertionStr); - - infoStr << amountStr << wxT(" "); - if (amount!=toamount || tocurrencyid != currencyid) - infoStr << wxT("-> ") << toamountStr << wxT(" "); - infoStr << _("From") << wxT(" ") << fromaccStr << wxT(" ") << _("to ") << intoaccStr; - - if (tocurrencyid != currencyid) - { - infoStr << wxT(" ( "); - if (accountId == m_AccountID && convrate < toconvrate) - { - infoStr << tocurpfxStr << wxT("1") << tocursfxStr << wxT(" = ") << curpfxStr << convertionStr << cursfxStr << wxT(" "); - } - else if (accountId == m_AccountID && convrate > toconvrate) - { - infoStr << curpfxStr << wxT("1") << cursfxStr << wxT(" = ") << tocurpfxStr << convertionStr << tocursfxStr << wxT(" "); - } - else if (accountId != m_AccountID && convrate < toconvrate) - { - infoStr << tocurpfxStr << wxT("1") << tocursfxStr << wxT(" = ") << curpfxStr << convertionStr << cursfxStr << wxT(" "); - } - else - { - infoStr << curpfxStr << wxT("1") << cursfxStr << wxT(" = ") << tocurpfxStr << convertionStr << tocursfxStr << wxT(" "); - } - infoStr << wxT(" )"); - } - } - else //For deposits and withdrawals calculates amount in base currency - { - //if (split_) - { - infoStr = mmDBWrapper::getSplitTrxNotes(core_->db_.get(), m_trans[selIndex]->transactionID()); - //infoStr.RemoveLast(1); - } - - if (currencyid != basecurrencyid) //Show nothing if account currency is base - { - //load settings for base currency - wxString currencyName = core_->getCurrencyName(basecurrencyid); - boost::shared_ptr<mmCurrency> pCurrency = core_->getCurrencySharedPtr(currencyName); - wxASSERT(pCurrency); - wxString basecuramountStr; - mmDBWrapper::loadSettings(core_->db_.get(), pCurrency->currencyID_); - mmex::formatDoubleToCurrency(amount*convrate, basecuramountStr); - - pCurrency = core_->getCurrencyWeakPtr(accountId).lock(); - wxASSERT(pCurrency); - mmex::CurrencyFormatter::instance().loadSettings(*pCurrency); - mmex::formatDoubleToCurrency(amount, amountStr); - - //output - infoStr << amountStr << wxT(" = ") << basecuramountStr; - } - } - return infoStr; + DB_View_CHECKINGACCOUNT_V1::Data* checking = CHECKINGACCOUNT_V1.get(tr->transactionID(), core_->db_.get()); + //TODO + return checking->to_string(); } //--------------------------- void mmCheckingPanel::showTips() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-02 21:53:09
|
Revision: 2497 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2497&view=rev Author: vomikan Date: 2012-06-02 21:53:03 +0000 (Sat, 02 Jun 2012) Log Message: ----------- align Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-02 21:50:17 UTC (rev 2496) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-02 21:53:03 UTC (rev 2497) @@ -669,7 +669,7 @@ itemPanel12->SetSizer(itemBoxSizer4); wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer4->Add(itemBoxSizer5, flags); + itemBoxSizer4->Add(itemBoxSizer5); wxButton* itemButton6 = new wxButton(itemPanel12, wxID_NEW); itemButton6->SetToolTip(_("New Transaction")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-15 15:10:46
|
Revision: 2606 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2606&view=rev Author: vomikan Date: 2012-06-15 15:10:40 +0000 (Fri, 15 Jun 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 11:50:42 UTC (rev 2605) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 15:10:40 UTC (rev 2606) @@ -297,13 +297,13 @@ void OnMoveTransaction(wxCommandEvent& event); /// Displays the split categories for the selected transaction void OnViewSplitTransaction(wxCommandEvent& event); + long m_selectedIndex; private: DECLARE_NO_COPY_CLASS(TransactionListCtrl) DECLARE_EVENT_TABLE() mmCheckingPanel *m_cp; - long m_selectedIndex; long m_selectedForCopy; wxListItemAttr* m_attr3; // style, for future dates @@ -955,16 +955,15 @@ m_listCtrlAccount->SetItemCount(numTransactions); + if (m_listCtrlAccount->GetItemCount() <= m_listCtrlAccount->m_selectedIndex) + m_listCtrlAccount->m_selectedIndex--; + if (m_trans.size() > 1) { if (g_asc) - { m_listCtrlAccount->EnsureVisible(static_cast<long>(m_trans.size()) - 1); - } else - { m_listCtrlAccount->EnsureVisible(0); - } } setAccountSummary(); @@ -1329,7 +1328,6 @@ // any changes need to be reflected. Even if we are viewing all transactions, // the register needs to be updated so the balance col is correct (eg a trans // was changed from unreconciled to void). - DeleteAllItems(); m_cp->initVirtualListControl(); } @@ -1372,14 +1370,10 @@ m_cp->m_trans[i]->status_ = status; } -// if (m_cp->m_currentView != VIEW_TRANS_ALL_STR) - { - DeleteAllItems(); + //FIXME + m_cp->initVirtualListControl(); + RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything - m_cp->initVirtualListControl(); - RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything - } - m_cp->core_->db_.get()->Commit(); m_cp->setAccountSummary(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-15 15:26:41
|
Revision: 2607 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2607&view=rev Author: vomikan Date: 2012-06-15 15:26:35 +0000 (Fri, 15 Jun 2012) Log Message: ----------- fix for empty list Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 15:10:40 UTC (rev 2606) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 15:26:35 UTC (rev 2607) @@ -1399,6 +1399,7 @@ setColumnImage(m_sortCol, m_asc ? ICON_ASC : ICON_DESC); m_cp->sortTable(); + if (m_cp->m_trans.size()>0) RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-15 15:57:37
|
Revision: 2608 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2608&view=rev Author: vomikan Date: 2012-06-15 15:57:31 +0000 (Fri, 15 Jun 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 15:26:35 UTC (rev 2607) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 15:57:31 UTC (rev 2608) @@ -452,7 +452,7 @@ #ifdef __WXMSW__ Freeze(); -#endif +#endif wxConfigBase *config = wxConfigBase::Get(); m_currentView = config->Read("VIEWTRANSACTIONS", VIEW_TRANS_ALL_STR); @@ -955,8 +955,8 @@ m_listCtrlAccount->SetItemCount(numTransactions); - if (m_listCtrlAccount->GetItemCount() <= m_listCtrlAccount->m_selectedIndex) - m_listCtrlAccount->m_selectedIndex--; + if (m_listCtrlAccount->GetItemCount() <= m_listCtrlAccount->m_selectedIndex) + m_listCtrlAccount->m_selectedIndex--; if (m_trans.size() > 1) { @@ -965,6 +965,11 @@ else m_listCtrlAccount->EnsureVisible(0); } + else + { + enableEditDeleteButtons(false); + showTips(); + } setAccountSummary(); } @@ -1217,7 +1222,7 @@ m_listCtrlAccount->DeleteAllItems(); initVirtualListControl(); if (!all_trans_.empty()) - m_listCtrlAccount->RefreshItems(0, static_cast<long>(m_trans.size()) - 1); + m_listCtrlAccount->RefreshItems(0, static_cast<long>(m_trans.size()) - 1); } @@ -1236,8 +1241,8 @@ m_listCtrlAccount->DeleteAllItems(); initVirtualListControl(); - if (!all_trans_.empty()) - m_listCtrlAccount->RefreshItems(0, static_cast<long>(m_trans.size()) - 1); + if (!all_trans_.empty()) + m_listCtrlAccount->RefreshItems(0, static_cast<long>(m_trans.size()) - 1); } @@ -1370,9 +1375,9 @@ m_cp->m_trans[i]->status_ = status; } - //FIXME - m_cp->initVirtualListControl(); - RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything + //FIXME + m_cp->initVirtualListControl(); + RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything m_cp->core_->db_.get()->Commit(); @@ -1399,7 +1404,7 @@ setColumnImage(m_sortCol, m_asc ? ICON_ASC : ICON_DESC); m_cp->sortTable(); - if (m_cp->m_trans.size()>0) + if (m_cp->m_trans.size()>0) RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-15 16:28:13
|
Revision: 2610 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2610&view=rev Author: vomikan Date: 2012-06-15 16:28:04 +0000 (Fri, 15 Jun 2012) Log Message: ----------- warning fix Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 16:08:34 UTC (rev 2609) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 16:28:04 UTC (rev 2610) @@ -1057,7 +1057,7 @@ wxString messageStr; messageStr << _("Transaction Filter")<< _(" will interfere with this filtering.") << ("\n\n"); messageStr << _("Please deactivate: ") << _("Transaction Filter"); - wxMessageBox(messageStr,_("Transaction Filter"),wxICON_WARNING); + wxMessageBox(messageStr,_("Transaction Filter"),wxOK|wxICON_WARNING); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-15 17:06:47
|
Revision: 2611 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2611&view=rev Author: vomikan Date: 2012-06-15 17:06:40 +0000 (Fri, 15 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 16:28:04 UTC (rev 2610) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-15 17:06:40 UTC (rev 2611) @@ -589,9 +589,7 @@ itemBoxSizerVHeader->Add(itemBoxSizerHHeader, flags); wxStaticText* itemStaticText10 = new wxStaticText(this, - ID_PANEL_CHECKING_STATIC_BALHEADER, - ("<----------the-plase-holder-------------------------------->"), - wxDefaultPosition, wxDefaultSize); + ID_PANEL_CHECKING_STATIC_BALHEADER, ("")); itemBoxSizerHHeader->Add(itemStaticText10, 0, wxEXPAND); /* ---------------------- */ @@ -620,7 +618,7 @@ m_listCtrlAccount->setSortColumn(g_sortcol); m_listCtrlAccount->setSortOrder(g_asc); m_listCtrlAccount->setColumnImage(m_listCtrlAccount->getSortColumn(), - m_listCtrlAccount->getSortOrder() ? ICON_ASC : ICON_DESC); // asc\desc sort mark (arrow) + m_listCtrlAccount->getSortOrder() ? ICON_ASC : ICON_DESC); // asc\desc sort mark (arrow) wxPanel *itemPanel12 = new wxPanel(itemSplitterWindow10, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-17 11:45:58
|
Revision: 2624 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2624&view=rev Author: vomikan Date: 2012-06-17 11:45:52 +0000 (Sun, 17 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-16 22:43:41 UTC (rev 2623) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-17 11:45:52 UTC (rev 2624) @@ -1764,7 +1764,8 @@ void TransactionListCtrl::refreshVisualList() { m_cp->initVirtualListControl(); - RefreshItems(0, m_cp->all_trans_.empty() ? 0: m_cp->all_trans_.size() - 1); + if(m_cp->all_trans_.size() > 0) + RefreshItems(0, m_cp->all_trans_.size() - 1); if ((m_selectedIndex + 1) != (long)m_cp->m_trans.size() && (m_selectedIndex > 0)) { m_selectedIndex--; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-19 17:00:56
|
Revision: 2637 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2637&view=rev Author: vomikan Date: 2012-06-19 17:00:49 +0000 (Tue, 19 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-19 16:11:28 UTC (rev 2636) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-19 17:00:49 UTC (rev 2637) @@ -737,8 +737,19 @@ if (!tr) return (""); DB_View_CHECKINGACCOUNT_V1::Data* checking = CHECKINGACCOUNT_V1.get(tr->transactionID(), core_->db_.get()); - //TODO - return checking->to_string(); + //TODO TODO FIXME + //Refresh needed after update + wxString out = ""; + if (checking->TRANSCODE == "Transfer") + { + out << checking->TRANSAMOUNT << "<->" << checking->TOTRANSAMOUNT; + } else + { + wxDateTime dt; + dt.ParseDate(checking->TRANSDATE); + out = mmGetShortWeekDayName(dt.GetWeekDay()); + } + return out; } //--------------------------- void mmCheckingPanel::showTips() @@ -1377,12 +1388,12 @@ m_cp->initVirtualListControl(); if (m_cp->m_trans.size() > 1) { - RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything - if (m_selectedIndex > -1) { - SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); - SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); - } - } + RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything + if (m_selectedIndex > -1) { + SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); + SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); + } + } else { m_cp->enableEditDeleteButtons(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-24 17:34:02
|
Revision: 2662 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2662&view=rev Author: vomikan Date: 2012-06-24 17:33:56 +0000 (Sun, 24 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-24 14:08:29 UTC (rev 2661) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-24 17:33:56 UTC (rev 2662) @@ -1620,7 +1620,7 @@ void TransactionListCtrl::OnListKeyDown(wxListEvent& event) { if (wxGetKeyState(WXK_COMMAND) || wxGetKeyState(WXK_ALT) || wxGetKeyState(WXK_CONTROL) - || m_selectedIndex == -1) { + || m_selectedIndex == -1 || m_cp->m_trans.size() < 1) { event.Skip(); return; } @@ -1686,9 +1686,7 @@ long topItemIndex = GetTopItem(); if ((m_selectedForCopy > -1) && (m_selectedForCopy == m_cp->m_trans[m_selectedIndex]->transactionID())) - { m_selectedForCopy = -1; - } //remove the transaction //TODO: if deletingfromdb was false do not delete trx in that case from list @@ -1699,22 +1697,10 @@ 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 - // don't need to be refreshed - RefreshItems(0, m_cp->all_trans_.empty() ? 0: m_cp->all_trans_.size() - 1); - if (m_selectedIndex +1 != (long)(m_cp->m_trans.size()) && m_selectedIndex > 0) - { + if (m_selectedIndex +1 > (long)(m_cp->m_trans.size()) && m_selectedIndex > 0) m_selectedIndex--; - //RefreshItems(m_selectedIndex, static_cast<long>(m_cp->m_trans.size()) - 1); - //set the deleted transaction index to the new selection and focus on it - SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); - SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); - } - //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); + refreshVisualList(); } else { @@ -1774,14 +1760,17 @@ void TransactionListCtrl::refreshVisualList() { m_cp->initVirtualListControl(); - if(m_cp->all_trans_.size() > 0) - RefreshItems(0, m_cp->all_trans_.size() - 1); - if ((m_selectedIndex + 1) != (long)m_cp->m_trans.size() && (m_selectedIndex > 0)) - { + if ((m_selectedIndex + 1) > (long)m_cp->m_trans.size() && (m_selectedIndex > 0)) m_selectedIndex--; + + if(m_cp->m_trans.size() > 0) + { + RefreshItems(0, m_cp->m_trans.size() - 1); SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); } + else + m_selectedIndex = -1; m_cp->updateExtraTransactionData(m_selectedIndex); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-27 15:00:35
|
Revision: 2671 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2671&view=rev Author: vomikan Date: 2012-06-27 15:00:28 +0000 (Wed, 27 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-06-27 09:54:10 UTC (rev 2670) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-06-27 15:00:28 UTC (rev 2671) @@ -345,26 +345,8 @@ EVT_BUTTON(wxID_DELETE, mmCheckingPanel::OnDeleteTransaction) EVT_BUTTON(wxID_MOVE_FRAME, mmCheckingPanel::OnMoveTransaction) - EVT_MENU(MENU_VIEW_ALLTRANSACTIONS, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_RECONCILED, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_UNRECONCILED, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_NOTRECONCILED, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_VOID, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_FLAGGED, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_TODAY, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_LAST30, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_LAST90, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_LAST3MONTHS, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_DUPLICATE, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_DELETE_TRANS, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_DELETE_FLAGGED, mmCheckingPanel::OnViewPopupSelected) + EVT_MENU(wxID_ANY, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_TREEPOPUP_DELETE_VIEWED, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_TREEPOPUP_DELETE_FLAGGED, mmCheckingPanel::OnViewPopupSelected) - - EVT_MENU(MENU_VIEW_CURRENTMONTH, mmCheckingPanel::OnViewPopupSelected) - EVT_MENU(MENU_VIEW_LASTMONTH, mmCheckingPanel::OnViewPopupSelected) - EVT_SEARCHCTRL_SEARCH_BTN(wxID_FIND, mmCheckingPanel::OnSearchTxtEntered) EVT_TEXT_ENTER(wxID_FIND, mmCheckingPanel::OnSearchTxtEntered) @@ -754,7 +736,9 @@ void mmCheckingPanel::showTips() { wxStaticText* st = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_DETAILS); + wxStaticText* stm = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_MINI); st->SetLabel(Tips(TIPS_BANKS)); + stm->SetLabel(""); } //---------------------------------------------------------------------------- void mmCheckingPanel::setAccountSummary() @@ -1065,7 +1049,7 @@ wxString messageStr; messageStr << _("Transaction Filter") << _(" will interfere with this filtering.") << "\n\n"; messageStr << _("Please deactivate: ") << _("Transaction Filter"); - wxMessageBox(messageStr,_("Transaction Filter"),wxOK|wxICON_WARNING); + wxMessageBox(messageStr,_("Transaction Filter"), wxOK|wxICON_WARNING); return; } @@ -1367,11 +1351,11 @@ { int evt = event.GetId(); wxString status = ""; - if (evt == MENU_TREEPOPUP_MARKRECONCILED_ALL) status = "R"; - else if (evt == MENU_TREEPOPUP_MARKUNRECONCILED_ALL) status = ""; - else if (evt == MENU_TREEPOPUP_MARKVOID_ALL) status = "V"; + if (evt == MENU_TREEPOPUP_MARKRECONCILED_ALL) status = "R"; + else if (evt == MENU_TREEPOPUP_MARKUNRECONCILED_ALL) status = ""; + else if (evt == MENU_TREEPOPUP_MARKVOID_ALL) status = "V"; else if (evt == MENU_TREEPOPUP_MARK_ADD_FLAG_FOLLOWUP_ALL) status = "F"; - else if (evt == MENU_TREEPOPUP_MARKDUPLICATE_ALL) status = "D"; + else if (evt == MENU_TREEPOPUP_MARKDUPLICATE_ALL) status = "D"; else wxASSERT(false); m_cp->core_->db_.get()->Begin(); @@ -1385,16 +1369,10 @@ m_cp->core_->db_.get()->Commit(); m_cp->initVirtualListControl(); - if (m_cp->m_trans.size() > 1) + refreshVisualList(); + + if(m_cp->m_trans.size() < 1 || m_selectedIndex < 0) { - RefreshItems(0, static_cast<long>(m_cp->m_trans.size()) - 1); // refresh everything - if (m_selectedIndex > -1) { - SetItemState(m_selectedIndex, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); - SetItemState(m_selectedIndex, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); - } - } - else - { m_cp->enableEditDeleteButtons(false); m_cp->showTips(); } @@ -1446,47 +1424,17 @@ { const mmBankTransaction &t = *m_trans[item]; - switch (column) - { - case COL_DATE_OR_TRANSACTION_ID: - s = t.dateStr_; - break; - - case COL_TRANSACTION_NUMBER: - s = t.transNum_; - break; - - case COL_PAYEE_STR: - s = t.payeeStr_; - break; - - case COL_STATUS: - s = t.status_; - break; - - case COL_CATEGORY: - s = t.fullCatStr_; - break; - - case COL_WITHDRAWAL: - s = t.withdrawalStr_; - break; - - case COL_DEPOSIT: - s = t.depositStr_; - break; - - case COL_BALANCE: - s = t.balanceStr_; - break; - - case COL_NOTES: - s = t.notes_; - break; - - default: + if (column == COL_DATE_OR_TRANSACTION_ID) s = t.dateStr_; + else if (column == COL_TRANSACTION_NUMBER) s = t.transNum_; + else if (column == COL_PAYEE_STR) s = t.payeeStr_; + else if (column == COL_STATUS) s = t.status_; + else if (column == COL_CATEGORY) s = t.fullCatStr_; + else if (column == COL_WITHDRAWAL) s = t.withdrawalStr_; + else if (column == COL_DEPOSIT) s = t.depositStr_; + else if (column == COL_BALANCE) s = t.balanceStr_; + else if (column == COL_NOTES) s = t.notes_; + else wxASSERT(false); - } } return s; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2012-11-05 00:47:48
|
Revision: 3107 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3107&view=rev Author: stef145g Date: 2012-11-05 00:47:41 +0000 (Mon, 05 Nov 2012) Log Message: ----------- Updating the way balances are set for: View Reconciled.UnReconciled Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-11-04 13:02:23 UTC (rev 3106) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-11-05 00:47:41 UTC (rev 3107) @@ -978,7 +978,7 @@ 2. All entries for the account to be displayed. [ m_trans ] **********************************************************************************/ int numTransactions = 0; - std::vector<mmBankTransaction*> v_transPtr; + std::vector<mmBankTransaction*> account_transPtr; for (size_t i = 0; i < core_->bTransactionList_.transactions_.size(); ++i) { boost::shared_ptr<mmBankTransaction> pBankTransaction = core_->bTransactionList_.transactions_[i]; @@ -988,7 +988,7 @@ pBankTransaction->updateAllData(core_, m_AccountID, pCurrency); // Store all account transactions to determine the balances. - v_transPtr.push_back(pBankTransaction.get()); + account_transPtr.push_back(pBankTransaction.get()); bool toAdd = true; // bool getBal = false; @@ -1042,21 +1042,31 @@ Stage 2 Sort all account transactions by date to, determine balances. **********************************************************************************/ - std::sort(v_transPtr.begin(), v_transPtr.end(), sortTransByDateAsc); + std::sort(account_transPtr.begin(), account_transPtr.end(), sortTransByDateAsc); /********************************************************************************** Stage 3 Add the account balances to all the transactions in this account. **********************************************************************************/ double initBalance = pAccount->initialBalance_; - for (size_t i = 0; i < v_transPtr.size(); ++i) + std::vector<mmBankTransaction*> visible_transPtr = account_transPtr; + + // Depending on the view - will determine the treatment of balances. + if ( m_currentView == VIEW_TRANS_RECONCILED_STR || + m_currentView == VIEW_TRANS_NOT_RECONCILED_STR || + m_currentView == VIEW_TRANS_UNRECONCILED_STR ) { - bool ok = v_transPtr[i] != 0; + visible_transPtr = m_trans; + } + + for (size_t i = 0; i < visible_transPtr.size(); ++i) + { + bool ok = visible_transPtr[i] != 0; wxASSERT(ok); if (!ok) continue; - mmBankTransaction* transPtr = v_transPtr[i]; + mmBankTransaction* transPtr = visible_transPtr[i]; initBalance = getBalance( transPtr, initBalance); setBalance( transPtr, initBalance); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-11-11 10:09:34
|
Revision: 3132 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3132&view=rev Author: vomikan Date: 2012-11-11 10:09:27 +0000 (Sun, 11 Nov 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-11-11 00:02:43 UTC (rev 3131) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-11-11 10:09:27 UTC (rev 3132) @@ -1405,7 +1405,7 @@ int TransactionListCtrl::OnMarkTransactionDB(const wxString& status) { - if (m_selectedIndex == -1) return -1; + if (m_selectedIndex < 0) return -1; int transID = m_cp->m_trans[m_selectedIndex]->transactionID(); if (mmDBWrapper::updateTransactionWithStatus(*m_cp->getDb(), transID, status)) @@ -1662,25 +1662,25 @@ void TransactionListCtrl::OnCopy(wxCommandEvent& WXUNUSED(event)) { - if (m_selectedIndex != -1) - m_selectedForCopy = m_cp->m_trans[m_selectedIndex]->transactionID(); + if (m_selectedIndex < 0) return; + + m_selectedForCopy = m_cp->m_trans[m_selectedIndex]->transactionID(); } //---------------------------------------------------------------------------- void TransactionListCtrl::OnPaste(wxCommandEvent& WXUNUSED(event)) { - if (m_selectedForCopy != -1) - { - bool useOriginalDate = m_cp->core_->iniSettings_->GetBoolSetting(INIDB_USE_ORG_DATE_COPYPASTE, false); + if (m_selectedForCopy < 0) return; - boost::shared_ptr<mmBankTransaction> pCopiedTrans = - m_cp->core_->bTransactionList_.copyTransaction(m_cp->core_, m_selectedForCopy, m_cp->accountID(), useOriginalDate); + bool useOriginalDate = m_cp->core_->iniSettings_->GetBoolSetting(INIDB_USE_ORG_DATE_COPYPASTE, false); - boost::shared_ptr<mmCurrency> pCurrencyPtr = m_cp->core_->accountList_.getCurrencyWeakPtr(m_cp->accountID()).lock(); - pCopiedTrans->updateAllData(m_cp->core_, m_cp->accountID(), pCurrencyPtr, true); - int transID = pCopiedTrans->transactionID(); - refreshVisualList(transID); - } + boost::shared_ptr<mmBankTransaction> pCopiedTrans = + m_cp->core_->bTransactionList_.copyTransaction(m_cp->core_, m_selectedForCopy, m_cp->accountID(), useOriginalDate); + + boost::shared_ptr<mmCurrency> pCurrencyPtr = m_cp->core_->accountList_.getCurrencyWeakPtr(m_cp->accountID()).lock(); + pCopiedTrans->updateAllData(m_cp->core_, m_cp->accountID(), pCurrencyPtr, true); + int transID = pCopiedTrans->transactionID(); + refreshVisualList(transID); } //---------------------------------------------------------------------------- @@ -1766,15 +1766,14 @@ void TransactionListCtrl::OnEditTransaction(wxCommandEvent& /*event*/) { - if (m_selectedIndex != -1) + if (m_selectedIndex < 0) return; + + mmTransDialog dlg(m_cp->core_, m_cp->accountID(), + m_cp->m_trans[m_selectedIndex], true, this); + if ( dlg.ShowModal() == wxID_OK ) { - mmTransDialog dlg(m_cp->core_, m_cp->accountID(), - m_cp->m_trans[m_selectedIndex], true, this); - if ( dlg.ShowModal() == wxID_OK ) - { - int transID = dlg.getTransID(); - refreshVisualList(transID); - } + int transID = dlg.getTransID(); + refreshVisualList(transID); } } //---------------------------------------------------------------------------- @@ -1811,6 +1810,7 @@ void TransactionListCtrl::refreshVisualList(const int trans_id) { m_cp->initVirtualListControl(trans_id); + 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 (m_cp->m_trans.size() > 0) { @@ -1848,7 +1848,7 @@ void TransactionListCtrl::OnMoveTransaction(wxCommandEvent& /*event*/) { - if (m_selectedIndex == -1) return; + if (m_selectedIndex < 0) return; int toAccountID = destinationAccountID(m_cp->m_trans[m_selectedIndex]->fromAccountStr_); if ( toAccountID != -1 ) { @@ -1874,26 +1874,20 @@ //---------------------------------------------------------------------------- void TransactionListCtrl::OnViewSplitTransaction(wxCommandEvent& /*event*/) { - if (m_selectedIndex != -1) - { - if (m_cp->m_trans[m_selectedIndex]->categID_ < 0) - m_cp->DisplaySplitCategories(m_cp->m_trans[m_selectedIndex]->transactionID()); - } + if (m_selectedIndex < 0) return; + + if (m_cp->m_trans[m_selectedIndex]->categID_ < 0) + m_cp->DisplaySplitCategories(m_cp->m_trans[m_selectedIndex]->transactionID()); + } //---------------------------------------------------------------------------- void TransactionListCtrl::OnListItemActivated(wxListEvent& /*event*/) { - if (m_selectedIndex == -1) return; + if (m_selectedIndex < 0) return; - int transID = m_cp->m_trans[m_selectedIndex]->transactionID(); - mmTransDialog dlg(m_cp->core_, m_cp->accountID(), - m_cp->m_trans[m_selectedIndex], true, this); - if ( dlg.ShowModal() == wxID_OK ) - { - refreshVisualList(transID); - m_cp->updateExtraTransactionData(m_selectedIndex); - } + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_TREEPOPUP_EDIT); + AddPendingEvent(evt); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-12-08 15:59:50
|
Revision: 3181 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3181&view=rev Author: vomikan Date: 2012-12-08 15:59:43 +0000 (Sat, 08 Dec 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-12-08 14:07:09 UTC (rev 3180) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-12-08 15:59:43 UTC (rev 3181) @@ -609,7 +609,7 @@ m_imageList->Add(wxImage(duplicate_xpm).Scale(16, 16)); m_imageList->Add(wxImage(trans_from_xpm).Scale(16, 16)); m_imageList->Add(wxImage(trans_into_xpm).Scale(16, 16)); - m_imageList->Add(wxBitmap('\t', 1, 1).ConvertToImage().Scale(16, 16), wxColour(255,255,255)); + m_imageList->Add(wxImage(empty_xpm).Scale(16, 16)); m_listCtrlAccount = new TransactionListCtrl( this, itemSplitterWindow10, ID_PANEL_CHECKING_LISTCTRL_ACCT, wxDefaultPosition, wxDefaultSize, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-12-17 09:31:34
|
Revision: 3219 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3219&view=rev Author: vomikan Date: 2012-12-17 09:31:27 +0000 (Mon, 17 Dec 2012) Log Message: ----------- text Transfer Indicator Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-12-16 21:50:50 UTC (rev 3218) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-12-17 09:31:27 UTC (rev 3219) @@ -58,10 +58,7 @@ ICON_NONE, ICON_DESC, ICON_ASC, - ICON_DUPLICATE, - ICON_TRANS_WITHDRAWAL, - ICON_TRANS_DEPOSIT, - ICON_TRANS_TRANSFER + ICON_DUPLICATE }; //---------------------------------------------------------------------------- EColumn g_sortcol = COL_DEF_SORT; // index of column to sort @@ -88,7 +85,7 @@ { wxString(wxTRANSLATE("Date")).Prepend(wxT(" ")), wxT("80"), wxT("L"), wxTRANSLATE("Number"), wxT("-2"), wxT("L"), - wxString(wxTRANSLATE("Payee")).Prepend(wxT(" ")), wxT("150"), wxT("L"), + wxString(wxTRANSLATE("Payee")).Prepend(wxT(" ")), wxT("150"), wxT("L"), wxTRANSLATE("Status"), wxT("-2"), wxT("L"), wxTRANSLATE("Category"), wxT("-2"), wxT("L"), wxTRANSLATE("Withdrawal"), wxT("-2"), wxT("R"), @@ -607,14 +604,7 @@ m_imageList->Add(wxImage(uparrow_xpm).Scale(16, 16)); m_imageList->Add(wxImage(downarrow_xpm).Scale(16, 16)); m_imageList->Add(wxImage(duplicate_xpm).Scale(16, 16)); - m_imageList->Add(wxImage(trans_from_xpm).Scale(16, 16)); - m_imageList->Add(wxImage(trans_into_xpm).Scale(16, 16)); - wxBitmap icon(empty_xpm); - wxMask* pMask = new wxMask( icon, wxColor( 0, 0, 0 ) ); - icon.SetMask( pMask ); - m_imageList->Add(icon); - m_listCtrlAccount = new TransactionListCtrl( this, itemSplitterWindow10, ID_PANEL_CHECKING_LISTCTRL_ACCT, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_HRULES | wxLC_VRULES | wxLC_VIRTUAL | wxLC_SINGLE_SEL); @@ -1542,7 +1532,22 @@ wxString TransactionListCtrl::OnGetItemText(long item, long column) const { - return m_cp->getItem(item, column); + wxString item_text = m_cp->getItem(item, column); + 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_STR) + { + if ( tr->accountID_ == m_cp->accountID() ) + item_text.Prepend(wxT("> ")); + else + item_text.Prepend(wxT("< ")); + } + else item_text.Prepend(wxT(" ")); + } + return item_text; } //---------------------------------------------------------------------------- @@ -1568,25 +1573,6 @@ res = ICON_DUPLICATE; } - 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_STR) - { - if ( tr->accountID_ == m_cp->accountID() ) - res = ICON_TRANS_WITHDRAWAL; - else - res = ICON_TRANS_DEPOSIT; - } - else - { - res = ICON_TRANS_TRANSFER; - } - } - return res; } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-12-21 18:00:46
|
Revision: 3235 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3235&view=rev Author: vomikan Date: 2012-12-21 18:00:35 +0000 (Fri, 21 Dec 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2012-12-21 14:16:00 UTC (rev 3234) +++ trunk/mmex/src/mmcheckingpanel.cpp 2012-12-21 18:00:35 UTC (rev 3235) @@ -1407,7 +1407,11 @@ else wxASSERT(false); int transID = OnMarkTransactionDB(status); - refreshVisualList(transID, topItemIndex_); + + if (m_cp->transFilterActive_ || (m_cp->m_currentView != VIEW_TRANS_ALL_STR)) + refreshVisualList(transID, topItemIndex_); + else + m_cp->m_listCtrlAccount->RefreshItems(m_selectedIndex, m_selectedIndex); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-01-16 14:50:01
|
Revision: 3365 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3365&view=rev Author: vomikan Date: 2013-01-16 14:49:55 +0000 (Wed, 16 Jan 2013) Log Message: ----------- fix for header when transaction status changed Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-01-15 11:38:45 UTC (rev 3364) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-01-16 14:49:55 UTC (rev 3365) @@ -1390,10 +1390,20 @@ int transID = OnMarkTransactionDB(status); - if (m_cp->transFilterActive_ || (m_cp->m_currentView != VIEW_TRANS_ALL_STR)) + if (m_cp->transFilterActive_ + || (VIEW_TRANS_ALL_STR + + VIEW_TRANS_TODAY_STR + + VIEW_TRANS_CURRENT_MONTH_STR + + VIEW_TRANS_LAST_30_DAYS_STR + + VIEW_TRANS_LAST_90_DAYS_STR + + VIEW_TRANS_LAST_MONTH_STR + + VIEW_TRANS_LAST_3MONTHS_STR).Contains(m_cp->m_currentView)) + { + m_cp->m_listCtrlAccount->RefreshItems(m_selectedIndex, m_selectedIndex); + m_cp->setAccountSummary(); + } + else refreshVisualList(transID, topItemIndex_); - else - m_cp->m_listCtrlAccount->RefreshItems(m_selectedIndex, m_selectedIndex); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-01-19 19:30:39
|
Revision: 3370 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3370&view=rev Author: vomikan Date: 2013-01-19 19:30:31 +0000 (Sat, 19 Jan 2013) Log Message: ----------- fix for search Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-01-19 16:48:18 UTC (rev 3369) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-01-19 19:30:31 UTC (rev 3370) @@ -1928,14 +1928,13 @@ //wxString searchString = event.GetString().c_str(); wxSearchCtrl* st = (wxSearchCtrl*)FindWindow(wxID_FIND); - wxString search_string = st->GetValue().Lower().Append(wxT("*")); - + wxString search_string = st->GetValue().Lower(); if (search_string.IsEmpty()) return; double amount= 0, deposit = 0, withdrawal = 0; bool valid_amount = mmex::formatCurrencyToDouble(search_string, amount); bool withdrawal_only = false; - if (valid_amount && amount <0) + if (valid_amount && amount < 0) { amount = -amount; withdrawal_only = true; @@ -1946,7 +1945,8 @@ if (selectedItem < 0) //nothing selected selectedItem = g_asc ? last - 1 : 0; - while (selectedItem >=0 && selectedItem <= last) + search_string.Append(wxT("*")); + while (selectedItem >= 0 && selectedItem <= last) { g_asc ? selectedItem-- : selectedItem++; const wxString t = getItem(selectedItem, COL_NOTES); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2013-02-15 22:36:41
|
Revision: 3489 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3489&view=rev Author: stef145g Date: 2013-02-15 22:36:35 +0000 (Fri, 15 Feb 2013) Log Message: ----------- fix compiler warning Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-02-15 21:36:20 UTC (rev 3488) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-02-15 22:36:35 UTC (rev 3489) @@ -742,7 +742,7 @@ boost::shared_ptr<mmCurrency> pCurrency = core_->accountList_.getCurrencyWeakPtr(accountId).lock(); int currencyid = pCurrency->currencyID_; //TODO: FIXME: If base currency does not set bug may happens - if (basecurrencyid = -1) basecurrencyid = currencyid; + if (basecurrencyid == -1) basecurrencyid = currencyid; wxString curpfxStr = pCurrency->pfxSymbol_; wxString cursfxStr = pCurrency->sfxSymbol_; double convrate = core_->accountList_.getAccountBaseCurrencyConvRate(accountId); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-02-18 17:46:45
|
Revision: 3513 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3513&view=rev Author: vomikan Date: 2013-02-18 17:46:38 +0000 (Mon, 18 Feb 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/mmex/src/mmcheckingpanel.cpp Modified: trunk/mmex/src/mmcheckingpanel.cpp =================================================================== --- trunk/mmex/src/mmcheckingpanel.cpp 2013-02-18 15:15:14 UTC (rev 3512) +++ trunk/mmex/src/mmcheckingpanel.cpp 2013-02-18 17:46:38 UTC (rev 3513) @@ -938,7 +938,7 @@ wxASSERT(pCurrency); pCurrency->loadCurrencySettings(); - header_text_->SetLabel(wxString(_("Account View : %s"), pAccount->name_.c_str())); + header_text_->SetLabel(wxString::Format(_("Account View : %s"), pAccount->name_.c_str())); filteredBalance_ = 0.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |