svtools/source/dialogs/RemoteFilesDialog.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
New commits: commit a0ce0882415707829007865dca4fa5c9eba43727 Author: Szymon KÅos <[email protected]> Date: Wed Jun 10 11:06:04 2015 +0200 service name as root in the breadcrumb Change-Id: I6707f332bdca7064d24f4920ecb0f3206dd68868 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index fdbe5851..20eca9a 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -83,7 +83,7 @@ class Breadcrumb : public VclHBox std::vector< VclPtr< FixedHyperlink > > m_aLinks; std::vector< VclPtr< FixedText > > m_aSeparators; - OUString m_sPath; + OUString m_sRootName; OUString m_sClickedURL; Link<> m_aClickHdl; @@ -132,9 +132,13 @@ class Breadcrumb : public VclHBox return m_sClickedURL; } + void SetRootName( const OUString& rURL ) + { + m_sRootName = rURL; + } + void SetURL( const OUString& rURL ) { - m_sPath = rURL; INetURLObject aURL( rURL ); aURL.setFinalSlash(); OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET); @@ -143,7 +147,7 @@ class Breadcrumb : public VclHBox unsigned int nPos = 0; unsigned int i; - m_aLinks[0]->SetText( "Root" ); + m_aLinks[0]->SetText( m_sRootName ); m_aLinks[0]->Show(); m_aLinks[0]->SetURL( INetURLObject::GetScheme( aURL.GetProtocol() ) + aURL.GetHost() ); @@ -523,12 +527,14 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectServiceHdl ) if(nPos > 0) { OUString sURL = m_aServices[nPos]->GetUrl(); + OUString sName = m_aServices[nPos]->GetName(); if( OpenURL( sURL ) == eSuccess ) { + m_pPath->SetRootName( sName ); m_pTreeView->Clear(); - SvTreeListEntry* pRoot = m_pTreeView->InsertEntry( m_pServices_lb->GetSelectEntry(), NULL, true ); + SvTreeListEntry* pRoot = m_pTreeView->InsertEntry( sName, NULL, true ); OUString* sData = new OUString( sURL ); pRoot->SetUserData( static_cast< void* >( sData ) );
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
