From 5813660e7bfe128ac076e592fe31de64a6863780 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 16 Feb 2016 16:03:30 +0100 Subject: icon view for RemoteFilesDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New view type can be accessed in: Start Center > Remote Files > Icon View Cloud service for testing purposes: 1. Start Center > Remote Files > Add service 2. Set type to: Alfresco 4 3. Set host to: http://cmis.alfresco.com/cmisatom 4. Click refresh icon and enter login:admin pass:admin 5. Click OK and open this service Change-Id: I3d4674bb84d1df1b678111adffe2f835d2bb2356 Reviewed-on: https://gerrit.libreoffice.org/22437 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- fpicker/source/office/RemoteFilesDialog.cxx | 17 +++++++++++++++ fpicker/source/office/RemoteFilesDialog.hxx | 6 +++++- fpicker/uiconfig/ui/remotefilesdialog.ui | 32 ++++++++++++++++++++++++++--- 3 files changed, 51 insertions(+), 4 deletions(-) (limited to 'fpicker') diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index cf012952baa2..1bc4fc18b0c4 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -186,6 +186,8 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) get( m_pServices_lb, "services_lb" ); get( m_pFilter_lb, "filter_lb" ); get( m_pNewFolder, "new_folder" ); + get( m_pListView_btn, "list_view" ); + get( m_pIconView_btn, "icon_view" ); m_eMode = ( nBits & WB_SAVEAS ) ? REMOTEDLG_MODE_SAVE : REMOTEDLG_MODE_OPEN; m_eType = ( nBits & WB_PATH ) ? REMOTEDLG_TYPE_PATHDLG : REMOTEDLG_TYPE_FILEDLG; @@ -216,6 +218,9 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) m_pNewFolder->SetClickHdl( LINK( this, RemoteFilesDialog, NewFolderHdl ) ); } + m_pIconView_btn->SetClickHdl( LINK( this, RemoteFilesDialog, IconViewHdl ) ); + m_pListView_btn->SetClickHdl( LINK( this, RemoteFilesDialog, ListViewHdl ) ); + m_pOk_btn->Show(); m_pOk_btn->Enable( false ); @@ -347,6 +352,8 @@ void RemoteFilesDialog::dispose() m_pFilter_lb.clear(); m_pName_ed.disposeAndClear(); m_pNewFolder.clear(); + m_pIconView_btn.clear(); + m_pListView_btn.clear(); ModalDialog::dispose(); } @@ -720,6 +727,16 @@ void RemoteFilesDialog::SavePassword( const OUString& rURL, const OUString& rUse {} } +IMPL_LINK_NOARG_TYPED ( RemoteFilesDialog, IconViewHdl, Button*, void ) +{ + m_pFileView->SetViewMode( eIcon ); +} + +IMPL_LINK_NOARG_TYPED ( RemoteFilesDialog, ListViewHdl, Button*, void ) +{ + m_pFileView->SetViewMode( eDetailedList ); +} + IMPL_LINK_NOARG_TYPED ( RemoteFilesDialog, AddServiceHdl, Button*, void ) { ScopedVclPtrInstance< PlaceEditDialog > aDlg( this ); diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx index b05399d5e1a6..4bc7a7389e40 100644 --- a/fpicker/source/office/RemoteFilesDialog.hxx +++ b/fpicker/source/office/RemoteFilesDialog.hxx @@ -153,7 +153,9 @@ private: VclPtr< MenuButton > m_pAddService_btn; VclPtr< ListBox > m_pServices_lb; VclPtr< Breadcrumb > m_pPath; - VclPtr m_pNewFolder; + VclPtr< PushButton > m_pNewFolder; + VclPtr< PushButton > m_pListView_btn; + VclPtr< PushButton > m_pIconView_btn; VclPtr< Splitter > m_pSplitter; VclPtr< FolderTree > m_pTreeView; VclPtr< SvtFileView > m_pFileView; @@ -203,6 +205,8 @@ private: DECL_LINK_TYPED( SelectBreadcrumbHdl, Breadcrumb *, void ); DECL_LINK_TYPED( NewFolderHdl, Button*, void ); + DECL_LINK_TYPED( IconViewHdl, Button*, void ); + DECL_LINK_TYPED( ListViewHdl, Button*, void ); DECL_LINK_TYPED( OkHdl, Button*, void ); DECL_LINK_TYPED( CancelHdl, Button*, void ); diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui b/fpicker/uiconfig/ui/remotefilesdialog.ui index 00e14da9cd02..16f87d68fe7f 100644 --- a/fpicker/uiconfig/ui/remotefilesdialog.ui +++ b/fpicker/uiconfig/ui/remotefilesdialog.ui @@ -158,6 +158,32 @@ 0 + + + List view + True + True + True + + + False + True + 1 + + + + + Icon view + True + True + True + + + False + True + 2 + + False @@ -174,7 +200,7 @@ False True - 1 + 3 @@ -213,8 +239,8 @@ True False - 0 Filter + 0 0 @@ -225,8 +251,8 @@ True False - 0 File name + 0 0 -- cgit