From f1d1854ffe2c1bc456855573b3ed4ad9852f4571 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 4 Jan 2018 16:54:27 +0200 Subject: remove NoPath from LoginFlags since it is always set when calling HideControls_Impl, and therefore remove the now unused UI controls Change-Id: I8a2a6a34b64dd7b0bf909c810bbd7fea8ad2c7a5 Reviewed-on: https://gerrit.libreoffice.org/47403 Tested-by: Jenkins Reviewed-by: Noel Grandin --- uui/source/iahndl-authentication.cxx | 1 - uui/source/logindlg.cxx | 45 -------------------------------- uui/source/logindlg.hxx | 7 +---- uui/uiconfig/ui/logindialog.ui | 50 ------------------------------------ 4 files changed, 1 insertion(+), 102 deletions(-) (limited to 'uui') diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index b5ec2ed481fd..643e0e12a4e2 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -74,7 +74,6 @@ executeLoginDialog( bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials(); LoginFlags nFlags = LoginFlags::NONE; - nFlags |= LoginFlags::NoPath; if (rInfo.GetErrorText().isEmpty()) nFlags |= LoginFlags::NoErrorText; if (!bAccount) diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index c4a5c9d305cc..53011ff1ddf5 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -45,9 +45,6 @@ void LoginDialog::dispose() m_pErrorFT.clear(); m_pErrorInfo.clear(); m_pRequestInfo.clear(); - m_pPathFT.clear(); - m_pPathED.clear(); - m_pPathBtn.clear(); m_pNameFT.clear(); m_pNameED.clear(); m_pPasswordFT.clear(); @@ -68,18 +65,6 @@ void LoginDialog::SetPassword( const OUString& rNew ) void LoginDialog::HideControls_Impl( LoginFlags nFlags ) { - if ( nFlags & LoginFlags::NoPath ) - { - m_pPathFT->Hide(); - m_pPathED->Hide(); - m_pPathBtn->Hide(); - } - else if ( nFlags & LoginFlags::PathReadonly ) - { - m_pPathED->Enable( false ); - m_pPathBtn->Enable( false ); - } - if ( nFlags & LoginFlags::NoUsername ) { m_pNameFT->Hide(); @@ -122,9 +107,6 @@ void LoginDialog::EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ) m_pErrorInfo->Enable( !bUseSysCredsEnabled ); m_pErrorFT->Enable( !bUseSysCredsEnabled ); m_pRequestInfo->Enable( !bUseSysCredsEnabled ); - m_pPathFT->Enable( !bUseSysCredsEnabled ); - m_pPathED->Enable( !bUseSysCredsEnabled ); - m_pPathBtn->Enable( !bUseSysCredsEnabled ); m_pNameFT->Enable( !bUseSysCredsEnabled ); m_pNameED->Enable( !bUseSysCredsEnabled ); m_pPasswordFT->Enable( !bUseSysCredsEnabled ); @@ -158,28 +140,6 @@ IMPL_LINK_NOARG(LoginDialog, OKHdl_Impl, Button*, void) EndDialog( RET_OK ); } -IMPL_LINK_NOARG(LoginDialog, PathHdl_Impl, Button*, void) -{ - try - { - uno::Reference xFolderPicker = ui::dialogs::FolderPicker::create(comphelper::getProcessComponentContext()); - - OUString aPath( m_pPathED->GetText() ); - osl::FileBase::getFileURLFromSystemPath( aPath, aPath ); - xFolderPicker->setDisplayDirectory( aPath ); - - if (xFolderPicker->execute() == ui::dialogs::ExecutableDialogResults::OK) - { - osl::FileBase::getSystemPathFromFileURL( xFolderPicker->getDirectory(), aPath ); - m_pPathED->SetText( aPath ); - } - } - catch (uno::Exception & e) - { - SAL_WARN("uui", "LoginDialog::PathHdl_Impl: caught " << e); - } -} - IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl, Button*, void) { EnableUseSysCredsControls_Impl( m_pUseSysCredsCB->IsChecked() ); @@ -193,9 +153,6 @@ LoginDialog::LoginDialog(vcl::Window* pParent, LoginFlags nFlags, get(m_pErrorFT, "errorft"); get(m_pErrorInfo, "errorinfo"); get(m_pRequestInfo, "requestinfo"); - get(m_pPathFT, "pathft"); - get(m_pPathED, "pathed"); - get(m_pPathBtn, "pathbtn"); get(m_pNameFT, "nameft"); get(m_pNameED, "nameed"); get(m_pPasswordFT, "passwordft"); @@ -211,11 +168,9 @@ LoginDialog::LoginDialog(vcl::Window* pParent, LoginFlags nFlags, SetRequest(); - m_pPathED->SetMaxTextLen( _MAX_PATH ); m_pNameED->SetMaxTextLen( _MAX_PATH ); m_pOKBtn->SetClickHdl( LINK( this, LoginDialog, OKHdl_Impl ) ); - m_pPathBtn->SetClickHdl( LINK( this, LoginDialog, PathHdl_Impl ) ); m_pUseSysCredsCB->SetClickHdl( LINK( this, LoginDialog, UseSysCredsHdl_Impl ) ); HideControls_Impl( nFlags ); diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 8b6e7731e498..85b2ef3f1f99 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -29,7 +29,6 @@ enum class LoginFlags { NONE = 0x0000, - NoPath = 0x0001, // hide "path" NoUsername = 0x0002, // hide "name" NoPassword = 0x0004, // hide "password" NoSavePassword = 0x0008, // hide "save password" @@ -40,7 +39,7 @@ enum class LoginFlags { NoUseSysCreds = 0x0100, // hide "use system credentials" }; namespace o3tl { - template<> struct typed_flags : is_typed_flags {}; + template<> struct typed_flags : is_typed_flags {}; } @@ -49,9 +48,6 @@ class LoginDialog : public ModalDialog VclPtr m_pErrorFT; VclPtr m_pErrorInfo; VclPtr m_pRequestInfo; - VclPtr m_pPathFT; - VclPtr m_pPathED; - VclPtr m_pPathBtn; VclPtr m_pNameFT; VclPtr m_pNameED; VclPtr m_pPasswordFT; @@ -69,7 +65,6 @@ class LoginDialog : public ModalDialog void SetRequest(); DECL_LINK(OKHdl_Impl, Button*, void); - DECL_LINK(PathHdl_Impl, Button*, void); DECL_LINK(UseSysCredsHdl_Impl, Button*, void); public: diff --git a/uui/uiconfig/ui/logindialog.ui b/uui/uiconfig/ui/logindialog.ui index be927fe941df..dc03e7cb24a8 100644 --- a/uui/uiconfig/ui/logindialog.ui +++ b/uui/uiconfig/ui/logindialog.ui @@ -186,56 +186,6 @@ 5 - - - True - False - 0 - _Path: - True - pathed - - - 0 - 4 - - - - - True - False - 12 - - - True - True - True - - - - 0 - 0 - - - - - _Browse… - True - True - True - True - - - 1 - 0 - - - - - 1 - 4 - - False -- cgit v1.2.3