From: <kkk...@us...> - 2009-11-06 11:14:16
|
Revision: 733 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=733&view=rev Author: kkkvadim Date: 2009-11-06 11:14:06 +0000 (Fri, 06 Nov 2009) Log Message: ----------- Bugfix: repeating transaction not in form, but exists in overview. When record in BILLSDEPOSITS_V1 has invalid CATEGID (for example, -1), this record does not appear in billsdepositspanel. Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2009-11-06 11:12:24 UTC (rev 732) +++ trunk/mmex/src/billsdepositspanel.cpp 2009-11-06 11:14:06 UTC (rev 733) @@ -240,21 +240,37 @@ void mmBillsDepositsPanel::initVirtualListControl() { - /* Clear all the records */ + static const char sql[] = +"select c.categname, " + "sc.subcategname, " + "b.BDID, " + "b.NEXTOCCURRENCEDATE, " + "b.REPEATS, " + "b.PAYEEID, " + "b.TRANSCODE, " + "b.ACCOUNTID, " + "b.TOACCOUNTID, " + "b.TRANSAMOUNT, " + "b.TOTRANSAMOUNT, " + "b.NOTES, " + "b.CATEGID, " + "b.SUBCATEGID " + +"from BILLSDEPOSITS_V1 b " + +"left join category_v1 c " +"on c.categid = b.categid " + +"left join subcategory_v1 sc " +"on sc.subcategid = b.subcategid"; + trans_.clear(); mmDBWrapper::loadBaseCurrencySettings(db_); - static const char sql[] = - "select c.categname, s.subcategname, BDID, NEXTOCCURRENCEDATE, REPEATS, PAYEEID, TRANSCODE, " - "ACCOUNTID, TOACCOUNTID, TRANSAMOUNT, TOTRANSAMOUNT, NOTES, b.CATEGID, b.SUBCATEGID from BILLSDEPOSITS_V1 b " - "inner join category_v1 c on b.categid=c.categid " - "left join subcategory_v1 s on b.subcategid=s.subcategid; "; + wxSQLite3ResultSet q1 = db_->ExecuteQuery(sql); - wxSQLite3ResultSet q1 = db_->ExecuteQuery(sql); - - long cnt = 0; - for (; q1.NextRow(); ++cnt) + while (q1.NextRow()) { mmBDTransactionHolder th; @@ -358,19 +374,21 @@ } q1.Finalize(); + std::sort(trans_.begin(), trans_.end(), sortTransactionsByRemainingDays); - listCtrlAccount_->SetItemCount(cnt); + listCtrlAccount_->SetItemCount(static_cast<long>(trans_.size())); - //Set an empty text for Bottom Info Panel - wxString text; - text += _("Category : "); - text += wxT("\n"); + // set an empty text for Bottom Info Panel + + wxString text(_("Category : ")); + text += wxT("\n"); text += _("Sub Category : "); - text += wxT("\n"); - text += _("Notes : "); - wxStaticText* st = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_DETAILS); + text += wxT("\n"); + text += _("Notes : "); + + wxStaticText* st = (wxStaticText*)FindWindow(ID_PANEL_CHECKING_STATIC_DETAILS); + wxASSERT(st); st->SetLabel(text); - } void mmBillsDepositsPanel::OnDeleteBDSeries(wxCommandEvent& event) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2010-12-02 14:57:42
|
Revision: 1025 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1025&view=rev Author: vomikan Date: 2010-12-02 14:57:36 +0000 (Thu, 02 Dec 2010) Log Message: ----------- Colors changed Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2010-12-02 14:56:42 UTC (rev 1024) +++ trunk/mmex/src/billsdepositspanel.cpp 2010-12-02 14:57:36 UTC (rev 1025) @@ -221,19 +221,19 @@ wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_LEFT|wxALL, 5); - wxButton* itemButton6 = new wxButton( itemPanel12, ID_BUTTON_NEW_BD, _("&New Series"), - wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton6 = new wxButton( itemPanel12, ID_BUTTON_NEW_BD, _("&New Series")); + itemButton6->SetForegroundColour(wxColour(wxT("FOREST GREEN"))); itemButton6->SetToolTip(_("New Bills && Deposit Series")); itemBoxSizer5->Add(itemButton6, 0, wxGROW|wxALL, 1); - wxButton* itemButton81 = new wxButton( itemPanel12, ID_BUTTON_EDIT_BD, _("&Edit Series"), - wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton81 = new wxButton( itemPanel12, ID_BUTTON_EDIT_BD, _("&Edit Series")); + itemButton81->SetForegroundColour(wxColour(wxT("ORANGE"))); itemButton81->SetToolTip(_("Edit Bills && Deposit Series")); itemBoxSizer5->Add(itemButton81, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1); itemButton81->Enable(false); - wxButton* itemButton7 = new wxButton( itemPanel12, ID_BUTTON_DELETE_BD, _("&Delete Series"), - wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton7 = new wxButton( itemPanel12, ID_BUTTON_DELETE_BD, _("&Delete Series")); + itemButton7->SetForegroundColour(wxColour(wxT("RED"))); itemButton7->SetToolTip(_("Delete Bills && Deposit Series")); itemBoxSizer5->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1); itemButton7->Enable(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-03-08 02:50:38
|
Revision: 1180 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1180&view=rev Author: stef145g Date: 2011-03-08 02:50:32 +0000 (Tue, 08 Mar 2011) Log Message: ----------- Correction Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2011-03-08 02:35:05 UTC (rev 1179) +++ trunk/mmex/src/billsdepositspanel.cpp 2011-03-08 02:50:32 UTC (rev 1180) @@ -27,6 +27,8 @@ /* Include XPM Support */ #include "../resources/error.xpm" +#define DEF_AUTO_EXECUTE 100 + /*******************************************************/ BEGIN_EVENT_TABLE(mmBillsDepositsPanel, wxPanel) EVT_BUTTON(ID_BUTTON_NEW_BD, mmBillsDepositsPanel::OnNewBDSeries) @@ -298,9 +300,11 @@ th.subcategID_ = q1.GetInt(wxT("SUBCATEGID")); th.subcategoryStr_ = q1.GetString(wxT("SUBCATEGNAME")); - // DeMultiplex the Auto Executable field. if repeats > 99 transaction is Auto executable. - if (repeats > 99) - repeats -= 100; + // DeMultiplex the Auto Executable fields. + if (repeats >= DEF_AUTO_EXECUTE) // Auto Execute User Acknowlegement required + repeats -= DEF_AUTO_EXECUTE; + if (repeats >= DEF_AUTO_EXECUTE) // Auto Execute Silent mode + repeats -= DEF_AUTO_EXECUTE; if (repeats == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-01-20 08:34:12
|
Revision: 1680 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1680&view=rev Author: guanlisheng Date: 2012-01-20 08:34:02 +0000 (Fri, 20 Jan 2012) Log Message: ----------- format bill deposit panel Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2012-01-20 08:29:42 UTC (rev 1679) +++ trunk/mmex/src/billsdepositspanel.cpp 2012-01-20 08:34:02 UTC (rev 1680) @@ -487,37 +487,22 @@ wxString mmBillsDepositsPanel::getItem(long item, long column) { - if (column == 0) - return trans_[item].payeeStr_; + if (column == 0) return trans_[item].payeeStr_; + if (column == 1) return trans_[item].accountStr_; - if (column == 1) - return trans_[item].accountStr_; - if (column == 2) { - if (trans_[item].transType_ == TRANS_TYPE_WITHDRAWAL_STR) - return _("Withdrawal"); - else if (trans_[item].transType_ == TRANS_TYPE_DEPOSIT_STR) - return _("Deposit"); - else if (trans_[item].transType_ == TRANS_TYPE_TRANSFER_STR) - return _("Transfer"); + if (trans_[item].transType_ == TRANS_TYPE_WITHDRAWAL_STR) return _("Withdrawal"); + else if (trans_[item].transType_ == TRANS_TYPE_DEPOSIT_STR) return _("Deposit"); + else if (trans_[item].transType_ == TRANS_TYPE_TRANSFER_STR) return _("Transfer"); } - if (column == 3) - return trans_[item].transAmtString_; + if (column == 3) return trans_[item].transAmtString_; + if (column == 4) return trans_[item].nextOccurStr_; + if (column == 5) return trans_[item].repeatsStr_; + if (column == 6) return trans_[item].daysRemainingStr_; + if (column == 7) return trans_[item].notesStr_; - if (column == 4) - return trans_[item].nextOccurStr_; - - if (column == 5) - return trans_[item].repeatsStr_; - - if (column == 6) - return trans_[item].daysRemainingStr_; - - if (column == 7) - return trans_[item].notesStr_; - return wxT(""); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-03-10 05:58:39
|
Revision: 1982 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1982&view=rev Author: guanlisheng Date: 2012-03-10 05:58:33 +0000 (Sat, 10 Mar 2012) Log Message: ----------- format Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2012-03-10 05:46:42 UTC (rev 1981) +++ trunk/mmex/src/billsdepositspanel.cpp 2012-03-10 05:58:33 UTC (rev 1982) @@ -40,7 +40,7 @@ EVT_LIST_ITEM_ACTIVATED(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListItemActivated) EVT_LIST_ITEM_RIGHT_CLICK(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnItemRightClick) EVT_LIST_ITEM_SELECTED(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListItemSelected) - EVT_LIST_ITEM_DESELECTED(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListItemDeselected) + EVT_LIST_ITEM_DESELECTED(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListItemDeselected) EVT_MENU(MENU_TREEPOPUP_NEW, billsDepositsListCtrl::OnNewBDSeries) EVT_MENU(MENU_TREEPOPUP_EDIT, billsDepositsListCtrl::OnEditBDSeries) @@ -104,8 +104,8 @@ col3 = listCtrlAccount_->GetColumnWidth(3); col4 = listCtrlAccount_->GetColumnWidth(4); col5 = listCtrlAccount_->GetColumnWidth(5); - col6 = listCtrlAccount_->GetColumnWidth(6); - col7 = listCtrlAccount_->GetColumnWidth(7); + col6 = listCtrlAccount_->GetColumnWidth(6); + col7 = listCtrlAccount_->GetColumnWidth(7); wxString col0Str = wxString::Format(wxT("%d"), col0); wxString col1Str = wxString::Format(wxT("%d"), col1); @@ -113,8 +113,8 @@ wxString col3Str = wxString::Format(wxT("%d"), col3); wxString col4Str = wxString::Format(wxT("%d"), col4); wxString col5Str = wxString::Format(wxT("%d"), col5); - wxString col6Str = wxString::Format(wxT("%d"), col6); - wxString col7Str = wxString::Format(wxT("%d"), col7); + wxString col6Str = wxString::Format(wxT("%d"), col6); + wxString col7Str = wxString::Format(wxT("%d"), col7); inidb_->Begin(); mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL0_WIDTH"), col0Str); @@ -123,8 +123,8 @@ mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), col3Str); mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), col4Str); mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), col5Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), col6Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL7_WIDTH"), col7Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), col6Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL7_WIDTH"), col7Str); inidb_->Commit(); } @@ -165,7 +165,7 @@ listCtrlAccount_->SetBackgroundColour(mmColors::listBackColor); listCtrlAccount_->SetImageList(m_imageList, wxIMAGE_LIST_SMALL); listCtrlAccount_->InsertColumn(0, _("Payee")); - listCtrlAccount_->InsertColumn(1, _("Account")); + listCtrlAccount_->InsertColumn(1, _("Account")); listCtrlAccount_->InsertColumn(2, _("Type")); wxListItem itemCol; itemCol.SetImage(-1); @@ -175,7 +175,7 @@ listCtrlAccount_->InsertColumn(4, _("Next Due Date")); listCtrlAccount_->InsertColumn(5, _("Frequency")); listCtrlAccount_->InsertColumn(6, _("Remaining Days")); - listCtrlAccount_->InsertColumn(7, _("Notes")); + listCtrlAccount_->InsertColumn(7, _("Notes")); /* See if we can get data from inidb */ long col0, col1, col2, col3, col4, col5, col6, col7; @@ -185,7 +185,7 @@ mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), wxT("-2")).ToLong(&col3); mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), wxT("-2")).ToLong(&col4); mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), wxT("-2")).ToLong(&col5); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), wxT("-2")).ToLong(&col6); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), wxT("-2")).ToLong(&col6); mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL7_WIDTH"), wxT("-2")).ToLong(&col7); @@ -195,8 +195,8 @@ listCtrlAccount_->SetColumnWidth(3, col3); listCtrlAccount_->SetColumnWidth(4, col4); listCtrlAccount_->SetColumnWidth(5, col5); - listCtrlAccount_->SetColumnWidth(6, col6); - listCtrlAccount_->SetColumnWidth(7, col7); + listCtrlAccount_->SetColumnWidth(6, col6); + listCtrlAccount_->SetColumnWidth(7, col7); wxPanel* itemPanel12 = new wxPanel( itemSplitterWindowBillsDeposit, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); @@ -220,18 +220,18 @@ wxButton* itemButton81 = new wxButton( itemPanel12, wxID_EDIT, _("&Edit")); itemButton81->SetToolTip(_("Edit Bills & Deposit Series")); itemBoxSizer5->Add(itemButton81, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); - itemButton81->Enable(false); - + itemButton81->Enable(false); + wxButton* itemButton7 = new wxButton( itemPanel12, wxID_DELETE, _("&Delete")); itemButton7->SetToolTip(_("Delete Bills & Deposit Series")); itemBoxSizer5->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); - itemButton7->Enable(false); - + itemButton7->Enable(false); + wxButton* itemButton8 = new wxButton( itemPanel12, wxID_PASTE, _("En&ter"), wxDefaultPosition, wxDefaultSize, 0 ); itemButton8->SetToolTip(_("Enter Next Bills & Deposit Occurrence")); itemBoxSizer5->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); - itemButton8->Enable(false); + itemButton8->Enable(false); wxButton* buttonSkipTrans = new wxButton( itemPanel12, wxID_IGNORE, _("&Skip")); buttonSkipTrans->SetToolTip(_("Skip Next Bills & Deposit Occurrence")); @@ -296,14 +296,14 @@ th.transType_ = q1.GetString(wxT("TRANSCODE")); th.accountID_ = q1.GetInt(wxT("ACCOUNTID")); th.toAccountID_ = q1.GetInt(wxT("TOACCOUNTID")); - th.accountName_ = core_->getAccountName(th.accountID_); + th.accountName_ = core_->getAccountName(th.accountID_); th.amt_ = q1.GetDouble(wxT("TRANSAMOUNT")); th.toAmt_ = q1.GetDouble(wxT("TOTRANSAMOUNT")); - th.notes_ = q1.GetString(wxT("NOTES")); - th.categID_ = q1.GetInt(wxT("CATEGID")); - th.categoryStr_ = q1.GetString(wxT("CATEGNAME")); - th.subcategID_ = q1.GetInt(wxT("SUBCATEGID")); - th.subcategoryStr_ = q1.GetString(wxT("SUBCATEGNAME")); + th.notes_ = q1.GetString(wxT("NOTES")); + th.categID_ = q1.GetInt(wxT("CATEGID")); + th.categoryStr_ = q1.GetString(wxT("CATEGNAME")); + th.subcategID_ = q1.GetInt(wxT("SUBCATEGID")); + th.subcategoryStr_ = q1.GetString(wxT("SUBCATEGNAME")); int numRepeats = q1.GetInt(wxT("NUMOCCURRENCES")); @@ -477,7 +477,7 @@ wxString mmBillsDepositsPanel::getItem(long item, long column) { if (column == 0) return trans_[item].payeeStr_; - if (column == 1) return trans_[item].accountName_; + if (column == 1) return trans_[item].accountName_; if (column == 2) { @@ -490,7 +490,7 @@ if (column == 4) return trans_[item].nextOccurStr_; if (column == 5) return trans_[item].repeatsStr_; if (column == 6) return trans_[item].daysRemainingStr_; - if (column == 7) return trans_[item].notes_; + if (column == 7) return trans_[item].notes_; return wxT(""); } @@ -503,7 +503,7 @@ void billsDepositsListCtrl::OnListItemSelected(wxListEvent& event) { selectedIndex_ = event.GetIndex(); - cp_->updateBottomPanelData(selectedIndex_); + cp_->updateBottomPanelData(selectedIndex_); } void billsDepositsListCtrl::OnListItemDeselected(wxListEvent& /*event*/) @@ -515,14 +515,10 @@ int billsDepositsListCtrl::OnGetItemImage(long item) const { /* Returns the icon to be shown for each entry */ - if (cp_->trans_[item].daysRemainingStr_ == _("Inactive")) - return -1; - if (cp_->trans_[item].daysRemaining_ < 0) - return 0; - if (cp_->trans_[item].bd_repeat_auto_) - return 1; - if (cp_->trans_[item].bd_repeat_user_) - return 2; + if (cp_->trans_[item].daysRemainingStr_ == _("Inactive")) return -1; + if (cp_->trans_[item].daysRemaining_ < 0) return 0; + if (cp_->trans_[item].bd_repeat_auto_) return 1; + if (cp_->trans_[item].bd_repeat_user_) return 2; return -1; } @@ -562,12 +558,9 @@ void billsDepositsListCtrl::OnEditBDSeries(wxCommandEvent& /*event*/) { - if (selectedIndex_ == -1) - return; + if (selectedIndex_ == -1) return; + if (!cp_->db_) return; - if (!cp_->db_) - return; - mmBDDialog dlg(cp_->db_, cp_->core_, cp_->trans_[selectedIndex_].id_, true, false, this ); if ( dlg.ShowModal() == wxID_OK ) { @@ -578,15 +571,10 @@ void billsDepositsListCtrl::OnDeleteBDSeries(wxCommandEvent& /*event*/) { - if (selectedIndex_ == -1) - return; + if (selectedIndex_ == -1) return; + if (!cp_->db_) return; + if (cp_->trans_.size() == 0) return; - if (!cp_->db_) - return; - - if (cp_->trans_.size() == 0) - return; - wxMessageDialog msgDlg(this, _("Do you really want to delete the series?"), _("Confirm Series Deletion"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); @@ -605,12 +593,9 @@ void billsDepositsListCtrl::OnEnterBDTransaction(wxCommandEvent& /*event*/) { - if (selectedIndex_ == -1) - return; + if (selectedIndex_ == -1) return; + if (!cp_->db_) return; - if (!cp_->db_) - return; - mmBDDialog dlg(cp_->db_, cp_->core_, cp_->trans_[selectedIndex_].id_, false, true, this ); if ( dlg.ShowModal() == wxID_OK ) { @@ -621,8 +606,7 @@ void billsDepositsListCtrl::OnSkipBDTransaction(wxCommandEvent& /*event*/) { - if (selectedIndex_ == -1 || !cp_->db_) - return; + if (selectedIndex_ == -1 || !cp_->db_) return; mmDBWrapper::completeBDInSeries(cp_->db_, cp_->trans_[selectedIndex_].id_); cp_->initVirtualListControl(); @@ -633,12 +617,9 @@ { selectedIndex_ = event.GetIndex(); - if (selectedIndex_ == -1) - return; + if (selectedIndex_ == -1) return; + if (!cp_->db_) return; - if (!cp_->db_) - return; - mmBDDialog dlg(cp_->db_, cp_->core_, cp_->trans_[selectedIndex_].id_, true, false, this ); if ( dlg.ShowModal() == wxID_OK ) { @@ -669,12 +650,12 @@ void mmBillsDepositsPanel::enableEditDeleteButtons(bool en) { - wxButton* bE = (wxButton*)FindWindow(wxID_EDIT); - wxButton* bD = (wxButton*)FindWindow(wxID_DELETE); - wxButton* bN = (wxButton*)FindWindow(wxID_PASTE); - wxButton* bS = (wxButton*)FindWindow(wxID_IGNORE); - bE->Enable(en); - bD->Enable(en); - bN->Enable(en); - bS->Enable(en); + wxButton* bE = (wxButton*)FindWindow(wxID_EDIT); + wxButton* bD = (wxButton*)FindWindow(wxID_DELETE); + wxButton* bN = (wxButton*)FindWindow(wxID_PASTE); + wxButton* bS = (wxButton*)FindWindow(wxID_IGNORE); + bE->Enable(en); + bD->Enable(en); + bN->Enable(en); + bS->Enable(en); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-04-14 18:35:27
|
Revision: 2173 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2173&view=rev Author: vomikan Date: 2012-04-14 18:35:20 +0000 (Sat, 14 Apr 2012) Log Message: ----------- color settings fix and cleanup Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2012-04-14 18:19:51 UTC (rev 2172) +++ trunk/mmex/src/billsdepositspanel.cpp 2012-04-14 18:35:20 UTC (rev 2173) @@ -6,12 +6,12 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -41,18 +41,18 @@ EVT_LIST_ITEM_RIGHT_CLICK(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnItemRightClick) EVT_LIST_ITEM_SELECTED(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListItemSelected) EVT_LIST_ITEM_DESELECTED(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListItemDeselected) - + EVT_MENU(MENU_TREEPOPUP_NEW, billsDepositsListCtrl::OnNewBDSeries) EVT_MENU(MENU_TREEPOPUP_EDIT, billsDepositsListCtrl::OnEditBDSeries) EVT_MENU(MENU_TREEPOPUP_DELETE, billsDepositsListCtrl::OnDeleteBDSeries) EVT_MENU(MENU_POPUP_BD_ENTER_OCCUR, billsDepositsListCtrl::OnEnterBDTransaction) EVT_MENU(MENU_POPUP_BD_SKIP_OCCUR, billsDepositsListCtrl::OnSkipBDTransaction) - + EVT_LIST_KEY_DOWN(ID_PANEL_BD_LISTCTRL, billsDepositsListCtrl::OnListKeyDown) END_EVENT_TABLE() /*******************************************************/ -namespace +namespace { inline bool sortTransactionsByRemainingDays(const mmBDTransactionHolder &p1, const mmBDTransactionHolder &p2) @@ -73,7 +73,7 @@ } bool mmBillsDepositsPanel::Create( wxWindow *parent, - wxWindowID winid, const wxPoint& pos, + wxWindowID winid, const wxPoint& pos, const wxSize& size,long style, const wxString& name ) { SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); @@ -83,7 +83,7 @@ CreateControls(); GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); - + initVirtualListControl(); if (trans_.size() > 1) listCtrlAccount_->EnsureVisible(((int)trans_.size()) - 1); @@ -117,25 +117,25 @@ wxString col7Str = wxString::Format(wxT("%d"), col7); inidb_->Begin(); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL0_WIDTH"), col0Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL1_WIDTH"), col1Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL2_WIDTH"), col2Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), col3Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), col4Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), col5Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL0_WIDTH"), col0Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL1_WIDTH"), col1Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL2_WIDTH"), col2Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), col3Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), col4Str); + mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), col5Str); mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), col6Str); mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL7_WIDTH"), col7Str); inidb_->Commit(); } void mmBillsDepositsPanel::CreateControls() -{ +{ wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL); this->SetSizer(itemBoxSizer9); this->SetBackgroundColour(mmColors::listBackColor); /* ---------------------- */ - wxPanel* headerPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, + wxPanel* headerPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); itemBoxSizer9->Add(headerPanel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); @@ -143,14 +143,14 @@ headerPanel->SetSizer(itemBoxSizerVHeader); headerPanel->SetBackgroundColour(mmColors::listBackColor); - wxStaticText* itemStaticText9 = new wxStaticText( headerPanel, ID_PANEL_BD_STATIC_HEADER, + wxStaticText* itemStaticText9 = new wxStaticText( headerPanel, ID_PANEL_BD_STATIC_HEADER, _("Repeating Transactions"), wxDefaultPosition, wxDefaultSize, 0 ); itemStaticText9->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD, FALSE, wxT(""))); itemBoxSizerVHeader->Add(itemStaticText9, 0, wxALL, 1); /* ---------------------- */ - wxSplitterWindow* itemSplitterWindowBillsDeposit = new wxSplitterWindow( this, - ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), + wxSplitterWindow* itemSplitterWindowBillsDeposit = new wxSplitterWindow( this, + ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER ); wxSize imageSize(16, 16); @@ -159,10 +159,10 @@ m_imageList->Add(wxBitmap(rt_exec_auto_xpm)); m_imageList->Add(wxBitmap(rt_exec_user_xpm)); - listCtrlAccount_ = new billsDepositsListCtrl( this, itemSplitterWindowBillsDeposit, - ID_PANEL_BD_LISTCTRL, wxDefaultPosition, wxDefaultSize, + listCtrlAccount_ = new billsDepositsListCtrl( this, itemSplitterWindowBillsDeposit, + ID_PANEL_BD_LISTCTRL, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_HRULES | wxLC_VRULES | wxLC_VIRTUAL | wxLC_SINGLE_SEL ); - listCtrlAccount_->SetBackgroundColour(mmColors::listBackColor); + listCtrlAccount_->SetBackgroundColour(mmColors::listDetailsPanelColor); listCtrlAccount_->SetImageList(m_imageList, wxIMAGE_LIST_SMALL); listCtrlAccount_->InsertColumn(0, _("Payee")); listCtrlAccount_->InsertColumn(1, _("Account")); @@ -176,19 +176,19 @@ listCtrlAccount_->InsertColumn(5, _("Frequency")); listCtrlAccount_->InsertColumn(6, _("Remaining Days")); listCtrlAccount_->InsertColumn(7, _("Notes")); - + /* See if we can get data from inidb */ long col0, col1, col2, col3, col4, col5, col6, col7; - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL0_WIDTH"), wxT("150")).ToLong(&col0); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL1_WIDTH"), wxT("-2")).ToLong(&col1); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL2_WIDTH"), wxT("-2")).ToLong(&col2); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), wxT("-2")).ToLong(&col3); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), wxT("-2")).ToLong(&col4); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), wxT("-2")).ToLong(&col5); - mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), wxT("-2")).ToLong(&col6); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL0_WIDTH"), wxT("150")).ToLong(&col0); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL1_WIDTH"), wxT("-2")).ToLong(&col1); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL2_WIDTH"), wxT("-2")).ToLong(&col2); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), wxT("-2")).ToLong(&col3); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), wxT("-2")).ToLong(&col4); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), wxT("-2")).ToLong(&col5); + mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), wxT("-2")).ToLong(&col6); mmDBWrapper::getINISettingValue(inidb_, wxT("BD_COL7_WIDTH"), wxT("-2")).ToLong(&col7); - - + + listCtrlAccount_->SetColumnWidth(0, col0); listCtrlAccount_->SetColumnWidth(1, col1); listCtrlAccount_->SetColumnWidth(2, col2); @@ -197,8 +197,8 @@ listCtrlAccount_->SetColumnWidth(5, col5); listCtrlAccount_->SetColumnWidth(6, col6); listCtrlAccount_->SetColumnWidth(7, col7); - - wxPanel* itemPanel12 = new wxPanel( itemSplitterWindowBillsDeposit, ID_PANEL1, + + wxPanel* itemPanel12 = new wxPanel( itemSplitterWindowBillsDeposit, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); itemSplitterWindowBillsDeposit->SplitHorizontally(listCtrlAccount_, itemPanel12); @@ -208,11 +208,11 @@ wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL); itemPanel12->SetSizer(itemBoxSizer4); - itemPanel12->SetBackgroundColour(mmColors::listDetailsPanelColor); + itemPanel12->SetBackgroundColour(mmColors::listBackColor); wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_LEFT|wxALL, 5); - + wxButton* itemButton6 = new wxButton( itemPanel12, wxID_NEW, _("&New")); itemButton6->SetToolTip(_("New Bills & Deposit Series")); itemBoxSizer5->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); @@ -221,13 +221,13 @@ itemButton81->SetToolTip(_("Edit Bills & Deposit Series")); itemBoxSizer5->Add(itemButton81, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); itemButton81->Enable(false); - + wxButton* itemButton7 = new wxButton( itemPanel12, wxID_DELETE, _("&Delete")); itemButton7->SetToolTip(_("Delete Bills & Deposit Series")); itemBoxSizer5->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); itemButton7->Enable(false); - - wxButton* itemButton8 = new wxButton( itemPanel12, wxID_PASTE, _("En&ter"), + + wxButton* itemButton8 = new wxButton( itemPanel12, wxID_PASTE, _("En&ter"), wxDefaultPosition, wxDefaultSize, 0 ); itemButton8->SetToolTip(_("Enter Next Bills & Deposit Occurrence")); itemBoxSizer5->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); @@ -238,22 +238,22 @@ itemBoxSizer5->Add(buttonSkipTrans, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); buttonSkipTrans->Enable(false); - //Infobar-mini - wxStaticText* itemStaticText444 = new wxStaticText(itemPanel12, ID_PANEL_BD_STATIC_MINI, wxT(""), + //Infobar-mini + wxStaticText* itemStaticText444 = new wxStaticText(itemPanel12, ID_PANEL_BD_STATIC_MINI, wxT(""), wxDefaultPosition, wxDefaultSize, 0); itemBoxSizer5->Add(itemStaticText444, 1, wxGROW|wxTOP, 12); - //Infobar + //Infobar wxStaticText* text = new wxStaticText( itemPanel12, ID_PANEL_BD_STATIC_DETAILS, wxT(""), wxPoint(-1,-1), wxSize(200, -1), wxNO_BORDER|wxTE_MULTILINE|wxTE_WORDWRAP|wxST_NO_AUTORESIZE); itemBoxSizer4->Add(text, 1, wxGROW|wxLEFT|wxRIGHT, 14); - + mmBillsDepositsPanel::updateBottomPanelData(-1); } void mmBillsDepositsPanel::initVirtualListControl() { - static const char sql[] = + static const char sql[] = "select c.categname, " "sc.subcategname, " "b.BDID, " @@ -314,7 +314,7 @@ if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute User Acknowlegement required { repeats -= BD_REPEATS_MULTIPLEX_BASE; - th.bd_repeat_user_ = true; + th.bd_repeat_user_ = true; } if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute Silent mode @@ -324,65 +324,35 @@ } if (repeats == 0) - { th.repeatsStr_ = _("None"); - } else if (repeats == 1) - { th.repeatsStr_ = _("Weekly"); - } else if (repeats == 2) - { th.repeatsStr_ = _("Bi-Weekly"); - } else if (repeats == 3) - { th.repeatsStr_ = _("Monthly"); - } else if (repeats == 4) - { th.repeatsStr_ = _("Bi-Monthly"); - } else if (repeats == 5) - { th.repeatsStr_ = _("Quarterly"); - } else if (repeats == 6) - { th.repeatsStr_ = _("Half-Yearly"); - } else if (repeats == 7) - { th.repeatsStr_ = _("Yearly"); - } else if (repeats == 8) - { th.repeatsStr_ = _("Four Months"); - } else if (repeats == 9) - { th.repeatsStr_ = _("Four Weeks"); - } else if (repeats == 10) - { th.repeatsStr_ = _("Daily"); - } else if ( (repeats == 11) && (numRepeats >= 0 ) ) - { th.repeatsStr_ = wxString() << _("In ") << numRepeats << _(" Days"); - } else if ( (repeats == 12) && (numRepeats >= 0 ) ) - { th.repeatsStr_ = wxString() << _("In ") << numRepeats << _(" Months"); - } else if ( (repeats == 13) && (numRepeats >= 0 ) ) - { th.repeatsStr_ = wxString() << _("Every ") << numRepeats << _(" Days"); - } else if ( (repeats == 14) && (numRepeats >= 0 ) ) - { th.repeatsStr_ = wxString() << _("Every ") << numRepeats << _(" Months"); - } wxDateTime today = wxDateTime::Now(); wxTimeSpan ts = th.nextOccurDate_.Subtract(today); @@ -393,13 +363,13 @@ th.daysRemaining_ += 1; th.daysRemainingStr_ = wxString::Format(wxT("%d"), th.daysRemaining_) + _(" days remaining"); - + if (th.daysRemaining_ == 0) { if ((repeats > 10) && (numRepeats < 0) ) th.daysRemainingStr_ = _("Inactive"); } - + if (th.daysRemaining_ < 0) { th.daysRemainingStr_ = wxString::Format(wxT("%d"), abs(th.daysRemaining_)) + _(" days overdue!"); @@ -535,7 +505,7 @@ { case WXK_DELETE: { - wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_TREEPOPUP_DELETE); OnDeleteBDSeries(evt); } @@ -633,15 +603,15 @@ enableEditDeleteButtons(selIndex >= 0); wxStaticText* st = (wxStaticText*)FindWindow(ID_PANEL_BD_STATIC_DETAILS); wxStaticText* stm = (wxStaticText*)FindWindow(ID_PANEL_BD_STATIC_MINI); - - if (selIndex !=-1) + + if (selIndex !=-1) { wxString addInfo; addInfo << trans_[selIndex].categoryStr_ << (trans_[selIndex].subcategoryStr_ == wxT ("") ? wxT ("") : wxT (":") + trans_[selIndex].subcategoryStr_); stm->SetLabel(addInfo); - st ->SetLabel (trans_[selIndex].notes_ ); + st ->SetLabel (trans_[selIndex].notes_ ); } - else + else { st-> SetLabel(Tips(TIPS_BILLS)); stm-> SetLabel(wxT("")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-24 03:47:38
|
Revision: 2381 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2381&view=rev Author: guanlisheng Date: 2012-05-24 03:47:32 +0000 (Thu, 24 May 2012) Log Message: ----------- format & cleanup Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2012-05-24 03:44:30 UTC (rev 2380) +++ trunk/mmex/src/billsdepositspanel.cpp 2012-05-24 03:47:32 UTC (rev 2381) @@ -94,37 +94,13 @@ mmBillsDepositsPanel::~mmBillsDepositsPanel() { - if (m_imageList) - delete m_imageList; - - long col0, col1, col2, col3, col4, col5, col6, col7; - col0 = listCtrlAccount_->GetColumnWidth(0); - col1 = listCtrlAccount_->GetColumnWidth(1); - col2 = listCtrlAccount_->GetColumnWidth(2); - col3 = listCtrlAccount_->GetColumnWidth(3); - col4 = listCtrlAccount_->GetColumnWidth(4); - col5 = listCtrlAccount_->GetColumnWidth(5); - col6 = listCtrlAccount_->GetColumnWidth(6); - col7 = listCtrlAccount_->GetColumnWidth(7); - - wxString col0Str = wxString::Format(wxT("%d"), col0); - wxString col1Str = wxString::Format(wxT("%d"), col1); - wxString col2Str = wxString::Format(wxT("%d"), col2); - wxString col3Str = wxString::Format(wxT("%d"), col3); - wxString col4Str = wxString::Format(wxT("%d"), col4); - wxString col5Str = wxString::Format(wxT("%d"), col5); - wxString col6Str = wxString::Format(wxT("%d"), col6); - wxString col7Str = wxString::Format(wxT("%d"), col7); - + if (m_imageList) delete m_imageList; inidb_->Begin(); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL0_WIDTH"), col0Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL1_WIDTH"), col1Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL2_WIDTH"), col2Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL3_WIDTH"), col3Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL4_WIDTH"), col4Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL5_WIDTH"), col5Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL6_WIDTH"), col6Str); - mmDBWrapper::setINISettingValue(inidb_, wxT("BD_COL7_WIDTH"), col7Str); + for (int i = 0; i < listCtrlAccount_->GetColumnCount(); ++i) + { + int width = listCtrlAccount_->GetColumnWidth(i); + mmDBWrapper::setINISettingValue(inidb_, wxString::Format(wxT("BD_COL%d_WIDTH"), i), wxString() << width); + } inidb_->Commit(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-19 15:24:04
|
Revision: 2633 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2633&view=rev Author: vomikan Date: 2012-06-19 15:23:53 +0000 (Tue, 19 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2012-06-19 14:34:23 UTC (rev 2632) +++ trunk/mmex/src/billsdepositspanel.cpp 2012-06-19 15:23:53 UTC (rev 2633) @@ -106,24 +106,27 @@ void mmBillsDepositsPanel::CreateControls() { + wxConfigBase *config = wxConfigBase::Get(); + + wxSizerFlags flags; + flags.Align(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL).Border(wxTOP|wxLEFT, 5); + wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL); this->SetSizer(itemBoxSizer9); - //this->SetBackgroundColour(mmColors::listBackColor); /* ---------------------- */ - wxPanel* headerPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, + wxPanel* headerPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); - itemBoxSizer9->Add(headerPanel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + itemBoxSizer9->Add(headerPanel, flags); wxBoxSizer* itemBoxSizerVHeader = new wxBoxSizer(wxVERTICAL); headerPanel->SetSizer(itemBoxSizerVHeader); - //headerPanel->SetBackgroundColour(mmColors::listBackColor); wxStaticText* itemStaticText9 = new wxStaticText( headerPanel, ID_PANEL_BD_STATIC_HEADER, - _("Repeating Transactions"), wxDefaultPosition, wxDefaultSize, 0 ); + _("Repeating Transactions")); int font_size = this->GetFont().GetPointSize() + 2; itemStaticText9->SetFont(wxFont(font_size, wxSWISS, wxNORMAL, wxBOLD, FALSE, (""))); - itemBoxSizerVHeader->Add(itemStaticText9, 0, wxALL, 1); + itemBoxSizerVHeader->Add(itemStaticText9, flags); /* ---------------------- */ wxSplitterWindow* itemSplitterWindowBillsDeposit = new wxSplitterWindow( this, @@ -139,7 +142,6 @@ listCtrlBD_ = new billsDepositsListCtrl( this, itemSplitterWindowBillsDeposit, ID_PANEL_BD_LISTCTRL, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_HRULES | wxLC_VRULES | wxLC_VIRTUAL | wxLC_SINGLE_SEL ); - //listCtrlBD_->SetBackgroundColour(mmColors::listDetailsPanelColor); listCtrlBD_->SetImageList(m_imageList, wxIMAGE_LIST_SMALL); listCtrlBD_->InsertColumn(0, _("Payee")); listCtrlBD_->InsertColumn(1, _("Account")); @@ -154,75 +156,61 @@ listCtrlBD_->InsertColumn(6, _("Remaining Days")); listCtrlBD_->InsertColumn(7, _("Notes")); - wxConfigBase *config = wxConfigBase::Get(); + listCtrlBD_->SetColumnWidth(0, config->ReadLong("BD_COL0_WIDTH", 140)); + listCtrlBD_->SetColumnWidth(1, config->ReadLong("BD_COL1_WIDTH", -2)); + listCtrlBD_->SetColumnWidth(2, config->ReadLong("BD_COL2_WIDTH", -2)); + listCtrlBD_->SetColumnWidth(3, config->ReadLong("BD_COL3_WIDTH", -2)); + listCtrlBD_->SetColumnWidth(4, config->ReadLong("BD_COL4_WIDTH", -2)); + listCtrlBD_->SetColumnWidth(5, config->ReadLong("BD_COL5_WIDTH", -2)); + listCtrlBD_->SetColumnWidth(6, config->ReadLong("BD_COL6_WIDTH", -2)); + listCtrlBD_->SetColumnWidth(7, config->ReadLong("BD_COL7_WIDTH", -2)); - long col0 = config->ReadLong("BD_COL0_WIDTH", 140); - long col1 = config->ReadLong("BD_COL1_WIDTH", -2); - long col2 = config->ReadLong("BD_COL2_WIDTH", -2); - long col3 = config->ReadLong("BD_COL3_WIDTH", -2); - long col4 = config->ReadLong("BD_COL4_WIDTH", -2); - long col5 = config->ReadLong("BD_COL5_WIDTH", -2); - long col6 = config->ReadLong("BD_COL6_WIDTH", -2); - long col7 = config->ReadLong("BD_COL7_WIDTH", -2); - - listCtrlBD_->SetColumnWidth(0, col0); - listCtrlBD_->SetColumnWidth(1, col1); - listCtrlBD_->SetColumnWidth(2, col2); - listCtrlBD_->SetColumnWidth(3, col3); - listCtrlBD_->SetColumnWidth(4, col4); - listCtrlBD_->SetColumnWidth(5, col5); - listCtrlBD_->SetColumnWidth(6, col6); - listCtrlBD_->SetColumnWidth(7, col7); - wxPanel* itemPanel12 = new wxPanel( itemSplitterWindowBillsDeposit, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); itemSplitterWindowBillsDeposit->SplitHorizontally(listCtrlBD_, itemPanel12); itemSplitterWindowBillsDeposit->SetMinimumPaneSize(100); itemSplitterWindowBillsDeposit->SetSashGravity(1.0); - itemBoxSizer9->Add(itemSplitterWindowBillsDeposit, 1, wxGROW|wxALL, 1); + itemBoxSizer9->Add(itemSplitterWindowBillsDeposit, 1, wxGROW|wxTOP|wxLEFT, 5); wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL); itemPanel12->SetSizer(itemBoxSizer4); - //itemPanel12->SetBackgroundColour(mmColors::listBackColor); wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer4->Add(itemBoxSizer5); - wxButton* itemButton6 = new wxButton( itemPanel12, wxID_NEW, _("&New")); + wxButton* itemButton6 = new wxButton( itemPanel12, wxID_NEW); itemButton6->SetToolTip(_("New Bills & Deposit Series")); - itemBoxSizer5->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); + itemBoxSizer5->Add(itemButton6, flags); - wxButton* itemButton81 = new wxButton( itemPanel12, wxID_EDIT, _("&Edit")); + wxButton* itemButton81 = new wxButton( itemPanel12, wxID_EDIT); itemButton81->SetToolTip(_("Edit Bills & Deposit Series")); - itemBoxSizer5->Add(itemButton81, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); + itemBoxSizer5->Add(itemButton81, flags); itemButton81->Enable(false); - wxButton* itemButton7 = new wxButton( itemPanel12, wxID_DELETE, _("&Delete")); + wxButton* itemButton7 = new wxButton( itemPanel12, wxID_DELETE); itemButton7->SetToolTip(_("Delete Bills & Deposit Series")); - itemBoxSizer5->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); + itemBoxSizer5->Add(itemButton7, flags); itemButton7->Enable(false); - wxButton* itemButton8 = new wxButton( itemPanel12, wxID_PASTE, _("En&ter"), - wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton8 = new wxButton( itemPanel12, wxID_PASTE, _("En&ter")); itemButton8->SetToolTip(_("Enter Next Bills & Deposit Occurrence")); - itemBoxSizer5->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); + itemBoxSizer5->Add(itemButton8, flags); itemButton8->Enable(false); wxButton* buttonSkipTrans = new wxButton( itemPanel12, wxID_IGNORE, _("&Skip")); buttonSkipTrans->SetToolTip(_("Skip Next Bills & Deposit Occurrence")); - itemBoxSizer5->Add(buttonSkipTrans, 0, wxALIGN_CENTER_VERTICAL|wxALL, 4); + itemBoxSizer5->Add(buttonSkipTrans, flags); buttonSkipTrans->Enable(false); //Infobar-mini - wxStaticText* itemStaticText444 = new wxStaticText(itemPanel12, ID_PANEL_BD_STATIC_MINI, (""), - wxDefaultPosition, wxDefaultSize, 0); - itemBoxSizer5->Add(itemStaticText444, 1, wxGROW|wxTOP, 12); + wxStaticText* itemStaticText444 = new wxStaticText(itemPanel12, ID_PANEL_BD_STATIC_MINI, ""); + itemBoxSizer5->Add(itemStaticText444, flags.Expand().Border(wxALL, 12)); //Infobar - wxStaticText* text = new wxStaticText( itemPanel12, ID_PANEL_BD_STATIC_DETAILS, (""), + wxStaticText* text = new wxStaticText( itemPanel12, ID_PANEL_BD_STATIC_DETAILS, "", wxPoint(-1,-1), wxSize(200, -1), wxNO_BORDER|wxTE_MULTILINE|wxTE_WORDWRAP|wxST_NO_AUTORESIZE); - itemBoxSizer4->Add(text, 1, wxGROW|wxLEFT|wxRIGHT, 14); + itemBoxSizer4->Add(text, 1, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); mmBillsDepositsPanel::updateBottomPanelData(-1); } @@ -507,7 +495,8 @@ { int refID = cp_->trans_[selectedIndex_].id_; cp_->initVirtualListControl(); - RefreshItems(0, ((int)cp_->trans_.size()) - 1); + if (cp_->trans_.size()>0) + RefreshItems(0, ((int)cp_->trans_.size()) - 1); int newIndex = LastSelected(refID); if (newIndex < 0) // item deleted from list. ++ selectedIndex_; // Advance to next item in list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oma...@us...> - 2013-03-16 22:07:00
|
Revision: 3587 http://sourceforge.net/p/moneymanagerex/code/3587 Author: omalleypat Date: 2013-03-16 22:06:57 +0000 (Sat, 16 Mar 2013) Log Message: ----------- fix a bug where the repeating transaction for last day/business day of month would show up as inactive Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2013-03-16 20:51:03 UTC (rev 3586) +++ trunk/mmex/src/billsdepositspanel.cpp 2013-03-16 22:06:57 UTC (rev 3587) @@ -308,14 +308,14 @@ if (th.daysRemaining_ == 0) { - if ((repeats > 10) && (numRepeats < 0) ) + if (((repeats > 10) && (repeats < 15)) && (numRepeats < 0) ) th.daysRemainingStr_ = _("Inactive"); } if (th.daysRemaining_ < 0) { th.daysRemainingStr_ = wxString::Format(wxT("%d"), abs(th.daysRemaining_)) + _(" days overdue!"); - if ((repeats > 10) && (numRepeats < 0) ) + if ( ((repeats > 10) && (repeats < 15)) && (numRepeats < 0) ) th.daysRemainingStr_ = _("Inactive"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oma...@us...> - 2013-05-24 22:16:53
|
Revision: 3973 http://sourceforge.net/p/moneymanagerex/code/3973 Author: omalleypat Date: 2013-05-24 22:16:47 +0000 (Fri, 24 May 2013) Log Message: ----------- Addresses bug 213, for a large number of repeating transactions, the default is now to show the ones due soonest first Modified Paths: -------------- trunk/mmex/src/billsdepositspanel.cpp Modified: trunk/mmex/src/billsdepositspanel.cpp =================================================================== --- trunk/mmex/src/billsdepositspanel.cpp 2013-05-24 18:13:54 UTC (rev 3972) +++ trunk/mmex/src/billsdepositspanel.cpp 2013-05-24 22:16:47 UTC (rev 3973) @@ -78,9 +78,7 @@ transFilterDlg_ = new mmFilterTransactionsDialog(core_, this); initVirtualListControl(); - if (trans_.size() > 1) - listCtrlAccount_->EnsureVisible(((int)trans_.size()) - 1); - + windowsFreezeThaw(this); return TRUE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |