[Libreoffice-commits] core.git: Branch 'feature/template_manager_improvements' - sfx2/source sfx2/uiconfig

Efe Gürkan YALAMAN efeyalaman at gmail.com
Sun Jun 1 07:06:32 PDT 2014


 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(-)

New commits:
commit 89712cff37985f30450e0ea149bf2b0834fabd34
Author: Efe Gürkan YALAMAN <efeyalaman at gmail.com>
Date:   Sun Jun 1 17:02:56 2014 +0300

    ViewBar moved to Start Center
    
    View bar moved to the start center without handlers. Visible but
    useless ATM.
    
    Change-Id: I1cb64faa1ee86b19ecbb793351c8c11362ef799e

diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 7f029f4..21aebe8 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -87,6 +87,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
@@ -238,6 +240,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*/
 
@@ -510,10 +517,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 29276de..cff49ec 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -26,9 +26,11 @@
 #include <vcl/button.hxx>
 #include <vcl/tabctrl.hxx>
 #include <vcl/layout.hxx>
+#include <vcl/toolbox.hxx>
 
 #include <sfx2/recentdocsview.hxx>
 #include <sfx2/templatelocalview.hxx>
+#include <sfx2/templateabstractview.hxx>
 #include <sfx2/templateviewitem.hxx>
 
 #include <svtools/acceleratorexecute.hxx>
@@ -79,6 +81,9 @@ class BackingWindow
 
     RecentDocsView*                 mpAllRecentThumbnails;
     TemplateLocalView*              mpLocalView;
+    TemplateAbstractView*           mpCurrentView;
+
+    ToolBox*                        mpViewBar;
 
     std::vector<Window*>            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 79f026b..8a26598 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Sun May 25 15:43:37 2014 -->
+<!-- Generated with glade 3.16.0 on Sun Jun  1 16:42:18 2014 -->
 <interface>
-  <!-- interface-requires LibreOffice 1.0 -->
   <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
   <object class="GtkImage" id="calc_all_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -389,6 +389,85 @@
             <property name="can_focus">False</property>
             <property name="orientation">vertical</property>
             <child>
+              <object class="GtkToolbar" id="action_view">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <child>
+                  <object class="GtkToolButton" id="repository">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">repository</property>
+                    <property name="label" translatable="yes">Repository</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">sfx2/imglst/actionview026.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="import">
+                    <property name="can_focus">False</property>
+                    <property name="action_name">import</property>
+                    <property name="label" translatable="yes">Import</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">sfx2/imglst/actionview010.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="delete">
+                    <property name="can_focus">False</property>
+                    <property name="action_name">delete</property>
+                    <property name="label" translatable="yes">Delete</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">sfx2/imglst/actionview025.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="save">
+                    <property name="can_focus">False</property>
+                    <property name="action_name">save</property>
+                    <property name="label" translatable="yes">Save</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">sfx2/imglst/actionview028.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="new_folder">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">new_folder</property>
+                    <property name="label" translatable="yes">New Folder</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">sfx2/imglst/actionview029.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
               <object class="sfxlo-RecentDocsView" id="all_recent">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -399,7 +478,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">0</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -413,7 +492,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>


More information about the Libreoffice-commits mailing list