summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-07-21 13:28:46 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-07-24 12:28:56 +0200
commitf4c88188729051c2d97c6f574119afcf0b988810 (patch)
tree1c359a81e301bf131c186e2b3e7639f21f1e0c9d /fpicker
parent52ead2fbca3e6f6274fe34d1c0b13e46c4e5b8e1 (diff)
avoid multiple recursive opening the same url, cleaning
Change-Id: I8a3ae75a64ffcc4879af3e3591b3b433cee1678d
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 7f0447a1bba7..d2e3cc5661eb 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -470,7 +470,10 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( eResult == eSuccess )
{
m_pPath->SetURL( sURL );
+
+ m_pTreeView->SetSelectHdl( Link<>() );
m_pTreeView->SetTreePath( sURL );
+ m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
m_bIsConnected = true;
EnableControls();
@@ -662,24 +665,17 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
{
- SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
-
- if( pEntry )
+ if( m_pFileView->GetSelectionCount() )
{
- SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
+ OUString sURL = m_pFileView->GetCurrentURL();
- if( pData )
+ if( ContentIsFolder( sURL ) )
{
- if( pData->mbIsFolder )
- {
- OUString sURL = m_pFileView->GetCurrentURL();
-
- OpenURL( sURL );
- }
- else
- {
- EndDialog( RET_OK );
- }
+ OpenURL( sURL );
+ }
+ else
+ {
+ EndDialog( RET_OK );
}
}