diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-04-12 14:22:12 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-04-12 14:22:12 -0400 |
commit | 79706a8e48a043b9ca83216ba9cbb7413e81710d (patch) | |
tree | 8da44bcaca6b7a3ce02c589957da284ac8adf9dd /ui.cpp | |
parent | 2e8b33824f4bd76efd84837335eeb8a025787b4b (diff) | |
parent | 8bb5edc1c9054d835ef79c9f1ab3e021b0693303 (diff) |
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); |