diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-20 21:59:59 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-20 21:59:59 +0000 |
commit | 75199de534a590329a3b636d63fade2e4544ce97 (patch) | |
tree | b82f1257a90f12401399eac4b0c9aeee88881003 /ui.h | |
parent | c6ab3cf6d9cf5f5ade3b8fc48590e1bc4794cb43 (diff) |
Address Book with tabs instead of separate Your Address book, v0.2.4
with live update of default address in main window,
New... button on main window for creating new receiving address,
made receiving address labels more visible,
ask user before paying transaction fee,
when sending to bitcoin address also use a bitcoin address for the change,
added some event.Skip() to fix UI glitches
-- version 0.2.4
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@68 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'ui.h')
-rw-r--r-- | ui.h | 62 |
1 files changed, 27 insertions, 35 deletions
@@ -2,11 +2,9 @@ // Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
-
-
-
DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1)
+
extern map<string, string> mapArgs;
// Settings
@@ -22,6 +20,7 @@ void UIThreadCall(boost::function0<void>); void MainFrameRepaint();
void Shutdown(void* parg);
int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
+bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent);
@@ -51,7 +50,7 @@ protected: void OnButtonAddressBook(wxCommandEvent& event);
void OnSetFocusAddress(wxFocusEvent& event);
void OnMouseEventsAddress(wxMouseEvent& event);
- void OnButtonChange(wxCommandEvent& event);
+ void OnButtonNew(wxCommandEvent& event);
void OnButtonCopy(wxCommandEvent& event);
void OnListColBeginDrag(wxListEvent& event);
void OnListItemActivated(wxListEvent& event);
@@ -205,53 +204,39 @@ void SendingDialogOnReply3(void* parg, CDataStream& vRecv); -class CYourAddressDialog : public CYourAddressDialogBase
-{
-protected:
- // Event handlers
- void OnListEndLabelEdit(wxListEvent& event);
- void OnListItemSelected(wxListEvent& event);
- void OnListItemActivated(wxListEvent& event);
- void OnButtonRename(wxCommandEvent& event);
- void OnButtonNew(wxCommandEvent& event);
- void OnButtonCopy(wxCommandEvent& event);
- void OnButtonOK(wxCommandEvent& event);
- void OnButtonCancel(wxCommandEvent& event);
- void OnClose(wxCloseEvent& event);
-
-public:
- /** Constructor */
- CYourAddressDialog(wxWindow* parent);
- CYourAddressDialog(wxWindow* parent, const string& strInitSelected);
-
- // Custom
- wxString GetAddress();
-};
-
-
-
class CAddressBookDialog : public CAddressBookDialogBase
{
protected:
// Event handlers
+ void OnNotebookPageChanged(wxNotebookEvent& event);
void OnListEndLabelEdit(wxListEvent& event);
void OnListItemSelected(wxListEvent& event);
void OnListItemActivated(wxListEvent& event);
- void OnButtonEdit(wxCommandEvent& event);
void OnButtonDelete(wxCommandEvent& event);
- void OnButtonNew(wxCommandEvent& event);
void OnButtonCopy(wxCommandEvent& event);
+ void OnButtonEdit(wxCommandEvent& event);
+ void OnButtonNew(wxCommandEvent& event);
void OnButtonOK(wxCommandEvent& event);
void OnButtonCancel(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
public:
/** Constructor */
- CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, bool fSendingIn);
+ CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, int nPageIn, bool fDuringSendIn);
// Custom
- bool fSending;
+ enum
+ {
+ SENDING = 0,
+ RECEIVING = 1,
+ };
+ int nPage;
+ wxListCtrl* m_listCtrl;
+ bool fDuringSend;
wxString GetAddress();
+ wxString GetSelectedAddress();
+ wxString GetSelectedSendingAddress();
+ wxString GetSelectedReceivingAddress();
bool CheckIfMine(const string& strAddress, const string& strTitle);
};
@@ -282,18 +267,25 @@ public: const string& strMessage2="",
const string& strValue2="") : CGetTextFromUserDialogBase(parent, wxID_ANY, strCaption)
{
+ int x = GetSize().GetWidth();
+ int y = GetSize().GetHeight();
m_staticTextMessage1->SetLabel(strMessage1);
m_textCtrl1->SetValue(strValue1);
+ y += wxString(strMessage1).Freq('\n') * 14;
if (!strMessage2.empty())
{
m_staticTextMessage2->Show(true);
m_staticTextMessage2->SetLabel(strMessage2);
m_textCtrl2->Show(true);
m_textCtrl2->SetValue(strValue2);
- SetSize(wxDefaultCoord, 180);
+ y += 46 + wxString(strMessage2).Freq('\n') * 14;
}
if (!fWindows)
- SetSize(1.14 * GetSize().GetWidth(), 1.14 * GetSize().GetHeight());
+ {
+ x *= 1.14;
+ y *= 1.14;
+ }
+ SetSize(x, y);
}
// Custom
|