summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/dialog/backingwindow.cxx46
-rw-r--r--sfx2/source/dialog/backingwindow.hxx5
-rw-r--r--sfx2/uiconfig/ui/startcenter.ui13
3 files changed, 7 insertions, 57 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 22147f5a357e..28179f96fa2f 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -122,9 +122,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
get(mpHelpButton, "help");
get(mpExtensionsButton, "extensions");
- //get(mpViewBar, "action_view");
- //get(mpTemplateBar, "action_templates");
-
//Containers are invisible to cursor traversal
//So on pressing "right" when in Help the
//extension button is considered as a candidate
@@ -266,7 +263,7 @@ void BackingWindow::initControls()
mpAllRecentThumbnails->Reload();
mpAllRecentThumbnails->ShowTooltips( true );
- //initialize Template views
+ //initialize Template view
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,
@@ -278,25 +275,12 @@ void BackingWindow::initControls()
mpCurrentView = mpLocalView;
- //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();
- //mpViewBar->HideItem("import");
-
- //mpTemplateBar->SetButtonType(BUTTON_SYMBOLTEXT);
- //mpTemplateBar->SetItemBits(mpTemplateBar->GetItemId(TEMPLATEBAR_MOVE), TIB_DROPDOWNONLY);
- //mpTemplateBar->SetClickHdl( LINK( this, BackingWindow,TBXTemplateHdl ) );
- //mpTemplateBar->SetDoubleClickHdl( LINK(this, BackingWindow, OpenTemplateHdl) );
- //mpTemplateBar->SetDropdownClickHdl(LINK(this, BackingWindow,TBXDropdownHdl));
+ mpTemplateButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
//set handlers
mpLocalView->setOpenRegionHdl(LINK(this, BackingWindow, OpenRegionHdl));
mpLocalView->setOpenTemplateHdl(LINK(this,BackingWindow,OpenTemplateHdl));
- /*FIXME: Add other things for Local View*/
-
setupButton( mpOpenButton );
setupButton( mpTemplateButton );
setupButton( mpWriterAllButton );
@@ -348,7 +332,6 @@ void BackingWindow::setupButton( PushButton* pButton )
// color that fits the theme
pButton->SetControlForeground(aButtonsText);
-
pButton->SetClickHdl( LINK( this, BackingWindow, ClickHdl ) );
}
@@ -361,15 +344,13 @@ void BackingWindow::setupButton( MenuButton* pButton )
// color that fits the theme
pButton->SetControlForeground(aButtonsText);
- //Menubutton implementation
PopupMenu* pMenu = pButton->GetPopupMenu();
pMenu->SetMenuFlags(pMenu->GetMenuFlags() | MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES);
- //pButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+ pButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
pButton->SetSelectHdl(LINK(this, BackingWindow, MenuSelectHdl));
}
-
void BackingWindow::Paint( const Rectangle& )
{
Resize();
@@ -572,18 +553,9 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
}
else if( pButton == mpTemplateButton )
{
-/* Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
-
- Sequence< com::sun::star::beans::PropertyValue > aArgs(1);
- PropertyValue* pArg = aArgs.getArray();
- pArg[0].Name = "Referer";
- pArg[0].Value <<= OUString("private:user");
-
- dispatchURL( TEMPLATE_URL, OUString(), xFrame, aArgs );
-*/
mpAllRecentThumbnails->Hide();
+ mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_NONE));
mpLocalView->Show();
- //mpViewBar->Hide();
}
return 0;
}
@@ -592,11 +564,7 @@ IMPL_LINK( BackingWindow, MenuSelectHdl, MenuButton*, pButton )
{
OString sId = pButton->GetCurItemIdent();
- if( sId == "filter_none" )
- {
- mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_NONE));
- }
- else if( sId == "filter_writer" )
+ if( sId == "filter_writer" )
{
mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_WRITER));
}
@@ -625,7 +593,6 @@ IMPL_LINK( BackingWindow, MenuSelectHdl, MenuButton*, pButton )
}
-
mpAllRecentThumbnails->Hide();
mpLocalView->Show();
@@ -637,13 +604,10 @@ IMPL_LINK_NOARG( BackingWindow, OpenRegionHdl)
{
maSelFolders.clear();
maSelTemplates.clear();
- //mpTemplateBar->Hide();
- //mpViewBar->Hide();
return 0;
}
-//FIXME: Cleanup the code
IMPL_LINK(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem)
{
if (!mbIsSaveMode)
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index f842644585ec..e4f7a39479b6 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -57,11 +57,11 @@ class BackingWindow
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider;
com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame;
com::sun::star::uno::Reference< com::sun::star::frame::XDesktop2 > mxDesktop;
+
/** helper for drag&drop. */
com::sun::star::uno::Reference< com::sun::star::datatransfer::dnd::XDropTargetListener > mxDropTargetListener;
PushButton* mpOpenButton;
- //PushButton* mpTemplateButton;
MenuButton* mpTemplateButton;
FixedText* mpCreateLabel;
@@ -88,9 +88,6 @@ class BackingWindow
TemplateLocalView* mpLocalView;
TemplateAbstractView* mpCurrentView;
- //ToolBox* mpViewBar;
- //ToolBox* mpTemplateBar;
-
std::vector<Window*> maDndWindows;
Rectangle maStartCentButtons;
diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 3185bfaa8060..c6190589483a 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Fri Aug 1 02:51:49 2014 -->
+<!-- Generated with glade 3.16.0 on Fri Aug 8 17:26:41 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
@@ -434,19 +434,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkMenuItem" id="filter_none">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">All Templates</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="filter_writer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Writer Templates</property>
- <property name="use_underline">True</property>
</object>
</child>
<child>
@@ -454,7 +445,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Calc Templates</property>
- <property name="use_underline">True</property>
</object>
</child>
<child>
@@ -462,7 +452,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Impress Templates</property>
- <property name="use_underline">True</property>
</object>
</child>
<child>