summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfe Gürkan YALAMAN <efeyalaman@gmail.com>2014-05-25 20:09:25 +0300
committerEfe Gürkan YALAMAN <efeyalaman@gmail.com>2014-08-08 18:22:31 +0300
commit63bdbbeb567b69691f5b87f4c6e0348c30dddc77 (patch)
treee9ca3a7dc33c3e175d9f0f89a24d4f6ff6170dd4
parentb4f775daf031d7d28505825ed0e7b4e1d19f0e1b (diff)
Moving TemplateLocalView to the StartCenter
Added TemplateLocalView to the StartCenter. "Templates" Button will hide RecentDocs and show TemplateLocal view. Change-Id: I34fc7f6ed0d819cf0c29dd89ee154408c5d8434f
-rw-r--r--sfx2/source/dialog/backingwindow.cxx18
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
-rw-r--r--sfx2/uiconfig/ui/startcenter.ui110
3 files changed, 87 insertions, 42 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 1c356c959087..7190ecfb53b6 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 );
@@ -488,7 +501,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();
@@ -496,6 +509,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<Window*> 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 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sun May 25 15:43:37 2014 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkImage" id="calc_all_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">res/ods_32_8.png</property>
</object>
+ <object class="GtkImage" id="database_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/odb_32_8.png</property>
+ </object>
+ <object class="GtkImage" id="draw_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/odg_32_8.png</property>
+ </object>
+ <object class="GtkImage" id="impress_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/odp_32_8.png</property>
+ </object>
+ <object class="GtkImage" id="math_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/odf_32_8.png</property>
+ </object>
+ <object class="GtkImage" id="open_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">framework/res/folder_32.png</property>
+ </object>
+ <object class="GtkImage" id="templates_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">framework/res/templates_32.png</property>
+ </object>
+ <object class="GtkImage" id="writer_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/odt_32_8.png</property>
+ </object>
<object class="GtkBox" id="StartCenter">
<property name="can_focus">False</property>
<child>
@@ -347,14 +383,41 @@
</packing>
</child>
<child>
- <object class="sfxlo-RecentDocsView" id="all_recent">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="sfxlo-RecentDocsView" id="all_recent">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="margin">0</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-TemplateLocalView" id="local_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="margin">0</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -367,39 +430,4 @@
</packing>
</child>
</object>
- <object class="GtkImage" id="open_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">framework/res/folder_32.png</property>
- </object>
- <object class="GtkImage" id="templates_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">framework/res/templates_32.png</property>
- </object>
- <object class="GtkImage" id="database_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/odb_32_8.png</property>
- </object>
- <object class="GtkImage" id="draw_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/odg_32_8.png</property>
- </object>
- <object class="GtkImage" id="impress_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/odp_32_8.png</property>
- </object>
- <object class="GtkImage" id="math_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/odf_32_8.png</property>
- </object>
- <object class="GtkImage" id="writer_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/odt_32_8.png</property>
- </object>
</interface>