From b09a80de290461e07633f9d68df10a4c8bce7f95 Mon Sep 17 00:00:00 2001 From: Efe Gürkan YALAMAN Date: Sun, 25 May 2014 20:09:25 +0300 Subject: Moving TemplateLocalView to the StartCenter Added TemplateLocalView to the StartCenter. "Templates" Button will hide RecentDocs and show TemplateLocal view. Change-Id: I34fc7f6ed0d819cf0c29dd89ee154408c5d8434f --- sfx2/source/dialog/backingwindow.cxx | 18 +++++- sfx2/source/dialog/backingwindow.hxx | 1 + sfx2/uiconfig/ui/startcenter.ui | 110 ++++++++++++++++++++++------------- 3 files changed, 87 insertions(+), 42 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 83d3aade80ce..5c4c07971a54 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -117,6 +117,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) : get(mpExtensionsBox, "extensions_box"); get(mpAllRecentThumbnails, "all_recent"); + get(mpLocalView, "local_view"); maDndWindows.push_back(mpAllRecentThumbnails); @@ -228,6 +229,18 @@ void BackingWindow::initControls() mpAllRecentThumbnails->Reload(); mpAllRecentThumbnails->ShowTooltips( true ); + //initialize Template views + mpLocalView->SetStyle( mpLocalView->GetStyle() | WB_VSCROLL); + mpLocalView->setItemDimensions(TEMPLATE_ITEM_MAX_WIDTH,TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT, + TEMPLATE_ITEM_MAX_HEIGHT-TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT, + TEMPLATE_ITEM_PADDING); + mpLocalView->Populate(); + mpLocalView->showRootRegion(); + mpLocalView->Hide(); + + /*FIXME: Add other things for Local View + *Filter and the bars*/ + setupButton( mpOpenButton ); setupButton( mpTemplateButton ); @@ -486,7 +499,7 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) } else if( pButton == mpTemplateButton ) { - Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); +/* Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); Sequence< com::sun::star::beans::PropertyValue > aArgs(1); PropertyValue* pArg = aArgs.getArray(); @@ -494,6 +507,9 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) pArg[0].Value <<= OUString("private:user"); dispatchURL( TEMPLATE_URL, OUString(), xFrame, aArgs ); +*/ + mpAllRecentThumbnails->Hide(); + mpLocalView->Show(); } return 0; } diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index af6ac8c5e441..29276de3e96f 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -78,6 +78,7 @@ class BackingWindow VclBox* mpExtensionsBox; RecentDocsView* mpAllRecentThumbnails; + TemplateLocalView* mpLocalView; std::vector maDndWindows; diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui index 07417b4b391b..80e51cf63957 100644 --- a/sfx2/uiconfig/ui/startcenter.ui +++ b/sfx2/uiconfig/ui/startcenter.ui @@ -1,12 +1,48 @@ + - + True False res/ods_32_8.png + + True + False + res/odb_32_8.png + + + True + False + res/odg_32_8.png + + + True + False + res/odp_32_8.png + + + True + False + res/odf_32_8.png + + + True + False + framework/res/folder_32.png + + + True + False + framework/res/templates_32.png + + + True + False + res/odt_32_8.png + False @@ -347,14 +383,41 @@ - + True - True - True - True + False + vertical + + + True + True + 0 + True + True + + + False + True + 0 + + + + + True + True + 0 + True + True + + + False + True + 1 + + - False + True True 1 @@ -367,39 +430,4 @@ - - True - False - framework/res/folder_32.png - - - True - False - framework/res/templates_32.png - - - True - False - res/odb_32_8.png - - - True - False - res/odg_32_8.png - - - True - False - res/odp_32_8.png - - - True - False - res/odf_32_8.png - - - True - False - res/odt_32_8.png - -- cgit v1.2.3