summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-04 16:54:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-05 09:20:10 +0100
commitf1d1854ffe2c1bc456855573b3ed4ad9852f4571 (patch)
treed9d93ef354e172b869312100c51665c2a4bc8308 /uui
parent94fc02ddbdd5aaef701af9963f74050aed75468d (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl-authentication.cxx1
-rw-r--r--uui/source/logindlg.cxx45
-rw-r--r--uui/source/logindlg.hxx7
-rw-r--r--uui/uiconfig/ui/logindialog.ui50
4 files changed, 1 insertions, 102 deletions
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<ui::dialogs::XFolderPicker2> 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<LoginFlags> : is_typed_flags<LoginFlags, 0x01ff> {};
+ template<> struct typed_flags<LoginFlags> : is_typed_flags<LoginFlags, 0x01fe> {};
}
@@ -49,9 +48,6 @@ class LoginDialog : public ModalDialog
VclPtr<FixedText> m_pErrorFT;
VclPtr<FixedText> m_pErrorInfo;
VclPtr<FixedText> m_pRequestInfo;
- VclPtr<FixedText> m_pPathFT;
- VclPtr<Edit> m_pPathED;
- VclPtr<PushButton> m_pPathBtn;
VclPtr<FixedText> m_pNameFT;
VclPtr<Edit> m_pNameED;
VclPtr<FixedText> 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
@@ -187,56 +187,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="pathft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="logindialog|pathft">_Path:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">pathed</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkEntry" id="pathed">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="pathbtn">
- <property name="label" translatable="yes" context="logindialog|pathbtn">_Browse…</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="loginrealm">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>