[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source

Szymon Kłos eszkadev at gmail.com
Thu Jun 25 03:49:51 PDT 2015


 svtools/source/dialogs/RemoteFilesDialog.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 16fda0ed618102ecacfbe5a5af1eaed4b4f11ebb
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Thu Jun 25 12:48:27 2015 +0200

    RemoteFilesDialog: opening files using double click
    
    Change-Id: Ieea2d757525679b9686629f2d8e75e71cccbf2e0

diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx
index 405548e..c89f73f 100644
--- a/svtools/source/dialogs/RemoteFilesDialog.cxx
+++ b/svtools/source/dialogs/RemoteFilesDialog.cxx
@@ -641,9 +641,19 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
 
 IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
 {
-    OUString sURL = m_pFileView->GetCurrentURL();
+    SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
+    SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
+
+    if( pData->mbIsFolder )
+    {
+        OUString sURL = m_pFileView->GetCurrentURL();
 
-    OpenURL( sURL );
+        OpenURL( sURL );
+    }
+    else
+    {
+        EndDialog( RET_OK );
+    }
 
     return 1;
 }


More information about the Libreoffice-commits mailing list