From 0184604aaf21f8279df9ecbee7be4fbf0bbf99c1 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Sun, 21 Feb 2010 21:42:01 +0000 Subject: transaction filter tabs instead of view->show generated -- version 0.2.5 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@69 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- build-unix.txt | 2 +- db.cpp | 2 - main.cpp | 4 +- serialize.h | 2 +- ui.cpp | 87 ++++++--- ui.h | 16 +- uibase.cpp | 92 ++++++++-- uibase.h | 67 +++---- uiproject.fbp | 553 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 9 files changed, 693 insertions(+), 132 deletions(-) diff --git a/build-unix.txt b/build-unix.txt index 5e3f574afb..395ac973a6 100644 --- a/build-unix.txt +++ b/build-unix.txt @@ -70,7 +70,7 @@ ldconfig Boost ----- If you want to build Boost yourself, -cd /usr/local/boost_1_42_0 +cd /usr/local/boost_1_38_0 su ./bootstrap.sh ./bjam install diff --git a/db.cpp b/db.cpp index bbf24a0e70..51cbb309b4 100644 --- a/db.cpp +++ b/db.cpp @@ -599,7 +599,6 @@ bool CWalletDB::LoadWallet(vector& vchDefaultKeyRet) ssKey >> strKey; // Menu state - if (strKey == "fShowGenerated") ssValue >> fShowGenerated; if (strKey == "fGenerateBitcoins") ssValue >> fGenerateBitcoins; // Options @@ -618,7 +617,6 @@ bool CWalletDB::LoadWallet(vector& vchDefaultKeyRet) } printf("nFileVersion = %d\n", nFileVersion); - printf("fShowGenerated = %d\n", fShowGenerated); printf("fGenerateBitcoins = %d\n", fGenerateBitcoins); printf("nTransactionFee = %"PRI64d"\n", nTransactionFee); printf("addrIncoming = %s\n", addrIncoming.ToString().c_str()); diff --git a/main.cpp b/main.cpp index e5cc881bb2..56020a13ce 100644 --- a/main.cpp +++ b/main.cpp @@ -1335,7 +1335,9 @@ bool CBlock::AcceptBlock() if (!AddToBlockIndex(nFile, nBlockPos)) return error("AcceptBlock() : AddToBlockIndex failed"); - if (hashBestChain == hash && nBestHeight > 28000) + // Don't relay old inventory during initial block download. + // Please keep this constant updated to a few thousand below current block count. + if (hashBestChain == hash && nBestHeight > 40000) RelayInventory(CInv(MSG_BLOCK, hash)); // // Add atoms to user reviews for coins created diff --git a/serialize.h b/serialize.h index 23d61fe977..fb06f881ca 100644 --- a/serialize.h +++ b/serialize.h @@ -19,7 +19,7 @@ class CScript; class CDataStream; class CAutoFile; -static const int VERSION = 204; +static const int VERSION = 205; static const char* pszSubVer = ".0"; diff --git a/ui.cpp b/ui.cpp index 9bd34e0952..68d57b6c44 100644 --- a/ui.cpp +++ b/ui.cpp @@ -20,7 +20,6 @@ extern int g_isPainting; bool fClosedToTray = false; // Settings -int fShowGenerated = true; int fMinimizeToTray = true; int fMinimizeOnClose = true; @@ -282,6 +281,12 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent) { Connect(wxEVT_UITHREADCALL, wxCommandEventHandler(CMainFrame::OnUIThreadCall), NULL, this); + // Set initially selected page + wxNotebookEvent event; + event.SetSelection(0); + OnNotebookPageChanged(event); + m_notebook->ChangeSelection(0); + // Init fRefreshListCtrl = false; fRefreshListCtrlRunning = false; @@ -298,8 +303,8 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent) m_staticTextBalance->SetFont(fontTmp); m_staticTextBalance->SetSize(140, 17); // resize to fit ubuntu's huge default font - dResize = 1.20; - SetSize((dResize + 0.02) * GetSize().GetWidth(), 1.09 * GetSize().GetHeight()); + dResize = 1.22; + SetSize(dResize * GetSize().GetWidth(), 1.09 * GetSize().GetHeight()); #endif m_staticTextBalance->SetLabel(FormatMoney(GetBalance()) + " "); m_listCtrl->SetFocus(); @@ -309,13 +314,17 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent) int nDateWidth = DateTimeStr(1229413914).size() * 6 + 8; if (!strstr(DateTimeStr(1229413914).c_str(), "2008")) nDateWidth += 12; - m_listCtrl->InsertColumn(0, "", wxLIST_FORMAT_LEFT, dResize * 0); - m_listCtrl->InsertColumn(1, "", wxLIST_FORMAT_LEFT, dResize * 0); - m_listCtrl->InsertColumn(2, _("Status"), wxLIST_FORMAT_LEFT, dResize * 110); - m_listCtrl->InsertColumn(3, _("Date"), wxLIST_FORMAT_LEFT, dResize * nDateWidth); - m_listCtrl->InsertColumn(4, _("Description"), wxLIST_FORMAT_LEFT, dResize * 409 - nDateWidth); - m_listCtrl->InsertColumn(5, _("Debit"), wxLIST_FORMAT_RIGHT, dResize * 79); - m_listCtrl->InsertColumn(6, _("Credit"), wxLIST_FORMAT_RIGHT, dResize * 79); + wxListCtrl* pplistCtrl[] = {m_listCtrlAll, m_listCtrlSentReceived, m_listCtrlSent, m_listCtrlReceived}; + foreach(wxListCtrl* p, pplistCtrl) + { + p->InsertColumn(0, "", wxLIST_FORMAT_LEFT, dResize * 0); + p->InsertColumn(1, "", wxLIST_FORMAT_LEFT, dResize * 0); + p->InsertColumn(2, _("Status"), wxLIST_FORMAT_LEFT, dResize * 112); + p->InsertColumn(3, _("Date"), wxLIST_FORMAT_LEFT, dResize * nDateWidth); + p->InsertColumn(4, _("Description"), wxLIST_FORMAT_LEFT, dResize * 409 - nDateWidth); + p->InsertColumn(5, _("Debit"), wxLIST_FORMAT_RIGHT, dResize * 79); + p->InsertColumn(6, _("Credit"), wxLIST_FORMAT_RIGHT, dResize * 79); + } // Init status bar int pnWidths[3] = { -100, 88, 290 }; @@ -341,6 +350,42 @@ CMainFrame::~CMainFrame() ptaskbaricon = NULL; } +void CMainFrame::OnNotebookPageChanged(wxNotebookEvent& event) +{ + event.Skip(); + nPage = event.GetSelection(); + if (nPage == ALL) + { + m_listCtrl = m_listCtrlAll; + fShowGenerated = true; + fShowSent = true; + fShowReceived = true; + } + else if (nPage == SENTRECEIVED) + { + m_listCtrl = m_listCtrlSentReceived; + fShowGenerated = false; + fShowSent = true; + fShowReceived = true; + } + else if (nPage == SENT) + { + m_listCtrl = m_listCtrlSent; + fShowGenerated = false; + fShowSent = true; + fShowReceived = false; + } + else if (nPage == RECEIVED) + { + m_listCtrl = m_listCtrlReceived; + fShowGenerated = false; + fShowSent = false; + fShowReceived = true; + } + RefreshListCtrl(); + m_listCtrl->SetFocus(); +} + void CMainFrame::OnClose(wxCloseEvent& event) { if (fMinimizeOnClose && event.CanVeto() && !IsIconized()) @@ -547,7 +592,6 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex) return false; } - // View->Show Generated if (!fShowGenerated) return false; } @@ -571,7 +615,6 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex) // Credit // string strDescription; - if (wtx.IsCoinBase()) { // Generated @@ -598,6 +641,8 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex) else if (!mapValue["from"].empty() || !mapValue["message"].empty()) { // Received by IP connection + if (!fShowReceived) + return false; if (!mapValue["from"].empty()) strDescription += _("From: ") + mapValue["from"]; if (!mapValue["message"].empty()) @@ -610,6 +655,8 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex) else { // Received by Bitcoin Address + if (!fShowReceived) + return false; foreach(const CTxOut& txout, wtx.vout) { if (txout.IsMine()) @@ -675,6 +722,9 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex) // // Debit // + if (!fShowSent) + return false; + int64 nTxFee = nDebit - wtx.GetValueOut(); wtx.nLinesDisplayed = 0; for (int nOut = 0; nOut < wtx.vout.size(); nOut++) @@ -1035,19 +1085,6 @@ void CMainFrame::OnMenuFileExit(wxCommandEvent& event) Close(true); } -void CMainFrame::OnMenuViewShowGenerated(wxCommandEvent& event) -{ - // View->Show Generated - fShowGenerated = event.IsChecked(); - CWalletDB().WriteSetting("fShowGenerated", fShowGenerated); - RefreshListCtrl(); -} - -void CMainFrame::OnUpdateUIViewShowGenerated(wxUpdateUIEvent& event) -{ - event.Check(fShowGenerated); -} - void CMainFrame::OnMenuOptionsGenerate(wxCommandEvent& event) { // Options->Generate Coins diff --git a/ui.h b/ui.h index 317b87e987..acabd5514a 100644 --- a/ui.h +++ b/ui.h @@ -8,7 +8,6 @@ DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1) extern map mapArgs; // Settings -extern int fShowGenerated; extern int fMinimizeToTray; extern int fMinimizeOnClose; @@ -31,6 +30,7 @@ class CMainFrame : public CMainFrameBase { protected: // Event handlers + void OnNotebookPageChanged(wxNotebookEvent& event); void OnClose(wxCloseEvent& event); void OnIconize(wxIconizeEvent& event); void OnMouseEvents(wxMouseEvent& event); @@ -39,8 +39,6 @@ protected: void OnPaint(wxPaintEvent& event); void OnPaintListCtrl(wxPaintEvent& event); void OnMenuFileExit(wxCommandEvent& event); - void OnMenuViewShowGenerated(wxCommandEvent& event); - void OnUpdateUIViewShowGenerated(wxUpdateUIEvent& event); void OnMenuOptionsGenerate(wxCommandEvent& event); void OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event); void OnMenuOptionsChangeYourAddress(wxCommandEvent& event); @@ -64,6 +62,18 @@ public: ~CMainFrame(); // Custom + enum + { + ALL = 0, + SENTRECEIVED = 1, + SENT = 2, + RECEIVED = 3, + }; + int nPage; + wxListCtrl* m_listCtrl; + bool fShowGenerated; + bool fShowSent; + bool fShowReceived; bool fRefreshListCtrl; bool fRefreshListCtrlRunning; bool fOnSetFocusAddress; diff --git a/uibase.cpp b/uibase.cpp index 340c7abcd4..03ca13db92 100644 --- a/uibase.cpp +++ b/uibase.cpp @@ -29,13 +29,6 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& m_menubar->Append( m_menuFile, _("&File") ); - m_menuView = new wxMenu(); - wxMenuItem* m_menuViewShowGenerated; - m_menuViewShowGenerated = new wxMenuItem( m_menuView, wxID_VIEWSHOWGENERATED, wxString( _("&Show Generated Coins") ) , wxEmptyString, wxITEM_CHECK ); - m_menuView->Append( m_menuViewShowGenerated ); - - m_menubar->Append( m_menuView, _("&View") ); - m_menuOptions = new wxMenu(); wxMenuItem* m_menuOptionsGenerateBitcoins; m_menuOptionsGenerateBitcoins = new wxMenuItem( m_menuOptions, wxID_OPTIONSGENERATEBITCOINS, wxString( _("&Generate Coins") ) , wxEmptyString, wxITEM_CHECK ); @@ -135,8 +128,53 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& bSizer2->Add( bSizer3, 0, wxEXPAND, 5 ); - m_listCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING|wxVSCROLL ); - bSizer2->Add( m_listCtrl, 1, wxEXPAND, 5 ); + m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panel9 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxVERTICAL ); + + m_listCtrlAll = new wxListCtrl( m_panel9, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING|wxVSCROLL ); + bSizer11->Add( m_listCtrlAll, 1, wxEXPAND, 5 ); + + m_panel9->SetSizer( bSizer11 ); + m_panel9->Layout(); + bSizer11->Fit( m_panel9 ); + m_notebook->AddPage( m_panel9, _("All Transactions"), true ); + m_panel91 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer111; + bSizer111 = new wxBoxSizer( wxVERTICAL ); + + m_listCtrlSentReceived = new wxListCtrl( m_panel91, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING|wxVSCROLL ); + bSizer111->Add( m_listCtrlSentReceived, 1, wxEXPAND, 5 ); + + m_panel91->SetSizer( bSizer111 ); + m_panel91->Layout(); + bSizer111->Fit( m_panel91 ); + m_notebook->AddPage( m_panel91, _("Sent/Received"), false ); + m_panel92 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer112; + bSizer112 = new wxBoxSizer( wxVERTICAL ); + + m_listCtrlSent = new wxListCtrl( m_panel92, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING|wxVSCROLL ); + bSizer112->Add( m_listCtrlSent, 1, wxEXPAND, 5 ); + + m_panel92->SetSizer( bSizer112 ); + m_panel92->Layout(); + bSizer112->Fit( m_panel92 ); + m_notebook->AddPage( m_panel92, _("Sent"), false ); + m_panel93 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer113; + bSizer113 = new wxBoxSizer( wxVERTICAL ); + + m_listCtrlReceived = new wxListCtrl( m_panel93, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING|wxVSCROLL ); + bSizer113->Add( m_listCtrlReceived, 1, wxEXPAND, 5 ); + + m_panel93->SetSizer( bSizer113 ); + m_panel93->Layout(); + bSizer113->Fit( m_panel93 ); + m_notebook->AddPage( m_panel93, _("Received"), false ); + + bSizer2->Add( m_notebook, 1, wxEXPAND, 5 ); this->SetSizer( bSizer2 ); this->Layout(); @@ -160,8 +198,6 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) ); this->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaint ) ); this->Connect( m_menuFileExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuFileExit ) ); - this->Connect( m_menuViewShowGenerated->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuViewShowGenerated ) ); - this->Connect( m_menuViewShowGenerated->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CMainFrameBase::OnUpdateUIViewShowGenerated ) ); this->Connect( m_menuOptionsGenerateBitcoins->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsGenerate ) ); this->Connect( m_menuOptionsGenerateBitcoins->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CMainFrameBase::OnUpdateUIOptionsGenerate ) ); this->Connect( m_menuOptionsChangeYourAddress->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsChangeYourAddress ) ); @@ -186,9 +222,19 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& m_textCtrlAddress->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( CMainFrameBase::OnSetFocusAddress ), NULL, this ); m_buttonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonNew ), NULL, this ); m_buttonCopy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonCopy ), NULL, this ); - m_listCtrl->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); - m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); - m_listCtrl->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( CMainFrameBase::OnNotebookPageChanged ), NULL, this ); + m_listCtrlAll->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlAll->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlAll->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_listCtrlSentReceived->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlSentReceived->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlSentReceived->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_listCtrlSent->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlSent->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlSent->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_listCtrlReceived->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlReceived->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlReceived->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); } CMainFrameBase::~CMainFrameBase() @@ -212,8 +258,6 @@ CMainFrameBase::~CMainFrameBase() this->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) ); this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaint ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuFileExit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuViewShowGenerated ) ); - this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CMainFrameBase::OnUpdateUIViewShowGenerated ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsGenerate ) ); this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CMainFrameBase::OnUpdateUIOptionsGenerate ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsChangeYourAddress ) ); @@ -238,9 +282,19 @@ CMainFrameBase::~CMainFrameBase() m_textCtrlAddress->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( CMainFrameBase::OnSetFocusAddress ), NULL, this ); m_buttonNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonNew ), NULL, this ); m_buttonCopy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonCopy ), NULL, this ); - m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); - m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); - m_listCtrl->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( CMainFrameBase::OnNotebookPageChanged ), NULL, this ); + m_listCtrlAll->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlAll->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlAll->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_listCtrlSentReceived->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlSentReceived->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlSentReceived->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_listCtrlSent->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlSent->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlSent->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); + m_listCtrlReceived->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); + m_listCtrlReceived->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); + m_listCtrlReceived->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); } CTxDetailsDialogBase::CTxDetailsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) diff --git a/uibase.h b/uibase.h index 90abd00f1d..1686cbfa8b 100644 --- a/uibase.h +++ b/uibase.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -36,36 +37,34 @@ #include #include #include -#include /////////////////////////////////////////////////////////////////////////// #define wxID_MAINFRAME 1000 -#define wxID_VIEWSHOWGENERATED 1001 -#define wxID_OPTIONSGENERATEBITCOINS 1002 -#define wxID_MENUOPTIONSOPTIONS 1003 -#define wxID_BUTTONSEND 1004 -#define wxID_BUTTONRECEIVE 1005 -#define wxID_TEXTCTRLADDRESS 1006 -#define wxID_BUTTONNEW 1007 -#define wxID_BUTTONCOPY 1008 -#define wxID_TRANSACTIONFEE 1009 -#define wxID_PROXYIP 1010 -#define wxID_PROXYPORT 1011 -#define wxID_TEXTCTRLPAYTO 1012 -#define wxID_BUTTONPASTE 1013 -#define wxID_BUTTONADDRESSBOOK 1014 -#define wxID_TEXTCTRLAMOUNT 1015 -#define wxID_CHOICETRANSFERTYPE 1016 -#define wxID_LISTCTRL 1017 -#define wxID_BUTTONRENAME 1018 -#define wxID_PANELSENDING 1019 -#define wxID_LISTCTRLSENDING 1020 -#define wxID_PANELRECEIVING 1021 -#define wxID_LISTCTRLRECEIVING 1022 -#define wxID_BUTTONDELETE 1023 -#define wxID_BUTTONEDIT 1024 -#define wxID_TEXTCTRL 1025 +#define wxID_OPTIONSGENERATEBITCOINS 1001 +#define wxID_MENUOPTIONSOPTIONS 1002 +#define wxID_BUTTONSEND 1003 +#define wxID_BUTTONRECEIVE 1004 +#define wxID_TEXTCTRLADDRESS 1005 +#define wxID_BUTTONNEW 1006 +#define wxID_BUTTONCOPY 1007 +#define wxID_TRANSACTIONFEE 1008 +#define wxID_PROXYIP 1009 +#define wxID_PROXYPORT 1010 +#define wxID_TEXTCTRLPAYTO 1011 +#define wxID_BUTTONPASTE 1012 +#define wxID_BUTTONADDRESSBOOK 1013 +#define wxID_TEXTCTRLAMOUNT 1014 +#define wxID_CHOICETRANSFERTYPE 1015 +#define wxID_LISTCTRL 1016 +#define wxID_BUTTONRENAME 1017 +#define wxID_PANELSENDING 1018 +#define wxID_LISTCTRLSENDING 1019 +#define wxID_PANELRECEIVING 1020 +#define wxID_LISTCTRLRECEIVING 1021 +#define wxID_BUTTONDELETE 1022 +#define wxID_BUTTONEDIT 1023 +#define wxID_TEXTCTRL 1024 /////////////////////////////////////////////////////////////////////////////// /// Class CMainFrameBase @@ -77,7 +76,6 @@ class CMainFrameBase : public wxFrame protected: wxMenuBar* m_menubar; wxMenu* m_menuFile; - wxMenu* m_menuView; wxMenu* m_menuHelp; wxToolBar* m_toolBar; wxStatusBar* m_statusBar; @@ -91,6 +89,11 @@ class CMainFrameBase : public wxFrame wxStaticText* m_staticTextBalance; wxChoice* m_choiceFilter; + wxNotebook* m_notebook; + wxPanel* m_panel9; + wxPanel* m_panel91; + wxPanel* m_panel92; + wxPanel* m_panel93; // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } @@ -99,8 +102,6 @@ class CMainFrameBase : public wxFrame virtual void OnMouseEvents( wxMouseEvent& event ){ event.Skip(); } virtual void OnPaint( wxPaintEvent& event ){ event.Skip(); } virtual void OnMenuFileExit( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuViewShowGenerated( wxCommandEvent& event ){ event.Skip(); } - virtual void OnUpdateUIViewShowGenerated( wxUpdateUIEvent& event ){ event.Skip(); } virtual void OnMenuOptionsGenerate( wxCommandEvent& event ){ event.Skip(); } virtual void OnUpdateUIOptionsGenerate( wxUpdateUIEvent& event ){ event.Skip(); } virtual void OnMenuOptionsChangeYourAddress( wxCommandEvent& event ){ event.Skip(); } @@ -113,6 +114,7 @@ class CMainFrameBase : public wxFrame virtual void OnSetFocusAddress( wxFocusEvent& event ){ event.Skip(); } virtual void OnButtonNew( wxCommandEvent& event ){ event.Skip(); } virtual void OnButtonCopy( wxCommandEvent& event ){ event.Skip(); } + virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); } virtual void OnListColBeginDrag( wxListEvent& event ){ event.Skip(); } virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); } virtual void OnPaintListCtrl( wxPaintEvent& event ){ event.Skip(); } @@ -121,8 +123,11 @@ class CMainFrameBase : public wxFrame public: wxMenu* m_menuOptions; wxTextCtrl* m_textCtrlAddress; - wxListCtrl* m_listCtrl; - CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = _("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 712,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); + wxListCtrl* m_listCtrlAll; + wxListCtrl* m_listCtrlSentReceived; + wxListCtrl* m_listCtrlSent; + wxListCtrl* m_listCtrlReceived; + CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = _("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 723,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); ~CMainFrameBase(); }; diff --git a/uiproject.fbp b/uiproject.fbp index 113a15796a..8643fbab49 100644 --- a/uiproject.fbp +++ b/uiproject.fbp @@ -18,7 +18,7 @@ 1 0 0 - + wxSYS_COLOUR_BTNFACE @@ -32,7 +32,7 @@ CMainFrameBase - 712,484 + 723,484 wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER Bitcoin @@ -134,26 +134,6 @@ - - &View - m_menuView - protected - - - 0 - 1 - - wxID_VIEWSHOWGENERATED - wxITEM_CHECK - &Show Generated Coins - m_menuViewShowGenerated - none - - - OnMenuViewShowGenerated - OnUpdateUIViewShowGenerated - - &Settings m_menuOptions @@ -346,7 +326,7 @@ - + bSizer2 wxVERTICAL @@ -824,8 +804,9 @@ 5 wxEXPAND 1 - + + 1 @@ -834,16 +815,16 @@ wxID_ANY - m_listCtrl - public + m_notebook + protected - wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING + - wxVSCROLL + @@ -854,39 +835,513 @@ - - - - - OnListColBeginDrag - - - - - - - - - OnListItemActivated - - - - - - - OnPaintListCtrl + OnNotebookPageChanged + + + + + All Transactions + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel9 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer11 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrlAll + public + + + wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING + + + + + wxVSCROLL + + + + + + + + + + + + + + + OnListColBeginDrag + + + + + + + + + OnListItemActivated + + + + + + + + + + + + + OnPaintListCtrl + + + + + + + + + + + + + + Sent/Received + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel91 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer111 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrlSentReceived + public + + + wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING + + + + + wxVSCROLL + + + + + + + + + + + + + + + OnListColBeginDrag + + + + + + + + + OnListItemActivated + + + + + + + + + + + + + OnPaintListCtrl + + + + + + + + + + + + + + Sent + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel92 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer112 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrlSent + public + + + wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING + + + + + wxVSCROLL + + + + + + + + + + + + + + + OnListColBeginDrag + + + + + + + + + OnListItemActivated + + + + + + + + + + + + + OnPaintListCtrl + + + + + + + + + + + + + + Received + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel93 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer113 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrlReceived + public + + + wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING + + + + + wxVSCROLL + + + + + + + + + + + + + + + OnListColBeginDrag + + + + + + + + + OnListItemActivated + + + + + + + + + + + + + OnPaintListCtrl + + + + + + + + + + + -- cgit v1.2.3