diff options
| author | Gavin Andresen <[email protected]> | 2011-04-12 14:22:12 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-04-12 14:22:12 -0400 |
| commit | 79706a8e48a043b9ca83216ba9cbb7413e81710d (patch) | |
| tree | 8da44bcaca6b7a3ce02c589957da284ac8adf9dd /ui.cpp | |
| parent | Merge branch 'spentpertxout' of https://github.com/sipa/bitcoin (diff) | |
| parent | Allow UPnP mapping when USE_UPNP is defined and miniupnpc is installed at bui... (diff) | |
| download | discoin-79706a8e48a043b9ca83216ba9cbb7413e81710d.tar.xz discoin-79706a8e48a043b9ca83216ba9cbb7413e81710d.zip | |
Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoin
Diffstat (limited to 'ui.cpp')
| -rw-r--r-- | ui.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1665,6 +1665,10 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent) m_checkBoxStartOnSystemStartup->SetValue(fTmpStartOnSystemStartup = GetStartOnSystemStartup()); m_checkBoxMinimizeToTray->SetValue(fMinimizeToTray); m_checkBoxMinimizeOnClose->SetValue(fMinimizeOnClose); + if (fHaveUPnP) + m_checkBoxUseUPnP->SetValue(fUseUPnP); + else + m_checkBoxUseUPnP->Enable(false); m_checkBoxUseProxy->SetValue(fUseProxy); m_textCtrlProxyIP->Enable(fUseProxy); m_textCtrlProxyPort->Enable(fUseProxy); @@ -1784,6 +1788,13 @@ void COptionsDialog::OnButtonApply(wxCommandEvent& event) walletdb.WriteSetting("fMinimizeOnClose", fMinimizeOnClose); } + if (fHaveUPnP && fUseUPnP != m_checkBoxUseUPnP->GetValue()) + { + fUseUPnP = m_checkBoxUseUPnP->GetValue(); + walletdb.WriteSetting("fUseUPnP", fUseUPnP); + MapPort(fUseUPnP); + } + fUseProxy = m_checkBoxUseProxy->GetValue(); walletdb.WriteSetting("fUseProxy", fUseProxy); |