| 49 | } |
| 50 | |
| 51 | void ConnectionSettingsDialog::disable_controls() { |
| 52 | bool proxy_is_used = Button_GetCheck(m_use_proxy); |
| 53 | auto show = proxy_is_used ? TRUE : FALSE; |
| 54 | EnableWindow(m_proxy_anonymous, show); |
| 55 | EnableWindow(m_user_name, show); |
| 56 | EnableWindow(m_host_name, show); |
| 57 | EnableWindow(m_password, show); |
| 58 | EnableWindow(m_port, show); |
| 59 | m_proxy_type_cmb.set_enabled(proxy_is_used); |
| 60 | |
| 61 | if (proxy_is_used) { |
| 62 | auto login_used = Button_GetCheck(m_proxy_anonymous) ? FALSE : TRUE; |
| 63 | bool anonymous_type = |
| 64 | (m_proxy_type_cmb.current_data() == ProxyType::ftp_gateway); |
| 65 | if (anonymous_type) { |
| 66 | login_used = FALSE; |
| 67 | EnableWindow(m_proxy_anonymous, FALSE); |
| 68 | } |
| 69 | EnableWindow(m_user_name, login_used); |
| 70 | EnableWindow(m_password, login_used); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | void ConnectionSettingsDialog::update_controls() { |
| 75 | Button_SetCheck(m_use_proxy, |
nothing calls this directly
no test coverage detected