summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svtools/ServerDetailsControls.hxx8
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx20
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx12
-rw-r--r--svtools/uiconfig/ui/placeedit.ui21
4 files changed, 33 insertions, 28 deletions
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 8043d460ab6c..16b8e23f7702 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -25,8 +25,10 @@
class DetailsContainer
{
private:
- Link<> m_aChangeHdl;
- VclPtr<VclGrid> m_pFrame;
+ Link<> m_aChangeHdl;
+ VclPtr<VclGrid> m_pFrame;
+ VclPtr<VclGrid> m_pCommon;
+ bool m_bIsActive;
public:
DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame );
@@ -46,6 +48,8 @@ class DetailsContainer
virtual void setUsername( const OUString& /*rUsername*/ ) { };
+ virtual void setActive( bool bActive = true );
+
protected:
void notifyChange( );
DECL_LINK ( ValueChangeHdl, void * );
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index a6d54154ddc1..fdb385ec71d8 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -150,18 +150,20 @@ void PlaceEditDialog::InitDetails( )
for ( sal_Int32 i = 0; i < aTypesUrlsList.getLength( ) && aTypesNamesList.getLength( ); ++i )
{
OUString sUrl = aTypesUrlsList[i];
- if ( !( sUrl == GDRIVE_BASE_URL && bSkipGDrive ) &&
- !( sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) && bSkipAlfresco ) &&
- !( sUrl == ONEDRIVE_BASE_URL && bSkipOneDrive ) )
- {
- nPos = m_pLBServerType->InsertEntry( aTypesNamesList[i], nPos );
+ nPos = m_pLBServerType->InsertEntry( aTypesNamesList[i], nPos );
- std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, sUrl));
- xCmisDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
- m_aDetailsContainers.push_back(xCmisDetails);
+ std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, sUrl));
+ xCmisDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
+ m_aDetailsContainers.push_back(xCmisDetails);
- nPos++;
+ if ( ( sUrl == GDRIVE_BASE_URL && bSkipGDrive ) ||
+ ( sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) && bSkipAlfresco ) ||
+ ( sUrl == ONEDRIVE_BASE_URL && bSkipOneDrive ) )
+ {
+ xCmisDetails->setActive( false );
}
+
+ nPos++;
}
// Create WebDAV / FTP / SSH details control
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 3d57e29c4268..ccb08ac41313 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -31,9 +31,11 @@ using namespace com::sun::star::task;
using namespace com::sun::star::ucb;
using namespace com::sun::star::uno;
-DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame )
+DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame ) :
+ m_bIsActive ( true )
{
pBuilder->get( m_pFrame, rFrame );
+ pBuilder->get( m_pCommon, "CommonDetails" );
}
DetailsContainer::~DetailsContainer( )
@@ -43,6 +45,9 @@ DetailsContainer::~DetailsContainer( )
void DetailsContainer::show( bool bShow )
{
m_pFrame->Show( bShow );
+
+ m_pFrame->Enable( m_bIsActive );
+ m_pCommon->Enable( m_bIsActive );
}
INetURLObject DetailsContainer::getUrl( )
@@ -63,6 +68,11 @@ void DetailsContainer::notifyChange( )
m_aChangeHdl.Call( this );
}
+void DetailsContainer::setActive( bool bActive )
+{
+ m_bIsActive = bActive;
+}
+
IMPL_LINK_NOARG( DetailsContainer, ValueChangeHdl )
{
notifyChange( );
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 4fb556b52fbb..e2b1c30da674 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -478,9 +478,10 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="UserDetails">
+ <object class="GtkGrid" id="CommonDetails">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label16">
@@ -508,18 +509,6 @@
<property name="top_attach">0</property>
</packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="LabelGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="labelLabel">
<property name="visible">True</property>
@@ -531,7 +520,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
@@ -543,14 +532,14 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
</object>