diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-09-10 21:13:27 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-09-10 21:13:27 (GMT) |
commit | 010cdd3a81f35a377cb93a2f5c9fcc94bac7c855 (patch) | |
tree | e8901d79abfa8be2d6fa9e058b2db28ea72fcfe7 /Swift/QtUI | |
parent | dd38b017c12478ef1cc4db37c1e8219e3151742f (diff) | |
download | swift-010cdd3a81f35a377cb93a2f5c9fcc94bac7c855.zip swift-010cdd3a81f35a377cb93a2f5c9fcc94bac7c855.tar.bz2 |
Set default account settings back to the defaults.
Resolves: #1156
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtConnectionSettingsWindow.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Swift/QtUI/QtConnectionSettingsWindow.cpp b/Swift/QtUI/QtConnectionSettingsWindow.cpp index 324eb06..b5afe50 100644 --- a/Swift/QtUI/QtConnectionSettingsWindow.cpp +++ b/Swift/QtUI/QtConnectionSettingsWindow.cpp @@ -49,8 +49,21 @@ QtConnectionSettingsWindow::QtConnectionSettingsWindow(const ClientOptions& opti ClientOptions defaults; if (options.boshURL.empty()) { - bool isDefault = options.useStreamCompression == defaults.useStreamCompression && options.useTLS == defaults.useTLS && options.allowPLAINWithoutTLS == defaults.allowPLAINWithoutTLS && options.useStreamCompression == defaults.useStreamCompression && options.useAcks == defaults.useAcks && options.manualHostname == defaults.manualHostname && options.manualPort == defaults.manualPort && options.proxyType == defaults.proxyType && options.manualProxyHostname == defaults.manualProxyHostname && options.manualProxyPort == defaults.manualProxyPort; - if (!isDefault) { + int i = 0; + bool isDefault = options.useStreamCompression == defaults.useStreamCompression; + isDefault &= options.useTLS == defaults.useTLS; + isDefault &= options.allowPLAINWithoutTLS == defaults.allowPLAINWithoutTLS; + isDefault &= options.useStreamCompression == defaults.useStreamCompression; + isDefault &= options.useAcks == defaults.useAcks; + isDefault &= options.manualHostname == defaults.manualHostname; + isDefault &= options.manualPort == defaults.manualPort; + isDefault &= options.proxyType == defaults.proxyType; + isDefault &= options.manualProxyHostname == defaults.manualProxyHostname; + isDefault &= options.manualProxyPort == defaults.manualProxyPort; + if (isDefault) { + ui.connectionMethod->setCurrentIndex(0); + } + else { ui.connectionMethod->setCurrentIndex(1); ui.manual_useTLS->setCurrentIndex(options.useTLS); ui.manual_allowPLAINWithoutTLS->setChecked(options.allowPLAINWithoutTLS); |