summaryrefslogtreecommitdiff
path: root/svtools/source/dialogs/PlaceEditDialog.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-08-26 13:48:59 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-08-29 12:33:20 +0200
commit51c3a6421ecdb3443121c26e3bdeb21b07bd1fd8 (patch)
treecd68488980d4da4f0fc9f4c8099c0534dd9a1e86 /svtools/source/dialogs/PlaceEditDialog.cxx
parentc879fa8e5fd7779ca242fe368cbdd70084df049b (diff)
remember password for all types of service
Change-Id: I8620332ac5228eee1d7c16d0b0ff7920031be331
Diffstat (limited to 'svtools/source/dialogs/PlaceEditDialog.cxx')
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx32
1 files changed, 6 insertions, 26 deletions
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index b244494fbfda..68e5741be0bf 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -23,7 +23,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
, m_xCurrentDetails()
, m_nCurrentType( 0 )
, bLabelChanged( false )
- , m_bShowPassword( false )
+ , m_bShowPassword( true )
{
get( m_pEDServerName, "name" );
get( m_pLBServerType, "type" );
@@ -36,11 +36,6 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
get( m_pEDPassword, "password" );
get( m_pFTPasswordLabel, "passwordLabel" );
- m_pEDPassword->Hide();
- m_pFTPasswordLabel->Hide();
- m_pCBPassword->Hide();
- m_pCBPassword->SetToggleHdl( LINK( this, PlaceEditDialog, ToggledPassHdl ) );
-
m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
m_pBTOk->Enable( false );
@@ -52,6 +47,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
m_pLBServerType->SetSelectHdl( LINK( this, PlaceEditDialog, SelectTypeHdl ) );
m_pEDUsername->SetModifyHdl( LINK( this, PlaceEditDialog, EditUsernameHdl ) );
+ m_pEDPassword->SetModifyHdl( LINK( this, PlaceEditDialog, EditUsernameHdl ) );
InitDetails( );
}
@@ -76,7 +72,6 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
m_pEDPassword->Hide();
m_pFTPasswordLabel->Hide();
m_pCBPassword->Hide();
- m_pCBPassword->SetToggleHdl( LINK( this, PlaceEditDialog, ToggledPassHdl ) );
m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
m_pBTDelete->SetClickHdl ( LINK( this, PlaceEditDialog, DelHdl) );
@@ -149,19 +144,6 @@ std::shared_ptr<Place> PlaceEditDialog::GetPlace()
return std::make_shared<Place>(m_pEDServerName->GetText(), GetServerUrl(), true);
}
-IMPL_LINK( PlaceEditDialog, ToggledPassHdl, CheckBox*, pCheckBox )
-{
- bool bChecked = pCheckBox->IsEnabled() && pCheckBox->IsChecked();
-
- m_pEDPassword->Enable( bChecked );
- m_pFTPasswordLabel->Enable( bChecked );
-
- if ( !bChecked )
- m_pEDPassword->SetText( "" );
-
- return 0;
-}
-
void PlaceEditDialog::InitDetails( )
{
// Create CMIS controls for each server type
@@ -322,6 +304,7 @@ IMPL_LINK_NOARG( PlaceEditDialog, EditUsernameHdl )
it != m_aDetailsContainers.end( ); ++it )
{
( *it )->setUsername( OUString( m_pEDUsername->GetText() ) );
+ ( *it )->setPassword( m_pEDPassword->GetText() );
}
EditHdl(NULL);
@@ -350,12 +333,9 @@ IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl )
m_xCurrentDetails->show();
- bool bShowPass = m_xCurrentDetails->hasPassEntry();
- m_pCBPassword->Show( bShowPass );
- m_pEDPassword->Show( bShowPass );
- m_pFTPasswordLabel->Show( bShowPass );
-
- ToggledPassHdl( m_pCBPassword );
+ m_pCBPassword->Show( m_bShowPassword );
+ m_pEDPassword->Show( m_bShowPassword );
+ m_pFTPasswordLabel->Show( m_bShowPassword );
SetSizePixel(GetOptimalSize());