include/svtools/PlaceEditDialog.hxx | 1 + include/svtools/ServerDetailsControls.hxx | 3 +++ svtools/source/dialogs/PlaceEditDialog.cxx | 11 ++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-)
New commits: commit 3113ecb2fcb6d868a213c5dc978159e18f4e2efa Author: Giuseppe Castagno <giuseppe.casta...@acca-esse.eu> Date: Thu Dec 31 12:04:13 2015 +0100 Related tdf#96833: hide user and password for WebDAV servers... ...because they are asked for and stored in a successive user interaction. Change-Id: I09a3a1e59fe3819a28d7565e83b0db968dfee74b Reviewed-on: https://gerrit.libreoffice.org/21040 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> Tested-by: jan iversen <j...@documentfoundation.org> diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx index f682580..2c274c4 100644 --- a/include/svtools/PlaceEditDialog.hxx +++ b/include/svtools/PlaceEditDialog.hxx @@ -34,6 +34,7 @@ private: std::shared_ptr< DetailsContainer > m_xCurrentDetails; VclPtr<Edit> m_pEDUsername; + VclPtr<FixedText> m_pFTUsernameLabel; VclPtr<CheckBox> m_pCBPassword; VclPtr<Edit> m_pEDPassword; VclPtr<FixedText> m_pFTPasswordLabel; diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx index 8a2289e..e9f4d4c 100644 --- a/include/svtools/ServerDetailsControls.hxx +++ b/include/svtools/ServerDetailsControls.hxx @@ -57,6 +57,8 @@ class DetailsContainer virtual void setUsername( const OUString& /*rUsername*/ ) { }; virtual void setPassword( const OUString& ) { }; + virtual bool enableUserCredentials( ) { return true; }; + void setActive( bool bActive = true ); protected: @@ -98,6 +100,7 @@ class DavDetailsContainer : public HostDetailsContainer virtual ~DavDetailsContainer( ) { }; virtual void show( bool bShow = true ) override; + virtual bool enableUserCredentials( ) override { return false; }; protected: virtual bool verifyScheme( const OUString& rScheme ) override; diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 19634b7..b062b93 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -28,6 +28,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent) get( m_pEDServerName, "name" ); get( m_pLBServerType, "type" ); get( m_pEDUsername, "login" ); + get( m_pFTUsernameLabel, "loginLabel" ); get( m_pBTOk, "ok" ); get( m_pBTCancel, "cancel" ); get( m_pBTDelete, "delete" ); @@ -61,6 +62,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla get( m_pEDServerName, "name" ); get( m_pLBServerType, "type" ); get( m_pEDUsername, "login" ); + get( m_pFTUsernameLabel, "loginLabel" ); get( m_pBTOk, "ok" ); get( m_pBTCancel, "cancel" ); get( m_pBTDelete, "delete" ); @@ -120,6 +122,7 @@ void PlaceEditDialog::dispose() m_pEDServerName.clear(); m_pLBServerType.clear(); m_pEDUsername.clear(); + m_pFTUsernameLabel.clear(); m_pBTOk.clear(); m_pBTCancel.clear(); m_pBTDelete.clear(); @@ -333,9 +336,11 @@ IMPL_LINK_NOARG_TYPED( PlaceEditDialog, SelectTypeHdl, ListBox&, void ) m_xCurrentDetails->show(); - m_pCBPassword->Show( m_bShowPassword ); - m_pEDPassword->Show( m_bShowPassword ); - m_pFTPasswordLabel->Show( m_bShowPassword ); + m_pCBPassword->Show( m_bShowPassword && m_xCurrentDetails->enableUserCredentials() ); + m_pEDPassword->Show( m_bShowPassword && m_xCurrentDetails->enableUserCredentials() ); + m_pFTPasswordLabel->Show( m_bShowPassword && m_xCurrentDetails->enableUserCredentials() ); + m_pEDUsername->Show( m_xCurrentDetails->enableUserCredentials() ); + m_pFTUsernameLabel->Show( m_xCurrentDetails->enableUserCredentials() ); SetSizePixel(GetOptimalSize()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits