aboutsummaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-04-12 14:22:12 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-04-12 14:22:12 -0400
commit79706a8e48a043b9ca83216ba9cbb7413e81710d (patch)
tree8da44bcaca6b7a3ce02c589957da284ac8adf9dd /ui.cpp
parent2e8b33824f4bd76efd84837335eeb8a025787b4b (diff)
parent8bb5edc1c9054d835ef79c9f1ab3e021b0693303 (diff)
Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoin
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui.cpp b/ui.cpp
index 9ae19e8a6f..45e07d16ea 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -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);