diff --git a/EAPMethods/locale/EAPMethods.pot b/EAPMethods/locale/EAPMethods.pot index e56b7e1..bf18952 100644 --- a/EAPMethods/locale/EAPMethods.pot +++ b/EAPMethods/locale/EAPMethods.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: EAPMethods\n" -"POT-Creation-Date: 2016-08-31 14:32+0200\n" +"POT-Creation-Date: 2016-08-31 16:49+0200\n" "PO-Revision-Date: 2016-06-02 12:27+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" @@ -463,15 +463,15 @@ msgstr "" msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:724 lib/EAPBase_UI/include/EAP_UI.h:735 +#: lib/EAPBase_UI/include/EAP_UI.h:726 lib/EAPBase_UI/include/EAP_UI.h:735 msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:727 lib/EAPBase_UI/include/EAP_UI.h:738 -msgid "" +#: lib/EAPBase_UI/include/EAP_UI.h:726 lib/EAPBase_UI/include/EAP_UI.h:735 +msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:944 +#: lib/EAPBase_UI/include/EAP_UI.h:940 msgid "" msgstr "" diff --git a/lib/EAPBase/src/Credentials.cpp b/lib/EAPBase/src/Credentials.cpp index 390037c..f7aa257 100644 --- a/lib/EAPBase/src/Credentials.cpp +++ b/lib/EAPBase/src/Credentials.cpp @@ -144,9 +144,10 @@ wstring eap::credentials::get_identity() const tstring eap::credentials::get_name() const { - if (empty()) return _T(""); tstring identity(std::move(get_identity())); - return !identity.empty() ? identity : _T(""); + return + !identity.empty() ? identity : + empty() ? _T("") : _T(""); } diff --git a/lib/EAPBase_UI/include/EAP_UI.h b/lib/EAPBase_UI/include/EAP_UI.h index d578ddc..3d50afc 100644 --- a/lib/EAPBase_UI/include/EAP_UI.h +++ b/lib/EAPBase_UI/include/EAP_UI.h @@ -720,23 +720,19 @@ protected: inline void UpdateOwnIdentity() { - if (m_cred_own.empty()) - m_own_identity->SetValue(_("")); - else { - wxString identity(m_cred_own.get_name()); - m_own_identity->SetValue(!identity.empty() ? identity : _("")); - } + wxString identity(m_cred_own.get_identity()); + m_own_identity->SetValue( + !identity.empty() ? identity : + m_cred_own.empty() ? _("") : _("")); } inline void UpdatePresharedIdentity() { - if (m_cred_preshared.empty()) - m_preshared_identity->SetValue(_("")); - else { - wxString identity(m_cred_preshared.get_name()); - m_preshared_identity->SetValue(!identity.empty() ? identity : _("")); - } + wxString identity(m_cred_preshared.get_identity()); + m_preshared_identity->SetValue( + !identity.empty() ? identity : + m_cred_preshared.empty() ? _("") : _("")); } /// \endcond