summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorAditya <adityasahu1511@gmail.com>2019-01-31 03:50:55 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2019-02-02 10:37:08 +0100
commitf875364d5bf2207410814efe39e1b41f3c283356 (patch)
treee32547d40334726d3a6dad5cfb0c58e9cdfa3587 /svtools
parent28570ba820fb1d5ef30d3f7d3420f6c8136dba56 (diff)
tdf#119812: Hide "Windows Share" server type in Windows OS.
The "Windows Share" server type is non-functional in Windows OS but still shown in the File Services (PlaceEditDialog) dialog. This patch removes its entry from dialog on Windows only so that no more non-functional service can be created. Change-Id: I440c637dd2a566f820a6e8fac826f35cabb9c05f Reviewed-on: https://gerrit.libreoffice.org/66055 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index dfaba1f22488..df8f6f46fddb 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -223,10 +223,17 @@ void PlaceEditDialog::InitDetails( )
xSshDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
m_aDetailsContainers.push_back(xSshDetails);
+ // Remove Windows Share entry from dialog on Windows OS, where it's non-functional
+#if defined(_WIN32)
+ // nPos is the position of first item that is pre-defined in svtools/uiconfig/ui/placeedit.ui,
+ // after other CMIS types were inserted
+ m_xLBServerType->remove(nPos + 3);
+#else
// Create Windows Share control
std::shared_ptr<DetailsContainer> xSmbDetails(std::make_shared<SmbDetailsContainer>(this));
xSmbDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
m_aDetailsContainers.push_back(xSmbDetails);
+#endif
// Set default to first value
m_xLBServerType->set_active(0);