From 4d9b223ac2b596d93ef772fea27b75d1b959b9ae Mon Sep 17 00:00:00 2001 From: tcatm Date: Mon, 21 Feb 2011 15:56:58 +0100 Subject: remove From/Message fields from SendDialog --- ui.cpp | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'ui.cpp') diff --git a/ui.cpp b/ui.cpp index 17ad630832..fafd3893c8 100644 --- a/ui.cpp +++ b/ui.cpp @@ -1854,7 +1854,7 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi if (fontTmp.GetPointSize() > 9); fontTmp.SetPointSize(9); m_staticTextInstructions->SetFont(fontTmp); - SetSize(725, 380); + SetSize(725, 180); #endif // Set Icon @@ -1862,44 +1862,12 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi iconSend.CopyFromBitmap(wxBitmap(send16noshadow_xpm)); SetIcon(iconSend); - wxCommandEvent event; - OnTextAddress(event); - // Fixup the tab order m_buttonPaste->MoveAfterInTabOrder(m_buttonCancel); m_buttonAddress->MoveAfterInTabOrder(m_buttonPaste); this->Layout(); } -void CSendDialog::OnTextAddress(wxCommandEvent& event) -{ - // Check mark - event.Skip(); - bool fBitcoinAddress = IsValidBitcoinAddress(m_textCtrlAddress->GetValue()); - m_bitmapCheckMark->Show(fBitcoinAddress); - - // Grey out message if bitcoin address - bool fEnable = !fBitcoinAddress; - m_staticTextFrom->Enable(fEnable); - m_textCtrlFrom->Enable(fEnable); - m_staticTextMessage->Enable(fEnable); - m_textCtrlMessage->Enable(fEnable); - m_textCtrlMessage->SetBackgroundColour(wxSystemSettings::GetColour(fEnable ? wxSYS_COLOUR_WINDOW : wxSYS_COLOUR_BTNFACE)); - if (!fEnable && fEnabledPrev) - { - strFromSave = m_textCtrlFrom->GetValue(); - strMessageSave = m_textCtrlMessage->GetValue(); - m_textCtrlFrom->SetValue(_("n/a")); - m_textCtrlMessage->SetValue(_("Can't include a message when sending to a Bitcoin address")); - } - else if (fEnable && !fEnabledPrev) - { - m_textCtrlFrom->SetValue(strFromSave); - m_textCtrlMessage->SetValue(strMessageSave); - } - fEnabledPrev = fEnable; -} - void CSendDialog::OnKillFocusAmount(wxFocusEvent& event) { // Reformat the amount @@ -1993,8 +1961,6 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event) // Message wtx.mapValue["to"] = strAddress; - wtx.mapValue["from"] = m_textCtrlFrom->GetValue(); - wtx.mapValue["message"] = m_textCtrlMessage->GetValue(); // Send to IP address CSendingDialog* pdialog = new CSendingDialog(this, addr, nValue, wtx); -- cgit v1.2.3