<property name="kind">wxITEM_NORMAL</property>\r
<property name="label">&Encrypt Wallet...</property>\r
<property name="name">m_menuOptionsEncryptWallet</property>\r
- <property name="permission">none</property>\r
+ <property name="permission">public</property>\r
<property name="shortcut"></property>\r
<property name="unchecked_bitmap"></property>\r
<event name="OnMenuSelection">OnMenuOptionsEncryptWallet</event>\r
<property name="kind">wxITEM_NORMAL</property>\r
<property name="label">&Change Wallet Encryption Passphrase...</property>\r
<property name="name">m_menuOptionsChangeWalletPassphrase</property>\r
- <property name="permission">none</property>\r
+ <property name="permission">public</property>\r
<property name="shortcut"></property>\r
<property name="unchecked_bitmap"></property>\r
<event name="OnMenuSelection">OnMenuOptionsChangeWalletPassphrase</event>\r
if (CWalletDB(pwalletMain->strWalletFile,"r").ReadDefaultKey(vchPubKey))
m_textCtrlAddress->SetValue(PubKeyToAddress(vchPubKey));
+ if (pwalletMain->IsCrypted())
+ m_menuOptions->Remove(m_menuOptionsEncryptWallet);
+ else
+ m_menuOptions->Remove(m_menuOptionsChangeWalletPassphrase);
+
// Fill listctrl with wallet transactions
RefreshListCtrl();
}
munlock(&strWalletPass[0], strWalletPass.capacity());
munlock(&strWalletPassTest[0], strWalletPassTest.capacity());
wxMessageBox(_("Wallet Encrypted.\nRemember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer."), "Bitcoin");
+
+ m_menuOptions->Remove(m_menuOptionsEncryptWallet);
+ m_menuOptions->Insert(m_menuOptions->GetMenuItemCount() - 1, m_menuOptionsChangeWalletPassphrase);
}
void CMainFrame::OnMenuOptionsChangeWalletPassphrase(wxCommandEvent& event)
m_menuOptionsChangeYourAddress = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( _("&Your Receiving Addresses...") ) , wxEmptyString, wxITEM_NORMAL );
m_menuOptions->Append( m_menuOptionsChangeYourAddress );
- wxMenuItem* m_menuOptionsEncryptWallet;
m_menuOptionsEncryptWallet = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( _("&Encrypt Wallet...") ) , wxEmptyString, wxITEM_NORMAL );
m_menuOptions->Append( m_menuOptionsEncryptWallet );
- wxMenuItem* m_menuOptionsChangeWalletPassphrase;
m_menuOptionsChangeWalletPassphrase = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( _("&Change Wallet Encryption Passphrase...") ) , wxEmptyString, wxITEM_NORMAL );
m_menuOptions->Append( m_menuOptionsChangeWalletPassphrase );
public:
wxMenu* m_menuOptions;
+ wxMenuItem* m_menuOptionsEncryptWallet;
+ wxMenuItem* m_menuOptionsChangeWalletPassphrase;
wxStatusBar* m_statusBar;
wxTextCtrl* m_textCtrlAddress;
wxListCtrl* m_listCtrlAll;