Kaydet (Commit) 62f77f52 authored tarafından Szymon Kłos's avatar Szymon Kłos

check if path exist before init of the fileview

Change-Id: I0c9384644cf5aabf83512c341d3ffff5d4847f36
üst d2daae30
...@@ -462,34 +462,41 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL ) ...@@ -462,34 +462,41 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( m_pFileView ) if( m_pFileView )
{ {
OUString sFilter = FILEDIALOG_FILTER_ALL; if( ContentIsFolder( sURL ) )
if( m_nCurrentFilter != LISTBOX_ENTRY_NOTFOUND )
{ {
sFilter = m_aFilters[m_nCurrentFilter].second; OUString sFilter = FILEDIALOG_FILTER_ALL;
}
m_pFileView->EndInplaceEditing( false ); if( m_nCurrentFilter != LISTBOX_ENTRY_NOTFOUND )
{
sFilter = m_aFilters[m_nCurrentFilter].second;
}
EnableChildPointerOverwrite( true ); m_pFileView->EndInplaceEditing( false );
SetPointer( PointerStyle::Wait );
eResult = m_pFileView->Initialize( sURL, sFilter, NULL, GetBlackList() ); EnableChildPointerOverwrite( true );
SetPointer( PointerStyle::Wait );
if( eResult == eSuccess ) eResult = m_pFileView->Initialize( sURL, sFilter, NULL, GetBlackList() );
{
m_pPath->SetURL( sURL );
m_pTreeView->SetSelectHdl( Link<>() ); if( eResult == eSuccess )
m_pTreeView->SetTreePath( sURL ); {
m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) ); m_pPath->SetURL( sURL );
m_bIsConnected = true; m_pTreeView->SetSelectHdl( Link<>() );
EnableControls(); m_pTreeView->SetTreePath( sURL );
} m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
m_bIsConnected = true;
EnableControls();
}
SetPointer( PointerStyle::Arrow ); SetPointer( PointerStyle::Arrow );
EnableChildPointerOverwrite( false ); EnableChildPointerOverwrite( false );
}
else
{
// content doesn't exist
}
} }
return eResult; return eResult;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment