[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - include/svtools svtools/source
Szymon Kłos
eszkadev at gmail.com
Wed Aug 12 09:04:47 PDT 2015
include/svtools/PlaceEditDialog.hxx | 3 ++-
include/svtools/ServerDetailsControls.hxx | 3 +++
svtools/source/dialogs/PlaceEditDialog.cxx | 17 ++++++++---------
3 files changed, 13 insertions(+), 10 deletions(-)
New commits:
commit 5ce46f505184ce470de874f2506a926575b8445d
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Aug 12 18:02:48 2015 +0200
don't show remember password in the CMIS connections
Change-Id: Ie84c1c3049d9864fce550bdf5745c18d72d740d5
diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx
index c8cdabe..c15735e 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -57,6 +57,7 @@ private:
unsigned int m_nCurrentType;
bool bLabelChanged;
+ bool m_bShowPassword;
public :
@@ -73,7 +74,7 @@ public :
OUString GetPassword() { return m_pEDPassword->GetText(); };
OUString GetUser() { return m_pEDUsername->GetText(); };
- void ShowPasswordControl( bool bShow = true );
+ void ShowPasswordControl( bool bShow = true ) { m_bShowPassword = bShow; }
private:
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 20e69f6..691f528 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -56,6 +56,8 @@ class DetailsContainer
virtual void setActive( bool bActive = true );
+ virtual bool hasPassEntry() { return true; }
+
protected:
void notifyChange( );
DECL_LINK ( ValueChangeHdl, void * );
@@ -140,6 +142,7 @@ class CmisDetailsContainer : public DetailsContainer
virtual INetURLObject getUrl( ) SAL_OVERRIDE;
virtual bool setUrl( const INetURLObject& rUrl ) SAL_OVERRIDE;
virtual void setUsername( const OUString& rUsername ) SAL_OVERRIDE;
+ virtual bool hasPassEntry() SAL_OVERRIDE { return false; }
private:
void selectRepository( );
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index a04f8f3..f70b924 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -23,6 +23,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
, m_xCurrentDetails()
, m_nCurrentType( 0 )
, bLabelChanged( false )
+ , m_bShowPassword( false )
{
get( m_pEDServerName, "name" );
get( m_pLBServerType, "type" );
@@ -59,6 +60,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
: ModalDialog(pParent, "PlaceEditDialog", "svt/ui/placeedit.ui")
, m_xCurrentDetails( )
, bLabelChanged( true )
+ , m_bShowPassword( false )
{
get( m_pEDServerName, "name" );
get( m_pLBServerType, "type" );
@@ -147,15 +149,6 @@ std::shared_ptr<Place> PlaceEditDialog::GetPlace()
return std::make_shared<Place>(m_pEDServerName->GetText(), GetServerUrl(), true);
}
-void PlaceEditDialog::ShowPasswordControl( bool bShow )
-{
- m_pCBPassword->Show( bShow );
- m_pEDPassword->Show( bShow );
- m_pFTPasswordLabel->Show( bShow );
-
- ToggledPassHdl( m_pCBPassword );
-}
-
IMPL_LINK( PlaceEditDialog, ToggledPassHdl, CheckBox*, pCheckBox )
{
bool bChecked = pCheckBox->IsEnabled() && pCheckBox->IsChecked();
@@ -354,6 +347,12 @@ IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl )
m_nCurrentType = nPos;
m_xCurrentDetails->show(true);
+
+ bool bShowPass = m_xCurrentDetails->hasPassEntry();
+ m_pCBPassword->Show( bShowPass );
+ m_pEDPassword->Show( bShowPass );
+ m_pFTPasswordLabel->Show( bShowPass );
+
ToggledPassHdl( m_pCBPassword );
SetSizePixel(GetOptimalSize());
More information about the Libreoffice-commits
mailing list