From 031f11ee3b3cefe2814744a6d854857652f81e51 Mon Sep 17 00:00:00 2001 From: Efe Gürkan YALAMAN Date: Sun, 1 Jun 2014 17:02:56 +0300 Subject: ViewBar moved to Start Center View bar moved to the start center without handlers. Visible but useless ATM. Change-Id: I1cb64faa1ee86b19ecbb793351c8c11362ef799e --- sfx2/source/dialog/backingwindow.cxx | 26 +++++++++++ sfx2/source/dialog/backingwindow.hxx | 6 +++ sfx2/uiconfig/ui/startcenter.ui | 87 ++++++++++++++++++++++++++++++++++-- 3 files changed, 115 insertions(+), 4 deletions(-) diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e223ee9fa493..81d6b48cec07 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -88,6 +88,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) : get(mpHelpButton, "help"); get(mpExtensionsButton, "extensions"); + get(mpViewBar, "action_view"); + //Containers are invisible to cursor traversal //So on pressing "right" when in Help the //extension button is considered as a candidate @@ -239,6 +241,11 @@ void BackingWindow::initControls() mpLocalView->Hide(); mpLocalView->filterItems(ViewFilter_Application(FILTER_APP_NONE)); + mpViewBar->SetButtonType(BUTTON_SYMBOLTEXT); + mpViewBar->SetItemBits(mpViewBar->GetItemId("repository"), TIB_DROPDOWNONLY); + //mpViewBar->SetClickHdl(LINK(this,BackingWindow,TBXViewHdl)); + //mpViewBar->SetDropdownClickHdl(LINK(this,BackingWindow,TBXDropdownHdl)); + mpViewBar->Hide(); /*FIXME: Add other things for Local View *Filter and the bars*/ @@ -511,10 +518,29 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) */ mpAllRecentThumbnails->Hide(); mpLocalView->Show(); + mpViewBar->Show(); } return 0; } +IMPL_LINK_NOARG( BackingWindow, OpenRegionHdl) +{ + //maSelFolders.clear(); + //maSelTemplates.clear(); + + //mpViewBar->ShowItem(VIEWBAR_NEW_FOLDER, mpCurView->isNestedRegionAllowed()); + + //if (!mbIsSaveMode) + //mpViewBar->ShowItem(VIEWBAR_IMPORT, mpCurView->isImportAllowed()); + + //mpTemplateBar->Hide(); + //mpViewBar->Show(); + //mpActionBar->Show(); + + return 0; +} + + struct ImplDelayedDispatch { Reference< XDispatch > xDispatch; diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 29276de3e96f..cff49ec4e930 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -26,9 +26,11 @@ #include #include #include +#include #include #include +#include #include #include @@ -79,6 +81,9 @@ class BackingWindow RecentDocsView* mpAllRecentThumbnails; TemplateLocalView* mpLocalView; + TemplateAbstractView* mpCurrentView; + + ToolBox* mpViewBar; std::vector maDndWindows; @@ -98,6 +103,7 @@ class BackingWindow DECL_LINK(ClickHdl, Button*); DECL_LINK(ExtLinkClickHdl, Button*); + DECL_LINK(OpenRegionHdl, void*); void initControls(); diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui index 80e51cf63957..20136945b661 100644 --- a/sfx2/uiconfig/ui/startcenter.ui +++ b/sfx2/uiconfig/ui/startcenter.ui @@ -1,8 +1,8 @@ - + - + True False @@ -387,6 +387,85 @@ True False vertical + + + True + False + True + + + True + False + repository + Repository + True + sfx2/imglst/actionview026.png + + + False + True + + + + + False + import + Import + True + sfx2/imglst/actionview010.png + + + False + True + + + + + False + delete + Delete + True + sfx2/imglst/actionview025.png + + + False + True + + + + + False + save + Save + True + sfx2/imglst/actionview028.png + + + False + True + + + + + True + False + new_folder + New Folder + True + sfx2/imglst/actionview029.png + + + False + True + + + + + False + True + 0 + + True @@ -398,7 +477,7 @@ False True - 0 + 2 @@ -412,7 +491,7 @@ False True - 1 + 3 -- cgit v1.2.3