diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/ServerDetailsControls.cxx | 107 | ||||
-rw-r--r-- | svtools/uiconfig/ui/placeedit.ui | 320 |
2 files changed, 162 insertions, 265 deletions
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index ccb08ac41313..ad4750e27ece 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -31,23 +31,30 @@ 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 ) : m_bIsActive ( true ) { - pBuilder->get( m_pFrame, rFrame ); - pBuilder->get( m_pCommon, "CommonDetails" ); + pBuilder->get( m_pDetailsGrid, "Details" ); + pBuilder->get( m_pHostBox, "HostDetails" ); + pBuilder->get( m_pEDHost, "host" ); + pBuilder->get( m_pFTHost, "hostLabel" ); + pBuilder->get( m_pEDPort, "port-nospin" ); + pBuilder->get( m_pFTPort, "portLabel" ); + pBuilder->get( m_pEDRoot, "path" ); + pBuilder->get( m_pFTRoot, "pathLabel" ); } DetailsContainer::~DetailsContainer( ) { } -void DetailsContainer::show( bool bShow ) +void DetailsContainer::show( bool ) { - m_pFrame->Show( bShow ); + m_pDetailsGrid->Enable( m_bIsActive ); - m_pFrame->Enable( m_bIsActive ); - m_pCommon->Enable( m_bIsActive ); + m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); + m_pEDPort->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); + m_pEDRoot->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); } INetURLObject DetailsContainer::getUrl( ) @@ -80,34 +87,34 @@ IMPL_LINK_NOARG( DetailsContainer, ValueChangeHdl ) } HostDetailsContainer::HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme ) : - DetailsContainer( pBuilder, "HostDetails" ), + DetailsContainer( pBuilder ), m_nDefaultPort( nPort ), m_sScheme( sScheme ) { - pBuilder->get( m_pEDHost, "host" ); - m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); - - pBuilder->get( m_pEDPort, "port-nospin" ); - m_pEDPort->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); - - pBuilder->get( m_pEDPath, "path" ); - m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); - show( false ); } void HostDetailsContainer::show( bool bShow ) { + m_pFTHost->Show( bShow ); + m_pHostBox->Show( bShow ); + m_pEDRoot->Show( bShow ); + m_pFTRoot->Show( bShow ); + DetailsContainer::show( bShow ); + if ( bShow ) + { m_pEDPort->SetValue( m_nDefaultPort ); + m_pEDHost->SetText( m_sHost ); + } } INetURLObject HostDetailsContainer::getUrl( ) { OUString sHost = m_pEDHost->GetText().trim( ); sal_Int64 nPort = m_pEDPort->GetValue(); - OUString sPath = m_pEDPath->GetText().trim( ); + OUString sPath = m_pEDRoot->GetText().trim( ); OUString sUrl; if ( !sHost.isEmpty( ) ) @@ -132,7 +139,7 @@ bool HostDetailsContainer::setUrl( const INetURLObject& rUrl ) { m_pEDHost->SetText( rUrl.GetHost( ) ); m_pEDPort->SetValue( rUrl.GetPort( ) ); - m_pEDPath->SetText( rUrl.GetURLPath() ); + m_pEDRoot->SetText( rUrl.GetURLPath() ); } return bSuccess; @@ -198,17 +205,13 @@ IMPL_LINK( DavDetailsContainer, ToggledDavsHdl, CheckBox*, pCheckBox ) } SmbDetailsContainer::SmbDetailsContainer( VclBuilderContainer* pBuilder ) : - DetailsContainer( pBuilder, "SmbDetails" ) + DetailsContainer( pBuilder ) { - pBuilder->get( m_pEDHost, "smbHost" ); - m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); + pBuilder->get( m_pEDShare, "share" ); + pBuilder->get( m_pFTShare, "shareLabel" ); - pBuilder->get( m_pEDShare, "smbShare" ); m_pEDShare->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); - pBuilder->get( m_pEDPath, "smbPath" ); - m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); - show( false ); } @@ -216,7 +219,7 @@ INetURLObject SmbDetailsContainer::getUrl( ) { OUString sHost = m_pEDHost->GetText().trim( ); OUString sShare = m_pEDShare->GetText().trim( ); - OUString sPath = m_pEDPath->GetText().trim( ); + OUString sPath = m_pEDRoot->GetText().trim( ); OUString sUrl; if ( !sHost.isEmpty( ) ) @@ -252,14 +255,27 @@ bool SmbDetailsContainer::setUrl( const INetURLObject& rUrl ) m_pEDHost->SetText( rUrl.GetHost( ) ); m_pEDShare->SetText( sShare ); - m_pEDPath->SetText( sPath ); + m_pEDRoot->SetText( sPath ); } return bSuccess; } +void SmbDetailsContainer::show( bool bShow ) +{ + m_pEDShare->Show( bShow ); + m_pFTShare->Show( bShow ); + m_pEDRoot->Show( bShow ); + m_pFTRoot->Show( bShow ); + + m_pFTHost->Show( bShow ); + m_pHostBox->Show( bShow ); + m_pEDPort->Enable( !bShow ); + m_pFTPort->Enable( !bShow ); +} + CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder, OUString const & sBinding ) : - DetailsContainer( pBuilder, "CmisDetails" ), + DetailsContainer( pBuilder ), m_sUsername( ), m_xCmdEnv( ), m_aRepoIds( ), @@ -271,39 +287,50 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder, OUStr InteractionHandler::createWithParent(xContext, 0), UNO_QUERY ); m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() ); - pBuilder->get( m_pEDBinding, "binding" ); + pBuilder->get( m_pFTRepository, "repositoryLabel" ); pBuilder->get( m_pLBRepository, "repositories" ); pBuilder->get( m_pBTRepoRefresh, "repositoriesRefresh" ); - - pBuilder->get( m_pEDRoot, "cmisPath" ); + pBuilder->get( m_pRepositoryBox, "RepositoryDetails" ); show( false ); } void CmisDetailsContainer::show( bool bShow ) { - m_pEDBinding->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); m_pLBRepository->SetSelectHdl( LINK( this, CmisDetailsContainer, SelectRepoHdl ) ); m_pBTRepoRefresh->SetClickHdl( LINK( this, CmisDetailsContainer, RefreshReposHdl ) ); - m_pEDRoot->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); - m_pEDBinding->SetText( m_sBinding ); + m_pEDHost->SetText( m_sBinding ); if( ( m_sBinding == GDRIVE_BASE_URL ) || m_sBinding.startsWith( ALFRESCO_CLOUD_BASE_URL ) || ( m_sBinding == ONEDRIVE_BASE_URL ) ) { - DetailsContainer::show( false ); + m_pFTHost->Show( false ); + m_pHostBox->Show( false ); + m_pFTRepository->Show( false ); + m_pRepositoryBox->Show( false ); + m_pEDRoot->Show( false ); + m_pFTRoot->Show( false ); } else { - DetailsContainer::show( bShow ); + m_pFTHost->Show( bShow ); + m_pHostBox->Show( bShow ); + m_pFTRepository->Show( bShow ); + m_pRepositoryBox->Show( bShow ); + m_pEDRoot->Show( bShow ); + m_pFTRoot->Show( bShow ); } + + DetailsContainer::show( bShow ); + m_pEDPort->Enable( !bShow ); + m_pFTPort->Enable( !bShow ); } INetURLObject CmisDetailsContainer::getUrl( ) { - OUString sBindingUrl = m_pEDBinding->GetText().trim( ); + OUString sBindingUrl = m_pEDHost->GetText().trim( ); OUString sPath = m_pEDRoot->GetText().trim( ); bool bSkip = true; @@ -344,7 +371,7 @@ bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl ) m_sBinding = aHostUrl.GetURLNoMark( ); m_sRepoId = aHostUrl.GetMark( ); - m_pEDBinding->SetText( m_sBinding ); + m_pEDHost->SetText( m_sBinding ); m_pEDRoot->SetText( rUrl.GetURLPath() ); } return bSuccess; @@ -368,7 +395,7 @@ void CmisDetailsContainer::selectRepository( ) IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl ) { - OUString sBindingUrl = m_pEDBinding->GetText().trim( ); + OUString sBindingUrl = m_pEDHost->GetText().trim( ); OUString sEncodedUsername = ""; diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui index e2b1c30da674..ec5c41e4f5b8 100644 --- a/svtools/uiconfig/ui/placeedit.ui +++ b/svtools/uiconfig/ui/placeedit.ui @@ -162,7 +162,7 @@ </packing> </child> <child> - <object class="GtkGrid" id="HostDetails"> + <object class="GtkGrid" id="Details"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="row_spacing">6</property> @@ -181,21 +181,6 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="webdavs"> - <property name="label" translatable="yes">Secure connection</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="hexpand">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - <property name="width">3</property> - </packing> - </child> - <child> <object class="GtkLabel" id="pathLabel"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -206,7 +191,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">6</property> </packing> </child> <child> @@ -218,112 +203,77 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">1</property> - <property name="width">3</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="host"> - <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">1</property> - <property name="top_attach">0</property> + <property name="top_attach">6</property> </packing> </child> <child> - <object class="GtkLabel" id="portLabel"> + <object class="GtkLabel" id="shareLabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Port:</property> + <property name="label" translatable="yes">Share:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">port-nospin</property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left_attach">0</property> + <property name="top_attach">2</property> </packing> </child> <child> - <object class="GtkSpinButton" id="port-nospin"> + <object class="GtkEntry" id="share"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="max_length">4</property> + <property name="hexpand">True</property> <property name="invisible_char">●</property> - <property name="max_width_chars">4</property> - <property name="text" translatable="yes">0</property> - <property name="adjustment">adjustment1</property> - <property name="numeric">True</property> </object> <packing> - <property name="left_attach">3</property> - <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="top_attach">2</property> </packing> </child> <child> - <placeholder/> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkGrid" id="SmbDetails"> - <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="label9"> + <object class="GtkLabel" id="repositoryLabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Host:</property> + <property name="label" translatable="yes">Repository:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">smbHost</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">3</property> </packing> </child> <child> - <object class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="can_focus">False</property> + <object class="GtkCheckButton" id="webdavs"> + <property name="label" translatable="yes">Secure connection</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Share:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">smbShare</property> + <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> + <property name="left_attach">1</property> <property name="top_attach">1</property> </packing> </child> <child> - <object class="GtkLabel" id="label11"> + <object class="GtkLabel" id="loginLabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Root:</property> + <property name="label" translatable="yes">User:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">smbPath</property> + <property name="mnemonic_widget">login</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">4</property> </packing> </child> <child> - <object class="GtkEntry" id="smbHost"> + <object class="GtkEntry" id="login"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> @@ -331,23 +281,25 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="top_attach">4</property> </packing> </child> <child> - <object class="GtkEntry" id="smbShare"> + <object class="GtkLabel" id="nameLabel"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Label:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">name</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left_attach">0</property> + <property name="top_attach">5</property> </packing> </child> <child> - <object class="GtkEntry" id="smbPath"> + <object class="GtkEntry" id="name"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> @@ -355,56 +307,59 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkGrid" id="CmisDetails"> - <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="bindingLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Host:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">binding</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">5</property> </packing> </child> <child> - <object class="GtkLabel" id="repositoryLabel"> + <object class="GtkBox" id="HostDetails"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Repository:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">repositories</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="binding"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="spacing">6</property> + <child> + <object class="GtkEntry" id="host"> + <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="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="portLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Port:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="port-nospin"> + <property name="width_request">50</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="max_length">4</property> + <property name="invisible_char">●</property> + <property name="max_width_chars">4</property> + <property name="text" translatable="yes">0</property> + <property name="adjustment">adjustment1</property> + <property name="numeric">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> </object> <packing> <property name="left_attach">1</property> @@ -412,10 +367,10 @@ </packing> </child> <child> - <object class="GtkGrid" id="grid6"> + <object class="GtkBox" id="RepositoryDetails"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="column_spacing">6</property> + <property name="spacing">6</property> <child> <object class="GtkComboBox" id="repositories"> <property name="visible">True</property> @@ -423,8 +378,9 @@ <property name="hexpand">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> @@ -435,111 +391,25 @@ <property name="image">image1</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="rootLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Root:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">cmisPath</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="cmisPath"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <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"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">User:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">login</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="login"> - <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">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="labelLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Label:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">name</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">3</property> </packing> </child> <child> - <object class="GtkEntry" id="name"> - <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">1</property> - <property name="top_attach">1</property> - </packing> + <placeholder/> </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">4</property> + <property name="position">1</property> </packing> </child> </object> |