summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-06-10 11:06:04 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-07-16 09:52:50 +0200
commitb85599fa01c8ed3a0afcc8eed110cc254c3eeb30 (patch)
tree7183184af98ce62ca10a886cc56ab896400f5b22 /svtools
parentd31dfe4eeff72cff63eae839f1c10815cbe2fc2a (diff)
service name as root in the breadcrumb
Change-Id: I6707f332bdca7064d24f4920ecb0f3206dd68868
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/RemoteFilesDialog.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx
index fdbe58512545..20eca9adbb31 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 ) );