UI touch-up

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-02-06 13:50:37 +01:00
parent 8d42db2f56
commit 0aab5f2e94
12 changed files with 1085 additions and 775 deletions

View File

@@ -950,7 +950,7 @@ protected:
wxString identity(m_cred_storage.get_identity());
m_storage_identity->SetLabel(
!identity.empty() ? identity :
m_cred_storage.empty() ? _("(empty)") : _("(blank ID)"));
m_cred_storage.empty() ? _("(none)") : _("(blank ID)"));
}
@@ -959,7 +959,7 @@ protected:
wxString identity(m_cred_config.get_identity());
m_config_identity->SetLabel(
!identity.empty() ? identity :
m_cred_config.empty() ? _("(empty)") : _("(blank ID)"));
m_cred_config.empty() ? _("(none)") : _("(blank ID)"));
}
/// \endcond

View File

@@ -241,7 +241,7 @@ wxEAPCredentialsConfigPanelBase::wxEAPCredentialsConfigPanelBase( wxWindow* pare
m_credentials_label->Wrap( FromDIP(440) );
sb_credentials_vert->Add( m_credentials_label, 0, wxALL|wxEXPAND, FromDIP(5) );
m_storage = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use credentials from Credential &Manager"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_storage = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use from Credential &Manager"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_storage->SetToolTip( _("Select this option if you would like to use credentials stored in Windows Credential Manager") );
sb_credentials_vert->Add( m_storage, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, FromDIP(5) );
@@ -285,7 +285,7 @@ wxEAPCredentialsConfigPanelBase::wxEAPCredentialsConfigPanelBase( wxWindow* pare
sb_credentials_vert->Add( sb_storage, 0, wxEXPAND|wxALL, FromDIP(5) );
m_config = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use credentials from &profile configuration"), wxDefaultPosition, wxDefaultSize, 0 );
m_config = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use from &profile configuration"), wxDefaultPosition, wxDefaultSize, 0 );
m_config->SetToolTip( _("Select this option if you would like to store credentials as a part of profile configuration") );
sb_credentials_vert->Add( m_config, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, FromDIP(5) );
@@ -723,62 +723,62 @@ wxEAPProviderSelectDialogBase::~wxEAPProviderSelectDialogBase()
wxEAPIdentityConfigPanelBase::wxEAPIdentityConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, long style ) : wxPanel( parent, id, pos, parent->FromDIP(wxSize( 500,-1 )), style )
{
wxStaticBoxSizer* sb_outer_identity;
sb_outer_identity = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outer Identity") ), wxVERTICAL );
wxStaticBoxSizer* sb_identity;
sb_identity = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Identity") ), wxVERTICAL );
wxBoxSizer* sb_outer_identity_horiz;
sb_outer_identity_horiz = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* sb_identity_horiz;
sb_identity_horiz = new wxBoxSizer( wxHORIZONTAL );
m_outer_identity_icon = new wxStaticBitmap( sb_outer_identity->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
sb_outer_identity_horiz->Add( m_outer_identity_icon, 0, wxALL, FromDIP(5) );
m_identity_icon = new wxStaticBitmap( sb_identity->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
sb_identity_horiz->Add( m_identity_icon, 0, wxALL, FromDIP(5) );
wxBoxSizer* sb_outer_identity_vert;
sb_outer_identity_vert = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* sb_identity_vert;
sb_identity_vert = new wxBoxSizer( wxVERTICAL );
m_outer_identity_label = new wxStaticText( sb_outer_identity->GetStaticBox(), wxID_ANY, _("Select the user ID supplicant introduces itself as to authenticator:"), wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_label->Wrap( FromDIP(440) );
sb_outer_identity_vert->Add( m_outer_identity_label, 0, wxALL|wxEXPAND, FromDIP(5) );
m_identity_label = new wxStaticText( sb_identity->GetStaticBox(), wxID_ANY, _("Select the user ID supplicant introduces itself as to authenticator:"), wxDefaultPosition, wxDefaultSize, 0 );
m_identity_label->Wrap( FromDIP(440) );
sb_identity_vert->Add( m_identity_label, 0, wxALL|wxEXPAND, FromDIP(5) );
wxBoxSizer* sb_outer_identity_radio;
sb_outer_identity_radio = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* sb_identity_radio;
sb_identity_radio = new wxBoxSizer( wxVERTICAL );
m_outer_identity_same = new wxRadioButton( sb_outer_identity->GetStaticBox(), wxID_ANY, _("&True identity"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_outer_identity_same->SetToolTip( _("Use my true user name") );
m_identity_same = new wxRadioButton( sb_identity->GetStaticBox(), wxID_ANY, _("&True identity"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_identity_same->SetToolTip( _("Use my true user name") );
sb_outer_identity_radio->Add( m_outer_identity_same, 1, wxEXPAND, FromDIP(5) );
sb_identity_radio->Add( m_identity_same, 1, wxEXPAND, FromDIP(5) );
m_outer_identity_empty = new wxRadioButton( sb_outer_identity->GetStaticBox(), wxID_ANY, _("Use &empty outer identity"), wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_empty->SetToolTip( _("Omit my user name and use @mydomain.org only") );
m_identity_empty = new wxRadioButton( sb_identity->GetStaticBox(), wxID_ANY, _("Use &empty identity"), wxDefaultPosition, wxDefaultSize, 0 );
m_identity_empty->SetToolTip( _("Omit my user name and use @mydomain.org only") );
sb_outer_identity_radio->Add( m_outer_identity_empty, 1, wxEXPAND, FromDIP(5) );
sb_identity_radio->Add( m_identity_empty, 1, wxEXPAND, FromDIP(5) );
wxBoxSizer* sb_outer_identity_custom;
sb_outer_identity_custom = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* sb_identity_custom;
sb_identity_custom = new wxBoxSizer( wxHORIZONTAL );
m_outer_identity_custom = new wxRadioButton( sb_outer_identity->GetStaticBox(), wxID_ANY, _("&Custom outer identity:"), wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_custom->SetToolTip( _("Specify custom outer identity") );
m_identity_custom = new wxRadioButton( sb_identity->GetStaticBox(), wxID_ANY, _("&Custom identity:"), wxDefaultPosition, wxDefaultSize, 0 );
m_identity_custom->SetToolTip( _("Specify custom identity") );
sb_outer_identity_custom->Add( m_outer_identity_custom, 0, wxEXPAND, FromDIP(5) );
sb_identity_custom->Add( m_identity_custom, 0, wxEXPAND, FromDIP(5) );
m_outer_identity_custom_val = new wxTextCtrl( sb_outer_identity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_custom_val->SetToolTip( _("Custom outer identity to use") );
m_identity_custom_val = new wxTextCtrl( sb_identity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_identity_custom_val->SetToolTip( _("Custom identity to use") );
sb_outer_identity_custom->Add( m_outer_identity_custom_val, 1, wxEXPAND, FromDIP(5) );
sb_identity_custom->Add( m_identity_custom_val, 1, wxEXPAND, FromDIP(5) );
sb_outer_identity_radio->Add( sb_outer_identity_custom, 1, wxEXPAND, FromDIP(5) );
sb_identity_radio->Add( sb_identity_custom, 1, wxEXPAND, FromDIP(5) );
sb_outer_identity_vert->Add( sb_outer_identity_radio, 0, wxEXPAND|wxALL, FromDIP(5) );
sb_identity_vert->Add( sb_identity_radio, 0, wxEXPAND|wxALL, FromDIP(5) );
sb_outer_identity_horiz->Add( sb_outer_identity_vert, 1, wxEXPAND, FromDIP(5) );
sb_identity_horiz->Add( sb_identity_vert, 1, wxEXPAND, FromDIP(5) );
sb_outer_identity->Add( sb_outer_identity_horiz, 0, wxEXPAND, FromDIP(5) );
sb_identity->Add( sb_identity_horiz, 0, wxEXPAND, FromDIP(5) );
this->SetSizer( sb_outer_identity );
this->SetSizer( sb_identity );
this->Layout();
// Connect Events

File diff suppressed because it is too large Load Diff

View File

@@ -344,12 +344,12 @@ class wxEAPIdentityConfigPanelBase : public wxPanel
private:
protected:
wxStaticBitmap* m_outer_identity_icon;
wxStaticText* m_outer_identity_label;
wxRadioButton* m_outer_identity_same;
wxRadioButton* m_outer_identity_empty;
wxRadioButton* m_outer_identity_custom;
wxTextCtrl* m_outer_identity_custom_val;
wxStaticBitmap* m_identity_icon;
wxStaticText* m_identity_label;
wxRadioButton* m_identity_same;
wxRadioButton* m_identity_empty;
wxRadioButton* m_identity_custom;
wxTextCtrl* m_identity_custom_val;
// Virtual event handlers, overide them in your derived class
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }

View File

@@ -481,7 +481,7 @@ wxEAPIdentityConfigPanel::wxEAPIdentityConfigPanel(const eap::config_provider &p
// Load and set icon.
winstd::library lib_shell32;
if (lib_shell32.load(_T("shell32.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE))
m_outer_identity_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(265)));
m_identity_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(265)));
}
@@ -491,12 +491,12 @@ bool wxEAPIdentityConfigPanel::TransferDataToWindow()
{
// Populate identity controls.
if (m_cfg.m_anonymous_identity.empty()) {
m_outer_identity_same->SetValue(true);
m_identity_same->SetValue(true);
} else if (m_cfg.m_anonymous_identity == L"@") {
m_outer_identity_empty->SetValue(true);
m_identity_empty->SetValue(true);
} else {
m_outer_identity_custom->SetValue(true);
m_outer_identity_custom_val->SetValue(m_cfg.m_anonymous_identity);
m_identity_custom->SetValue(true);
m_identity_custom_val->SetValue(m_cfg.m_anonymous_identity);
}
return wxEAPIdentityConfigPanelBase::TransferDataToWindow();
@@ -509,12 +509,12 @@ bool wxEAPIdentityConfigPanel::TransferDataFromWindow()
if (!m_prov.m_read_only) {
// This is not a provider-locked configuration. Save the data.
if (m_outer_identity_same->GetValue())
if (m_identity_same->GetValue())
m_cfg.m_anonymous_identity.clear();
else if (m_outer_identity_empty->GetValue())
else if (m_identity_empty->GetValue())
m_cfg.m_anonymous_identity = L"@";
else
m_cfg.m_anonymous_identity = m_outer_identity_custom_val->GetValue();
m_cfg.m_anonymous_identity = m_identity_custom_val->GetValue();
}
return true;
@@ -527,16 +527,16 @@ void wxEAPIdentityConfigPanel::OnUpdateUI(wxUpdateUIEvent& event)
if (m_prov.m_read_only) {
// This is provider-locked configuration. Disable controls.
m_outer_identity_same ->Enable(false);
m_outer_identity_empty ->Enable(false);
m_outer_identity_custom ->Enable(false);
m_outer_identity_custom_val->Enable(false);
m_identity_same ->Enable(false);
m_identity_empty ->Enable(false);
m_identity_custom ->Enable(false);
m_identity_custom_val->Enable(false);
} else {
// This is not a provider-locked configuration. Selectively enable/disable controls.
m_outer_identity_same ->Enable(true);
m_outer_identity_empty ->Enable(true);
m_outer_identity_custom ->Enable(true);
m_outer_identity_custom_val->Enable(m_outer_identity_custom->GetValue());
m_identity_same ->Enable(true);
m_identity_empty ->Enable(true);
m_identity_custom ->Enable(true);
m_identity_custom_val->Enable(m_identity_custom->GetValue());
}
}