diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-29 01:02:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-10-29 01:02:48 +0100 |
| commit | 252026ce05705401356c45cf1d34dac6d1ea6c10 (patch) | |
| tree | 3d46294bb0bee7026048a37ba9237e112ebf63ec /src | |
| parent | 8a30239ec528446462f3095c1374e2ac53e2b51e (diff) | |
White space: credentials_download_certificate_panel.{cc,h}
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/credentials_download_certificate_panel.cc | 56 | ||||
| -rw-r--r-- | src/wx/credentials_download_certificate_panel.h | 8 |
2 files changed, 32 insertions, 32 deletions
diff --git a/src/wx/credentials_download_certificate_panel.cc b/src/wx/credentials_download_certificate_panel.cc index d90fc2719..864750131 100644 --- a/src/wx/credentials_download_certificate_panel.cc +++ b/src/wx/credentials_download_certificate_panel.cc @@ -30,7 +30,7 @@ using std::function; using boost::optional; -CredentialsDownloadCertificatePanel::CredentialsDownloadCertificatePanel ( +CredentialsDownloadCertificatePanel::CredentialsDownloadCertificatePanel( DownloadCertificateDialog* dialog, function<optional<string> ()> get_username, function<void (string)> set_username, @@ -39,57 +39,57 @@ CredentialsDownloadCertificatePanel::CredentialsDownloadCertificatePanel ( function<void (string)> set_password, function<void ()> unset_password ) - : DownloadCertificatePanel (dialog) - , _get_username (get_username) - , _set_username (set_username) - , _unset_username (unset_username) - , _get_password (get_password) - , _set_password (set_password) - , _unset_password (unset_password) + : DownloadCertificatePanel(dialog) + , _get_username(get_username) + , _set_username(set_username) + , _unset_username(unset_username) + , _get_password(get_password) + , _set_password(set_password) + , _unset_password(unset_password) { - add_label_to_sizer (_table, this, _("User name"), true, 0, wxALIGN_CENTER_VERTICAL); - _username = new wxTextCtrl (this, wxID_ANY, std_to_wx(_get_username().get_value_or("")), wxDefaultPosition, wxSize(300, -1)); - _table->Add (_username, 1, wxEXPAND); + add_label_to_sizer(_table, this, _("User name"), true, 0, wxALIGN_CENTER_VERTICAL); + _username = new wxTextCtrl(this, wxID_ANY, std_to_wx(_get_username().get_value_or("")), wxDefaultPosition, wxSize(300, -1)); + _table->Add(_username, 1, wxEXPAND); - add_label_to_sizer (_table, this, _("Password"), true, 0, wxALIGN_CENTER_VERTICAL); - _password = new PasswordEntry (this); - _password->set (_get_password().get_value_or("")); - _table->Add (_password->get_panel(), 1, wxEXPAND); + add_label_to_sizer(_table, this, _("Password"), true, 0, wxALIGN_CENTER_VERTICAL); + _password = new PasswordEntry(this); + _password->set(_get_password().get_value_or("")); + _table->Add(_password->get_panel(), 1, wxEXPAND); - _username->Bind (wxEVT_TEXT, boost::bind(&CredentialsDownloadCertificatePanel::username_changed, this)); - _password->Changed.connect (boost::bind(&CredentialsDownloadCertificatePanel::password_changed, this)); + _username->Bind(wxEVT_TEXT, boost::bind(&CredentialsDownloadCertificatePanel::username_changed, this)); + _password->Changed.connect(boost::bind(&CredentialsDownloadCertificatePanel::password_changed, this)); - _overall_sizer->Layout (); - _overall_sizer->SetSizeHints (this); + _overall_sizer->Layout(); + _overall_sizer->SetSizeHints(this); } bool -CredentialsDownloadCertificatePanel::ready_to_download () const +CredentialsDownloadCertificatePanel::ready_to_download() const { return DownloadCertificatePanel::ready_to_download() && static_cast<bool>(_get_username()) && _get_username().get() != "" && static_cast<bool>(_get_password()) && _get_password().get() != ""; } void -CredentialsDownloadCertificatePanel::username_changed () +CredentialsDownloadCertificatePanel::username_changed() { wxString const s = _username->GetValue(); if (!s.IsEmpty()) { - _set_username (wx_to_std(s)); + _set_username(wx_to_std(s)); } else { - _unset_username (); + _unset_username(); } - _dialog->setup_sensitivity (); + _dialog->setup_sensitivity(); } void -CredentialsDownloadCertificatePanel::password_changed () +CredentialsDownloadCertificatePanel::password_changed() { string const s = _password->get(); if (!s.empty()) { - _set_password (s); + _set_password(s); } else { - _unset_password (); + _unset_password(); } - _dialog->setup_sensitivity (); + _dialog->setup_sensitivity(); } diff --git a/src/wx/credentials_download_certificate_panel.h b/src/wx/credentials_download_certificate_panel.h index d0449e669..8b2d95a02 100644 --- a/src/wx/credentials_download_certificate_panel.h +++ b/src/wx/credentials_download_certificate_panel.h @@ -32,7 +32,7 @@ class PasswordEntry; class CredentialsDownloadCertificatePanel : public DownloadCertificatePanel { public: - CredentialsDownloadCertificatePanel ( + CredentialsDownloadCertificatePanel( DownloadCertificateDialog* dialog, std::function<boost::optional<std::string> ()> get_username, std::function<void (std::string)> set_username, @@ -42,11 +42,11 @@ public: std::function<void ()> unset_password ); - bool ready_to_download () const override; + bool ready_to_download() const override; private: - void username_changed (); - void password_changed (); + void username_changed(); + void password_changed(); std::function<boost::optional<std::string> (void)> _get_username; std::function<void (std::string)> _set_username; |
