summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-02-16 16:03:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-03-09 16:42:54 +0000
commit5813660e7bfe128ac076e592fe31de64a6863780 (patch)
treec61a2a0ac0f8b5420ee0e53260423b5b812c4eed /fpicker
parent1de73e4ddfff3a67c9470e8434c2bb2cb3f43dd5 (diff)
icon view for RemoteFilesDialog
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 <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx17
-rw-r--r--fpicker/source/office/RemoteFilesDialog.hxx6
-rw-r--r--fpicker/uiconfig/ui/remotefilesdialog.ui32
3 files changed, 51 insertions, 4 deletions
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<PushButton> 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
@@ -159,6 +159,32 @@
</packing>
</child>
<child>
+ <object class="GtkButton" id="list_view">
+ <property name="label" translatable="yes">List view</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="icon_view">
+ <property name="label" translatable="yes">Icon view</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="new_folder">
<property name="use_action_appearance">False</property>
<property name="width_request">25</property>
@@ -174,7 +200,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -213,8 +239,8 @@
<object class="GtkLabel" id="filterLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Filter</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -225,8 +251,8 @@
<object class="GtkLabel" id="nameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">File name</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>