summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-02-07 12:10:47 +0100
committerJan Holesovsky <kendy@collabora.com>2014-02-07 12:11:50 +0100
commitb29c078c7f193dd7dae74baf89fe1abb9264239c (patch)
tree3cdcfd16017f0be34f4e17ca3fd4f60f1b038fac
parentbd20500cf3d88d0bd81d7e57df01b0130e7166f6 (diff)
Convert template manager dialog to .ui + adapt code.
Change-Id: I854abb47c2d22206ed5581373b3e841f221672e3
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in6
-rw-r--r--include/sfx2/templatelocnames.hrc2
-rw-r--r--include/vcl/toolbox.hxx13
-rw-r--r--sfx2/AllLangResTarget_sfx2.mk1
-rw-r--r--sfx2/UIConfig_sfx.mk7
-rw-r--r--sfx2/inc/templatedlg.hxx10
-rw-r--r--sfx2/source/control/templateremoteview.cxx6
-rw-r--r--sfx2/source/control/templatesearchview.cxx8
-rw-r--r--sfx2/source/doc/doc.hrc24
-rw-r--r--sfx2/source/doc/doc.src112
-rw-r--r--sfx2/source/doc/templatedlg.cxx433
-rw-r--r--sfx2/source/doc/templatedlg.hrc85
-rw-r--r--sfx2/source/doc/templatedlg.src392
-rw-r--r--sfx2/uiconfig/ui/templatedlg.ui420
14 files changed, 754 insertions, 765 deletions
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index a5097292e87f..dc574818a660 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -631,6 +631,12 @@
<glade-widget-class title="Template Thumbnail View" name="sfxlo-TemplateLocalView"
generic-name="Template Icon View" parent="GtkIconView"
icon-name="widget-gtk-iconview"/>
+ <glade-widget-class title="Template Search View" name="sfxlo-TemplateSearchView"
+ generic-name="Template Icon View" parent="GtkIconView"
+ icon-name="widget-gtk-iconview"/>
+ <glade-widget-class title="Template Remote View" name="sfxlo-TemplateRemoteView"
+ generic-name="Template Icon View" parent="GtkIconView"
+ icon-name="widget-gtk-iconview"/>
<glade-widget-class title="Driver List Control" name="cuilo-DriverListControl"
generic-name="DriverListControl" parent="GtkEntry"
diff --git a/include/sfx2/templatelocnames.hrc b/include/sfx2/templatelocnames.hrc
index dd4473010200..df1582fa1127 100644
--- a/include/sfx2/templatelocnames.hrc
+++ b/include/sfx2/templatelocnames.hrc
@@ -8,7 +8,7 @@
*/
#define NUM_TEMPLATE_NAMES 10
-#define TEMPL_LOC_OFFSET 2190
+#define TEMPL_LOC_OFFSET 2210
#define STR_TEMPLATE_NAME1_DEF (TEMPL_LOC_OFFSET + 1)
#define STR_TEMPLATE_NAME2_DEF (TEMPL_LOC_OFFSET + 2)
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index b0901488e6b9..9c90abb25552 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -429,8 +429,17 @@ public:
sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const;
void TriggerItem( sal_uInt16 nItemId, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
- void ShowItem( sal_uInt16 nItemId, sal_Bool bVisible = sal_True );
- void HideItem( sal_uInt16 nItemId ) { ShowItem( nItemId, sal_False ); }
+
+ /// Shows or hides items.
+ void ShowItem(sal_uInt16 nItemId, sal_Bool bVisible = sal_True);
+ /// Overload to provide ShowItem via command id.
+ void ShowItem(const OUString& rCommand, bool bVisible = true) { ShowItem(GetItemId(rCommand), bVisible); }
+
+ /// Convenience method to hide items (via ShowItem).
+ void HideItem(sal_uInt16 nItemId) { ShowItem( nItemId, sal_False ); }
+ /// Overload to provide HideItem via command id.
+ void HideItem(const OUString& rCommand) { ShowItem(rCommand, false); }
+
sal_Bool IsItemVisible( sal_uInt16 nItemId ) const;
sal_Bool IsItemReallyVisible( sal_uInt16 nItemId ) const;
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index a5ed8b395d6c..290c81452f84 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -54,7 +54,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/doc/doctempl.src \
sfx2/source/doc/new.src \
sfx2/source/doc/templatelocnames.src \
- sfx2/source/doc/templatedlg.src \
sfx2/source/menu/menu.src \
sfx2/source/sidebar/Sidebar.src \
sfx2/source/view/view.src \
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 20734b4cf655..d3e53de2072e 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -13,6 +13,8 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/alienwarndialog \
sfx2/uiconfig/ui/bookmarkdialog \
sfx2/uiconfig/ui/checkin \
+ sfx2/uiconfig/ui/cmisinfopage \
+ sfx2/uiconfig/ui/cmisline \
sfx2/uiconfig/ui/custominfopage \
sfx2/uiconfig/ui/descriptioninfopage \
sfx2/uiconfig/ui/documentfontspage \
@@ -31,12 +33,11 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/searchdialog \
sfx2/uiconfig/ui/securityinfopage \
sfx2/uiconfig/ui/singletabdialog \
+ sfx2/uiconfig/ui/startcenter \
sfx2/uiconfig/ui/versionsofdialog \
sfx2/uiconfig/ui/versioncommentdialog \
sfx2/uiconfig/ui/versionscmis \
- sfx2/uiconfig/ui/startcenter \
- sfx2/uiconfig/ui/cmisinfopage \
- sfx2/uiconfig/ui/cmisline \
+ sfx2/uiconfig/ui/templatedlg \
))
# vim: set noet sw=4 ts=4:
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx
index b36e96e7e02f..d160053a5a32 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/sfx2/inc/templatedlg.hxx
@@ -18,6 +18,8 @@
#include <vcl/tabpage.hxx>
#include <com/sun/star/frame/XDesktop2.hpp>
+#include <sfx2/templateabstractview.hxx>
+
class Edit;
class PopupMenu;
class SfxTemplateInfoDlg;
@@ -59,8 +61,6 @@ private:
void writeSettings ();
- virtual void Resize ();
-
DECL_LINK(TBXViewHdl, void*);
DECL_LINK(TBXActionHdl, void*);
DECL_LINK(TBXTemplateHdl, void*);
@@ -134,10 +134,12 @@ private:
void syncRepositories () const;
+ /// Return filter according to the currently selected tab page.
+ FILTER_APPLICATION getCurrentFilter();
+
private:
- TabControl maTabControl;
- TabPage maTabPage;
+ TabControl *mpTabControl;
Edit *mpSearchEdit;
ToolBox *mpViewBar;
diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx
index 5b311790455e..75b63ce78b69 100644
--- a/sfx2/source/control/templateremoteview.cxx
+++ b/sfx2/source/control/templateremoteview.cxx
@@ -16,6 +16,7 @@
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/commandenvironment.hxx>
+#include <vcl/builder.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
@@ -53,6 +54,11 @@ TemplateRemoteView::TemplateRemoteView (Window *pParent, WinBits nWinStyle, bool
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTemplateRemoteView(Window *pParent, VclBuilder::stringmap &)
+{
+ return new TemplateRemoteView(pParent, WB_VSCROLL, false);
+}
+
TemplateRemoteView::~TemplateRemoteView ()
{
}
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 87bd69cd6653..4fe956e5f11c 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -8,14 +8,20 @@
*/
#include "templatesearchview.hxx"
-
#include "templatesearchviewitem.hxx"
+#include <vcl/builder.hxx>
+
TemplateSearchView::TemplateSearchView (Window *pParent, WinBits nWinStyle)
: ThumbnailView(pParent,nWinStyle)
{
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTemplateSearchView(Window *pParent, VclBuilder::stringmap &)
+{
+ return new TemplateSearchView(pParent);
+}
+
TemplateSearchView::~TemplateSearchView ()
{
}
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
index 99506ec82758..2aa21e77fb9d 100644
--- a/sfx2/source/doc/doc.hrc
+++ b/sfx2/source/doc/doc.hrc
@@ -163,8 +163,30 @@
#define STR_QRYTEMPL_UPDATE_BTN (RID_SFX_DOC_START+128)
#define STR_QRYTEMPL_KEEP_BTN (RID_SFX_DOC_START+129)
+#define STR_ACTION_SORT_NAME (RID_SFX_DOC_START+130)
+#define STR_ACTION_REFRESH (RID_SFX_DOC_START+131)
+#define STR_ACTION_DEFAULT (RID_SFX_DOC_START+132)
+#define STR_MOVE_NEW (RID_SFX_DOC_START+133)
+#define STR_INPUT_NEW (RID_SFX_DOC_START+134)
+#define STR_REPOSITORY_LOCAL (RID_SFX_DOC_START+135)
+#define STR_REPOSITORY_NEW (RID_SFX_DOC_START+136)
+#define STR_MSG_ERROR_LOCAL_MOVE (RID_SFX_DOC_START+137)
+#define STR_MSG_ERROR_REMOTE_MOVE (RID_SFX_DOC_START+138)
+#define STR_MSG_ERROR_EXPORT (RID_SFX_DOC_START+139)
+#define STR_MSG_ERROR_IMPORT (RID_SFX_DOC_START+140)
+#define STR_MSG_ERROR_DELETE_TEMPLATE (RID_SFX_DOC_START+141)
+#define STR_MSG_ERROR_DELETE_FOLDER (RID_SFX_DOC_START+142)
+#define STR_MSG_ERROR_REPOSITORY_NAME (RID_SFX_DOC_START+143)
+#define STR_MSG_ERROR_SELECT_FOLDER (RID_SFX_DOC_START+144)
+#define STR_INPUT_TEMPLATE_NEW (RID_SFX_DOC_START+145)
+#define STR_QMSG_SEL_FOLDER_DELETE (RID_SFX_DOC_START+146)
+#define STR_QMSG_TEMPLATE_OVERWRITE (RID_SFX_DOC_START+147)
+#define STR_QMSG_SEL_TEMPLATE_DELETE (RID_SFX_DOC_START+148)
+#define IMG_ACTION_SORT (RID_SFX_DOC_START+149)
+#define IMG_ACTION_REFRESH (RID_SFX_DOC_START+150)
+
// please update to the last id
-#define ACT_SFX_DOC_END STR_QRYTEMPL_KEEP_BTN
+#define ACT_SFX_DOC_END IMG_ACTION_REFRESH
#if ACT_SFX_DOC_END > RID_SFX_DOC_END
#error resource overflow in #line, #file
#endif
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index d1a855865ed5..515138e3316d 100644
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -431,6 +431,116 @@ String STR_QRYTEMPL_KEEP_BTN
Text [ en-US ] = "~Keep Old Styles";
};
-// ******************************************************************* EOF
+String STR_ACTION_SORT_NAME
+{
+ Text [ en-US ] = "Sort by name";
+};
+
+String STR_ACTION_REFRESH
+{
+ Text [ en-US ] = "Refresh";
+};
+
+String STR_ACTION_DEFAULT
+{
+ Text [ x-comment ] = "leave ending space";
+ Text [ en-US ] = "Reset Default Template ";
+};
+
+String STR_MOVE_NEW
+{
+ Text [ en-US ] = "New folder";
+};
+
+String STR_INPUT_NEW
+{
+ Text [ en-US ] = "Enter folder name:";
+};
+
+String STR_REPOSITORY_LOCAL
+{
+ Text [ en-US ] = "Local";
+};
+
+String STR_REPOSITORY_NEW
+{
+ Text [ en-US ] = "New Repository";
+};
+
+String STR_MSG_ERROR_LOCAL_MOVE
+{
+ Text [ en-US ] = "Error moving the following templates to $1.\n$2" ;
+};
+
+String STR_MSG_ERROR_REMOTE_MOVE
+{
+ Text [ en-US ] = "Error moving the following templates from repository $1 to folder $2.\n$3" ;
+};
+
+String STR_MSG_ERROR_EXPORT
+{
+ Text [ en-US ] = "Error exporting the following templates:\n$1";
+};
+
+String STR_MSG_ERROR_IMPORT
+{
+ Text [ en-US ] = "Error importing the following templates to $1:\n$2";
+};
+
+String STR_MSG_ERROR_DELETE_TEMPLATE
+{
+ Text [ en-US ] = "The following templates cannot be deleted:\n$1";
+};
+
+String STR_MSG_ERROR_DELETE_FOLDER
+{
+ Text [ en-US ] = "The following folders cannot be deleted:\n$1";
+};
+
+String STR_MSG_ERROR_REPOSITORY_NAME
+{
+ Text [ en-US ] = "Failed to create repository \"$1\".\nA repository with this name may already exist.";
+};
+
+String STR_MSG_ERROR_SELECT_FOLDER
+{
+ Text [ en-US ] = "Select the destination folder(s) to save the template.";
+};
+
+String STR_INPUT_TEMPLATE_NEW
+{
+ Text [ en-US ] = "Enter template name:";
+};
+
+String STR_QMSG_SEL_FOLDER_DELETE
+{
+ Text [ en-US ] = "Do you want to delete the selected folders?";
+};
+
+String STR_QMSG_TEMPLATE_OVERWRITE
+{
+ Text [ en-US ] = "A template named $1 already exist in $2. Do you want to overwrite it?";
+};
+
+String STR_QMSG_SEL_TEMPLATE_DELETE
+{
+ Text [ en-US ] = "Do you want to delete the selected templates?";
+};
+
+Image IMG_ACTION_SORT
+{
+ ImageBitmap = Bitmap
+ {
+ File = "sortascending.png";
+ };
+};
+
+Image IMG_ACTION_REFRESH
+{
+ ImageBitmap = Bitmap
+ {
+ File = "reload.png";
+ };
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index b2b61703d12b..3020d579f9a7 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -60,16 +60,43 @@
#include <com/sun/star/task/InteractionHandler.hpp>
#include "doc.hrc"
-#include "templatedlg.hrc"
-#define PADDING_DLG_BORDER 10
-
-#define TM_SETTING_MANAGER "TemplateManager"
-#define TM_SETTING_LASTFOLDER "LastFolder"
-#define TM_SETTING_FILTER "SelectedFilter"
+const char TM_SETTING_MANAGER[] = "TemplateManager";
+const char TM_SETTING_LASTFOLDER[] = "LastFolder";
+const char TM_SETTING_FILTER[] = "SelectedFilter";
const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess";
+const char VIEWBAR_REPOSITORY[] = "repository";
+const char VIEWBAR_IMPORT[] = "import";
+const char VIEWBAR_DELETE[] = "delete";
+const char VIEWBAR_SAVE[] = "save";
+const char VIEWBAR_NEW_FOLDER[] = "new_folder";
+const char TEMPLATEBAR_SAVE[] = "template_save";
+const char TEMPLATEBAR_OPEN[] = "open";
+const char TEMPLATEBAR_EDIT[] = "edit";
+const char TEMPLATEBAR_PROPERTIES[] = "properties";
+const char TEMPLATEBAR_DEFAULT[] = "default";
+const char TEMPLATEBAR_MOVE[] = "move";
+const char TEMPLATEBAR_EXPORT[] = "export";
+const char TEMPLATEBAR_DELETE[] = "template_delete";
+const char ACTIONBAR_SEARCH[] = "search";
+const char ACTIONBAR_ACTION[] = "action_menu";
+const char ACTIONBAR_TEMPLATE[] = "template_link";
+const char FILTER_DOCS[] = "filter_docs";
+const char FILTER_SHEETS[] = "filter_sheets";
+const char FILTER_PRESENTATIONS[] = "filter_presentations";
+const char FILTER_DRAWINGS[] = "filter_draws";
+
+#define MNI_ACTION_SORT_NAME 1
+#define MNI_ACTION_REFRESH 2
+#define MNI_ACTION_DEFAULT 3
+#define MNI_MOVE_NEW 1
+#define MNI_MOVE_FOLDER_BASE 2
+#define MNI_REPOSITORY_LOCAL 1
+#define MNI_REPOSITORY_NEW 2
+#define MNI_REPOSITORY_BASE 3
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::embed;
@@ -147,17 +174,8 @@ static bool cmpSelectionItems (const ThumbnailViewItem *pItem1, const ThumbnailV
return pItem1->mnId > pItem2->mnId;
}
-SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
- : ModelessDialog(parent, SfxResId(DLG_TEMPLATE_MANAGER)),
- maTabControl(this,SfxResId(TAB_CONTROL)),
- maTabPage(&maTabControl, SfxResId(TAB_TEMPLATE_MANAGER)),
- mpSearchEdit(new Edit(&maTabPage,WB_HIDE | WB_BORDER)),
- mpViewBar( new ToolBox(&maTabPage, SfxResId(TBX_ACTION_VIEW))),
- mpActionBar( new ToolBox(&maTabPage, SfxResId(TBX_ACTION_ACTION))),
- mpTemplateBar( new ToolBox(&maTabPage, SfxResId(TBX_ACTION_TEMPLATES))),
- mpSearchView(new TemplateSearchView(&maTabPage)),
- mpLocalView(new TemplateLocalView(&maTabPage,SfxResId(TEMPLATE_VIEW))),
- mpRemoteView(new TemplateRemoteView(&maTabPage, WB_VSCROLL,false)),
+SfxTemplateManagerDlg::SfxTemplateManagerDlg(Window *parent)
+ : ModelessDialog(parent, "TemplateDialog", "sfx/ui/templatedlg.ui"),
maSelTemplates(cmpSelectionItems),
maSelFolders(cmpSelectionItems),
mbIsSaveMode(false),
@@ -165,15 +183,23 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
mbIsSynced(false),
maRepositories()
{
- maTabPage.Hide();
- maTabControl.SetTabPage( FILTER_DOCS, &maTabPage );
- maTabPage.Hide();
- maTabControl.SetTabPage( FILTER_SHEETS, &maTabPage );
- maTabPage.Hide();
- maTabControl.SetTabPage( FILTER_PRESENTATIONS, &maTabPage );
- maTabPage.Hide();
- maTabControl.SetTabPage( FILTER_DRAWS, &maTabPage );
- maTabPage.Show();
+ get(mpTabControl, "tab_control");
+ get(mpSearchEdit, "search_edit");
+ get(mpViewBar, "action_view");
+ get(mpActionBar, "action_action");
+ get(mpTemplateBar, "action_templates");
+ get(mpLocalView, "template_view");
+ get(mpSearchView, "search_view");
+ get(mpRemoteView, "remote_view");
+
+ TabPage *pTabPage = mpTabControl->GetTabPage(mpTabControl->GetPageId("filter_docs"));
+ pTabPage->Show();
+ mpTabControl->SetTabPage(mpTabControl->GetPageId("filter_sheets"), pTabPage);
+ pTabPage->Show();
+ mpTabControl->SetTabPage(mpTabControl->GetPageId("filter_presentations"), pTabPage);
+ pTabPage->Show();
+ mpTabControl->SetTabPage(mpTabControl->GetPageId("filter_draws"), pTabPage);
+ pTabPage->Show();
// Create popup menus
mpActionMenu = new PopupMenu;
@@ -198,9 +224,9 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
mpTemplateBar->SetButtonType(BUTTON_SYMBOLTEXT);
// Set toolbox button bits
- mpViewBar->SetItemBits(TBI_TEMPLATE_REPOSITORY, TIB_DROPDOWNONLY);
- mpActionBar->SetItemBits(TBI_TEMPLATE_ACTION, TIB_DROPDOWNONLY);
- mpTemplateBar->SetItemBits(TBI_TEMPLATE_MOVE,TIB_DROPDOWNONLY);
+ mpViewBar->SetItemBits(mpViewBar->GetItemId(VIEWBAR_REPOSITORY), TIB_DROPDOWNONLY);
+ mpActionBar->SetItemBits(mpActionBar->GetItemId(ACTIONBAR_ACTION), TIB_DROPDOWNONLY);
+ mpTemplateBar->SetItemBits(mpTemplateBar->GetItemId(TEMPLATEBAR_MOVE), TIB_DROPDOWNONLY);
// Set toolbox handlers
mpViewBar->SetClickHdl(LINK(this,SfxTemplateManagerDlg,TBXViewHdl));
@@ -242,17 +268,15 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
mpSearchView->setItemStateHdl(LINK(this,SfxTemplateManagerDlg,TVItemStateHdl));
- maTabControl.SetActivatePageHdl(LINK(this,SfxTemplateManagerDlg,ActivatePageHdl));
+ mpTabControl->SetActivatePageHdl(LINK(this, SfxTemplateManagerDlg, ActivatePageHdl));
SvtMiscOptions aMiscOptions;
if ( !aMiscOptions.IsExperimentalMode() )
{
- sal_uInt16 nPos = mpViewBar->GetItemId(TBI_TEMPLATE_REPOSITORY);
+ sal_uInt16 nPos = mpViewBar->GetItemPos(mpViewBar->GetItemId(VIEWBAR_REPOSITORY));
mpViewBar->RemoveItem(nPos);
}
- SetMinOutputSizePixel(GetOutputSizePixel());
-
mpViewBar->Show();
mpActionBar->Show();
@@ -269,8 +293,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
readSettings();
mpLocalView->Show();
-
- FreeResource();
}
SfxTemplateManagerDlg::~SfxTemplateManagerDlg ()
@@ -292,45 +314,34 @@ SfxTemplateManagerDlg::~SfxTemplateManagerDlg ()
mpRemoteView->setOpenTemplateHdl(Link());
mpSearchView->setItemStateHdl(Link());
-
- delete mpSearchEdit;
- delete mpViewBar;
- delete mpActionBar;
- delete mpTemplateBar;
- delete mpSearchView;
- delete mpLocalView;
- delete mpRemoteView;
- delete mpTemplateDefaultMenu;
- delete mpActionMenu;
- delete mpRepositoryMenu;
}
void SfxTemplateManagerDlg::setSaveMode(bool bMode)
{
mbIsSaveMode = bMode;
- maTabControl.Clear();
+ mpTabControl->Clear();
mpCurView->filterItems(ViewFilter_Application(FILTER_APP_NONE));
if (bMode)
{
- mpViewBar->ShowItem(TBI_TEMPLATE_SAVE);
- mpViewBar->HideItem(TBI_TEMPLATE_IMPORT);
- mpViewBar->HideItem(TBI_TEMPLATE_REPOSITORY);
-
- mpTemplateBar->ShowItem(TBI_TEMPLATE_SAVE);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
- mpTemplateBar->HideItem(TBI_TEMPLATE_OPEN);
- mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT);
- mpTemplateBar->HideItem(TBI_TEMPLATE_MOVE);
- mpTemplateBar->HideItem(TBI_TEMPLATE_EXPORT);
- mpTemplateBar->HideItem(TBI_TEMPLATE_DELETE);
+ mpViewBar->ShowItem(VIEWBAR_SAVE);
+ mpViewBar->HideItem(VIEWBAR_IMPORT);
+ mpViewBar->HideItem(VIEWBAR_REPOSITORY);
+
+ mpTemplateBar->ShowItem(TEMPLATEBAR_SAVE);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_PROPERTIES);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_DEFAULT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_OPEN);
+ mpTemplateBar->HideItem(TEMPLATEBAR_EDIT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_MOVE);
+ mpTemplateBar->HideItem(TEMPLATEBAR_EXPORT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_DELETE);
}
else
{
- mpViewBar->HideItem(TBI_TEMPLATE_SAVE);
- mpViewBar->ShowItem(TBI_TEMPLATE_IMPORT);
- mpViewBar->ShowItem(TBI_TEMPLATE_REPOSITORY);
+ mpViewBar->HideItem(VIEWBAR_SAVE);
+ mpViewBar->ShowItem(VIEWBAR_IMPORT);
+ mpViewBar->ShowItem(VIEWBAR_REPOSITORY);
}
}
@@ -339,25 +350,25 @@ void SfxTemplateManagerDlg::setDocumentModel(const uno::Reference<frame::XModel>
m_xModel = rModel;
}
+FILTER_APPLICATION SfxTemplateManagerDlg::getCurrentFilter()
+{
+ const sal_uInt16 nCurPageId = mpTabControl->GetCurPageId();
+
+ if (nCurPageId == mpTabControl->GetPageId(FILTER_DOCS))
+ return FILTER_APP_WRITER;
+ else if (nCurPageId == mpTabControl->GetPageId(FILTER_PRESENTATIONS))
+ return FILTER_APP_IMPRESS;
+ else if (nCurPageId == mpTabControl->GetPageId(FILTER_SHEETS))
+ return FILTER_APP_CALC;
+ else if (nCurPageId == mpTabControl->GetPageId(FILTER_DRAWINGS))
+ return FILTER_APP_DRAW;
+
+ return FILTER_APP_NONE;
+}
+
IMPL_LINK_NOARG(SfxTemplateManagerDlg,ActivatePageHdl)
{
- FILTER_APPLICATION eFilter = FILTER_APP_NONE;
- switch (maTabControl.GetCurPageId())
- {
- case FILTER_DOCS:
- eFilter = FILTER_APP_WRITER;
- break;
- case FILTER_PRESENTATIONS:
- eFilter = FILTER_APP_IMPRESS;
- break;
- case FILTER_SHEETS:
- eFilter = FILTER_APP_CALC;
- break;
- case FILTER_DRAWS:
- eFilter = FILTER_APP_DRAW;
- break;
- }
- mpCurView->filterItems(ViewFilter_Application(eFilter));
+ mpCurView->filterItems(ViewFilter_Application(getCurrentFilter()));
if (mpSearchView->IsVisible())
SearchUpdateHdl(NULL);
@@ -368,7 +379,7 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,ActivatePageHdl)
void SfxTemplateManagerDlg::readSettings ()
{
OUString aLastFolder;
- sal_uInt16 nPageId = FILTER_DOCS;
+ sal_uInt16 nPageId = 0;
SvtViewOptions aViewSettings( E_DIALOG, TM_SETTING_MANAGER );
if ( aViewSettings.Exists() )
@@ -380,16 +391,16 @@ void SfxTemplateManagerDlg::readSettings ()
switch (nFilter)
{
case FILTER_APP_WRITER:
- nPageId = FILTER_DOCS;
+ nPageId = mpTabControl->GetPageId(FILTER_DOCS);
break;
case FILTER_APP_IMPRESS:
- nPageId = FILTER_PRESENTATIONS;
+ nPageId = mpTabControl->GetPageId(FILTER_PRESENTATIONS);
break;
case FILTER_APP_CALC:
- nPageId = FILTER_SHEETS;
+ nPageId = mpTabControl->GetPageId(FILTER_SHEETS);
break;
case FILTER_APP_DRAW:
- nPageId = FILTER_DRAWS;
+ nPageId = mpTabControl->GetPageId(FILTER_DRAWINGS);
break;
}
}
@@ -399,7 +410,7 @@ void SfxTemplateManagerDlg::readSettings ()
else
mpLocalView->showRegion(aLastFolder);
- maTabControl.SelectTabPage(nPageId);
+ mpTabControl->SelectTabPage(nPageId);
}
void SfxTemplateManagerDlg::writeSettings ()
@@ -415,147 +426,63 @@ void SfxTemplateManagerDlg::writeSettings ()
aSettings[0].Name = TM_SETTING_LASTFOLDER;
aSettings[0].Value <<= aLastFolder;
- sal_uInt16 nFilter = FILTER_APP_WRITER;
- switch (maTabControl.GetCurPageId())
- {
- case FILTER_DOCS:
- nFilter = FILTER_APP_WRITER;
- break;
- case FILTER_PRESENTATIONS:
- nFilter = FILTER_APP_IMPRESS;
- break;
- case FILTER_SHEETS:
- nFilter = FILTER_APP_CALC;
- break;
- case FILTER_DRAWS:
- nFilter = FILTER_APP_DRAW;
- break;
- }
-
aSettings[1].Name = TM_SETTING_FILTER;
- aSettings[1].Value <<= nFilter;
+ aSettings[1].Value <<= sal_uInt16(getCurrentFilter());
// write
- SvtViewOptions aViewSettings( E_DIALOG, TM_SETTING_MANAGER );
- aViewSettings.SetUserData( aSettings );
-}
-
-void SfxTemplateManagerDlg::Resize()
-{
- // Fit the tab page control and the toolbars
- maTabControl.SetSizePixel(GetSizePixel());
- const Size aWinSize = maTabControl.GetTabPageSizePixel();
-
- // Calculate toolboxes size and positions
- Size aViewSize = mpViewBar->CalcMinimumWindowSizePixel();
- Size aActionSize = mpActionBar->CalcMinimumWindowSizePixel();
- Size aTemplateSize = mpTemplateBar->CalcMinimumWindowSizePixel();
-
- long nToolbarsHeight = std::max(std::max(aViewSize.getHeight(), aActionSize.getHeight()), aTemplateSize.getHeight());
-
- aActionSize.setWidth(3.35*aActionSize.getWidth());
- aViewSize.setWidth(aWinSize.getWidth()-aActionSize.getWidth()-mpViewBar->GetPosPixel().X());
- aTemplateSize.setWidth(aWinSize.getWidth());
-
- Point aActionPos = mpActionBar->GetPosPixel();
- aActionPos.setX(aWinSize.getWidth() - aActionSize.getWidth());
-
- mpViewBar->SetSizePixel(aViewSize);
- mpActionBar->SetPosSizePixel(aActionPos,aActionSize);
- mpTemplateBar->SetSizePixel(aTemplateSize);
-
- Point aViewPos = mpLocalView->GetPosPixel();
- aViewPos.setY(nToolbarsHeight);
- aViewPos.setX(0);
-
- // Set search box position and size
- Size aSearchSize = mpSearchEdit->CalcMinimumSize();
- aSearchSize.setWidth(aWinSize.getWidth() - 2*PADDING_DLG_BORDER);
-
- mpSearchEdit->SetSizePixel(aSearchSize);
- mpSearchEdit->SetPosPixel(Point(PADDING_DLG_BORDER,aViewPos.Y()));
-
- if (mpSearchEdit->IsVisible())
- aViewPos.setY(aViewPos.getY() + mpSearchEdit->GetSizePixel().getHeight() );
-
- // Set view position below toolbox and search box
- Size aThumbSize(aWinSize.getWidth(), aWinSize.getHeight() - aViewPos.getY());
-
- mpLocalView->SetPosSizePixel(aViewPos,aThumbSize);
- mpRemoteView->SetPosSizePixel(aViewPos,aThumbSize);
- mpSearchView->SetPosSizePixel(aViewPos,aThumbSize);
-
- ModelessDialog::Resize();
+ SvtViewOptions aViewSettings(E_DIALOG, TM_SETTING_MANAGER);
+ aViewSettings.SetUserData(aSettings);
}
IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXViewHdl)
{
- switch(mpViewBar->GetCurItemId())
- {
- case TBI_TEMPLATE_IMPORT:
+ const sal_uInt16 nCurItemId = mpViewBar->GetCurItemId();
+
+ if (nCurItemId == mpViewBar->GetItemId(VIEWBAR_IMPORT))
OnTemplateImport();
- break;
- case TBI_TEMPLATE_FOLDER_DEL:
+ else if (nCurItemId == mpViewBar->GetItemId(VIEWBAR_DELETE))
+ {
if (mpCurView == mpLocalView)
OnFolderDelete();
else
OnRepositoryDelete();
- break;
- case TBI_TEMPLATE_FOLDER_NEW:
+ }
+ else if (nCurItemId == mpViewBar->GetItemId(VIEWBAR_NEW_FOLDER))
OnFolderNew();
- break;
- case TBI_TEMPLATE_SAVE:
+ else if (nCurItemId == mpViewBar->GetItemId(VIEWBAR_SAVE))
OnTemplateSaveAs();
- break;
- default:
- break;
- }
return 0;
}
IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXActionHdl)
{
- switch(mpActionBar->GetCurItemId())
- {
- case TBI_TEMPLATE_SEARCH:
+ const sal_uInt16 nCurItemId = mpActionBar->GetCurItemId();
+
+ if (nCurItemId == mpActionBar->GetItemId(ACTIONBAR_SEARCH))
OnTemplateSearch();
- break;
- case TBI_TEMPLATE_LINK:
+ else if (nCurItemId == mpActionBar->GetItemId(ACTIONBAR_TEMPLATE))
OnTemplateLink();
- break;
- default:
- break;
- }
return 0;
}
IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXTemplateHdl)
{
- switch(mpTemplateBar->GetCurItemId())
- {
- case TBI_TEMPLATE_OPEN:
+ const sal_uInt16 nCurItemId = mpTemplateBar->GetCurItemId();
+
+ if (nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_OPEN))
OnTemplateOpen();
- break;
- case TBI_TEMPLATE_EDIT:
+ else if (nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_EDIT))
OnTemplateEdit();
- break;
- case TBI_TEMPLATE_PROPERTIES:
+ else if (nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_PROPERTIES))
OnTemplateProperties();
- break;
- case TBI_TEMPLATE_DELETE:
+ else if (nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_DELETE))
OnTemplateDelete();
- break;
- case TBI_TEMPLATE_DEFAULT:
+ else if (nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_DEFAULT))
OnTemplateAsDefault();
- break;
- case TBI_TEMPLATE_EXPORT:
+ else if (nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_EXPORT))
OnTemplateExport();
- break;
- default:
- break;
- }
return 0;
}
@@ -564,19 +491,17 @@ IMPL_LINK(SfxTemplateManagerDlg, TBXDropdownHdl, ToolBox*, pBox)
{
const sal_uInt16 nCurItemId = pBox->GetCurItemId();
- switch(nCurItemId)
+ if (pBox == mpActionBar && nCurItemId == mpActionBar->GetItemId(ACTIONBAR_ACTION))
{
- case TBI_TEMPLATE_ACTION:
pBox->SetItemDown( nCurItemId, true );
- mpActionMenu->Execute(pBox,pBox->GetItemRect(TBI_TEMPLATE_ACTION),
- POPUPMENU_EXECUTE_DOWN);
+ mpActionMenu->Execute(pBox, pBox->GetItemRect(nCurItemId), POPUPMENU_EXECUTE_DOWN);
pBox->SetItemDown( nCurItemId, false );
pBox->EndSelection();
pBox->Invalidate();
- break;
- case TBI_TEMPLATE_MOVE:
+ }
+ else if (pBox == mpTemplateBar && nCurItemId == mpTemplateBar->GetItemId(TEMPLATEBAR_MOVE))
{
pBox->SetItemDown( nCurItemId, true );
@@ -593,30 +518,25 @@ IMPL_LINK(SfxTemplateManagerDlg, TBXDropdownHdl, ToolBox*, pBox)
pMoveMenu->InsertSeparator();
- pMoveMenu->InsertItem(MNI_MOVE_NEW,SfxResId(STR_MOVE_NEW).toString());
+ pMoveMenu->InsertItem(MNI_MOVE_NEW, SfxResId(STR_MOVE_NEW));
- pMoveMenu->Execute(pBox,pBox->GetItemRect(TBI_TEMPLATE_MOVE),
- POPUPMENU_EXECUTE_DOWN);
+ pMoveMenu->Execute(pBox, pBox->GetItemRect(nCurItemId), POPUPMENU_EXECUTE_DOWN);
delete pMoveMenu;
pBox->SetItemDown( nCurItemId, false );
pBox->EndSelection();
pBox->Invalidate();
- break;
}
- case TBI_TEMPLATE_REPOSITORY:
+ else if (pBox == mpViewBar && nCurItemId == mpViewBar->GetItemId(VIEWBAR_REPOSITORY))
+ {
pBox->SetItemDown( nCurItemId, true );
- mpRepositoryMenu->Execute(pBox,pBox->GetItemRect(TBI_TEMPLATE_REPOSITORY),
- POPUPMENU_EXECUTE_DOWN);
+ mpRepositoryMenu->Execute(pBox, pBox->GetItemRect(nCurItemId), POPUPMENU_EXECUTE_DOWN);
pBox->SetItemDown( nCurItemId, false );
pBox->EndSelection();
pBox->Invalidate();
- break;
- default:
- break;
}
return 0;
@@ -743,10 +663,10 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, OpenRegionHdl)
maSelFolders.clear();
maSelTemplates.clear();
- mpViewBar->ShowItem(TBI_TEMPLATE_FOLDER_NEW,mpCurView->isNestedRegionAllowed());
+ mpViewBar->ShowItem(VIEWBAR_NEW_FOLDER, mpCurView->isNestedRegionAllowed());
if (!mbIsSaveMode)
- mpViewBar->ShowItem(TBI_TEMPLATE_IMPORT,mpCurView->isImportAllowed());
+ mpViewBar->ShowItem(VIEWBAR_IMPORT, mpCurView->isImportAllowed());
mpTemplateBar->Hide();
mpViewBar->Show();
@@ -803,25 +723,8 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, SearchUpdateHdl)
bool bDisplayFolder = !mpCurView->isNonRootRegionVisible();
- FILTER_APPLICATION eFilter = FILTER_APP_NONE;
- switch (maTabControl.GetCurPageId())
- {
- case FILTER_DOCS:
- eFilter = FILTER_APP_WRITER;
- break;
- case FILTER_PRESENTATIONS:
- eFilter = FILTER_APP_IMPRESS;
- break;
- case FILTER_SHEETS:
- eFilter = FILTER_APP_CALC;
- break;
- case FILTER_DRAWS:
- eFilter = FILTER_APP_DRAW;
- break;
- }
-
std::vector<TemplateItemProperties> aItems =
- mpLocalView->getFilteredItems(SearchView_Keyword(aKeyword,eFilter));
+ mpLocalView->getFilteredItems(SearchView_Keyword(aKeyword, getCurrentFilter()));
for (size_t i = 0; i < aItems.size(); ++i)
{
@@ -857,9 +760,9 @@ void SfxTemplateManagerDlg::OnRegionState (const ThumbnailViewItem *pItem)
{
if (maSelFolders.empty() && !mbIsSaveMode)
{
- mpViewBar->ShowItem(TBI_TEMPLATE_IMPORT);
- mpViewBar->ShowItem(TBI_TEMPLATE_FOLDER_DEL);
- mpViewBar->HideItem(TBI_TEMPLATE_FOLDER_NEW);
+ mpViewBar->ShowItem(VIEWBAR_IMPORT);
+ mpViewBar->ShowItem(VIEWBAR_DELETE);
+ mpViewBar->HideItem(VIEWBAR_NEW_FOLDER);
}
maSelFolders.insert(pItem);
@@ -870,9 +773,9 @@ void SfxTemplateManagerDlg::OnRegionState (const ThumbnailViewItem *pItem)
if (maSelFolders.empty() && !mbIsSaveMode)
{
- mpViewBar->HideItem(TBI_TEMPLATE_IMPORT);
- mpViewBar->HideItem(TBI_TEMPLATE_FOLDER_DEL);
- mpViewBar->ShowItem(TBI_TEMPLATE_FOLDER_NEW);
+ mpViewBar->HideItem(VIEWBAR_IMPORT);
+ mpViewBar->HideItem(VIEWBAR_DELETE);
+ mpViewBar->ShowItem(VIEWBAR_NEW_FOLDER);
}
}
}
@@ -892,16 +795,16 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem)
{
if (!mbIsSaveMode)
{
- mpTemplateBar->HideItem(TBI_TEMPLATE_OPEN);
- mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT);
- mpTemplateBar->HideItem(TBI_TEMPLATE_PROPERTIES);
- mpTemplateBar->HideItem(TBI_TEMPLATE_DEFAULT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_OPEN);
+ mpTemplateBar->HideItem(TEMPLATEBAR_EDIT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_PROPERTIES);
+ mpTemplateBar->HideItem(TEMPLATEBAR_DEFAULT);
}
else
{
- mpTemplateBar->HideItem(TBI_TEMPLATE_SAVE);
- mpTemplateBar->HideItem(TBI_TEMPLATE_PROPERTIES);
- mpTemplateBar->HideItem(TBI_TEMPLATE_DEFAULT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_SAVE);
+ mpTemplateBar->HideItem(TEMPLATEBAR_PROPERTIES);
+ mpTemplateBar->HideItem(TEMPLATEBAR_DEFAULT);
}
}
@@ -923,16 +826,16 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem)
{
if (!mbIsSaveMode)
{
- mpTemplateBar->ShowItem(TBI_TEMPLATE_OPEN);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_EDIT);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_OPEN);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_EDIT);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_PROPERTIES);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_DEFAULT);
}
else
{
- mpTemplateBar->ShowItem(TBI_TEMPLATE_SAVE);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_SAVE);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_PROPERTIES);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_DEFAULT);
}
}
}
@@ -1146,28 +1049,10 @@ void SfxTemplateManagerDlg::OnTemplateExport()
void SfxTemplateManagerDlg::OnTemplateSearch ()
{
- Point aPos = mpLocalView->GetPosPixel();
bool bVisible = mpSearchEdit->IsVisible();
- Size aWinSize = GetSizePixel();
- long nEditHeight = mpSearchEdit->GetSizePixel().getHeight();
-
- if (bVisible)
- {
- aWinSize.setHeight(aWinSize.getHeight() - nEditHeight );
- aPos.setY(aPos.getY() - nEditHeight );
- mpActionBar->SetItemState(TBI_TEMPLATE_SEARCH,STATE_NOCHECK);
- }
- else
- {
- aWinSize.setHeight(aWinSize.getHeight() + nEditHeight );
- aPos.setY(aPos.getY() + nEditHeight );
- mpActionBar->SetItemState(TBI_TEMPLATE_SEARCH,STATE_CHECK);
- }
-// SetSizePixel(aWinSize);
- mpLocalView->SetPosPixel(aPos);
- mpRemoteView->SetPosPixel(aPos);
- mpSearchView->SetPosPixel(aPos);
+ mpActionBar->SetItemState(mpActionBar->GetItemId(ACTIONBAR_SEARCH),
+ bVisible? STATE_NOCHECK: STATE_CHECK);
// Hide search view
if (bVisible)
@@ -1511,11 +1396,11 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal)
{
mpCurView = mpLocalView;
- mpViewBar->HideItem(TBI_TEMPLATE_FOLDER_DEL);
+ mpViewBar->HideItem(VIEWBAR_DELETE);
// Enable deleting and exporting items from the filesystem
- mpTemplateBar->ShowItem(TBI_TEMPLATE_EXPORT);
- mpTemplateBar->ShowItem(TBI_TEMPLATE_DELETE);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_EXPORT);
+ mpTemplateBar->ShowItem(TEMPLATEBAR_DELETE);
mpRemoteView->Hide();
mpLocalView->Show();
@@ -1524,11 +1409,11 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal)
{
mpCurView = mpRemoteView;
- mpViewBar->ShowItem(TBI_TEMPLATE_FOLDER_DEL);
+ mpViewBar->ShowItem(VIEWBAR_DELETE);
// Disable deleting and exporting items from remote repositories
- mpTemplateBar->HideItem(TBI_TEMPLATE_EXPORT);
- mpTemplateBar->HideItem(TBI_TEMPLATE_DELETE);
+ mpTemplateBar->HideItem(TEMPLATEBAR_EXPORT);
+ mpTemplateBar->HideItem(TEMPLATEBAR_DELETE);
mpLocalView->Hide();
mpRemoteView->Show();
diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc
deleted file mode 100644
index 563f79f01e00..000000000000
--- a/sfx2/source/doc/templatedlg.hrc
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#define TAB_CONTROL 1
-#define FILTER_DOCS 3
-#define FILTER_PRESENTATIONS 4
-#define FILTER_SHEETS 5
-#define FILTER_DRAWS 6
-
-#define TEMPLATE_VIEW 7
-
-#define TBX_ACTION_VIEW 8
-#define TOOLBARS 9
-#define TBI_TEMPLATE_IMPORT 10
-
-#define TBX_ACTION_ACTION 11
-#define TBI_TEMPLATE_SEARCH 12
-#define TBI_TEMPLATE_ACTION 13
-
-#define TBX_ACTION_TEMPLATES 14
-#define TBI_TEMPLATE_EDIT 15
-#define TBI_TEMPLATE_PROPERTIES 16
-#define TBI_TEMPLATE_MOVE 17
-#define TBI_TEMPLATE_DELETE 18
-#define TBI_TEMPLATE_DEFAULT 19
-#define TBI_TEMPLATE_EXPORT 20
-
-#define MNI_ACTION_REFRESH 22
-#define MNI_ACTION_SORT_NAME 23
-
-#define TBI_TEMPLATE_FOLDER_DEL 25
-#define TBI_TEMPLATE_REPOSITORY 26
-
-#define MNI_ACTION_DEFAULT 27
-
-#define TBI_TEMPLATE_SAVE 28
-
-#define TBI_TEMPLATE_FOLDER_NEW 29
-
-#define TBI_TEMPLATE_OPEN 30
-#define TBI_TEMPLATE_LINK 31
-
-#define STR_ACTION_REFRESH 263
-#define STR_ACTION_SORT_NAME 264
-
-#define MNI_MOVE_NEW 265
-#define MNI_MOVE_FOLDER_BASE 267
-
-#define STR_MOVE_NEW 268
-#define STR_INPUT_NEW 271
-
-#define STR_REPOSITORY_LOCAL 272
-#define STR_REPOSITORY_NEW 273
-
-#define MNI_REPOSITORY_LOCAL 274
-#define MNI_REPOSITORY_NEW 275
-#define MNI_REPOSITORY_BASE 276
-
-#define STR_ACTION_DEFAULT 277
-#define STR_MSG_ERROR_LOCAL_MOVE 278
-#define STR_MSG_ERROR_REMOTE_MOVE 279
-#define STR_MSG_ERROR_IMPORT 280
-#define STR_MSG_ERROR_EXPORT 281
-#define STR_MSG_ERROR_DELETE_TEMPLATE 282
-#define STR_MSG_ERROR_DELETE_FOLDER 283
-#define STR_MSG_ERROR_REPOSITORY_NAME 284
-#define STR_MSG_ERROR_SAVE_SELECT 285
-#define STR_MSG_ERROR_SELECT_FOLDER 286
-
-#define STR_INPUT_TEMPLATE_NEW 288
-
-#define STR_QMSG_SEL_FOLDER_DELETE 289
-#define STR_QMSG_TEMPLATE_OVERWRITE 290
-#define STR_QMSG_SEL_TEMPLATE_DELETE 291
-
-#define IMG_ACTION_SORT 304
-#define IMG_ACTION_REFRESH 305
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
deleted file mode 100644
index aefd7619c8ef..000000000000
--- a/sfx2/source/doc/templatedlg.src
+++ /dev/null
@@ -1,392 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "doc.hrc"
-#include "templatedlg.hrc"
-#include "helpid.hrc"
-
-String STR_ACTION_SORT_NAME
-{
- Text [ en-US ] = "Sort by name";
-};
-
-String STR_ACTION_REFRESH
-{
- Text [ en-US ] = "Refresh";
-};
-
-String STR_ACTION_DEFAULT
-{
- Text [ x-comment ] = "leave ending space";
- Text [ en-US ] = "Reset Default Template ";
-};
-
-String STR_MOVE_NEW
-{
- Text [ en-US ] = "New folder";
-};
-
-String STR_INPUT_NEW
-{
- Text [ en-US ] = "Enter folder name:";
-};
-
-String STR_REPOSITORY_LOCAL
-{
- Text [ en-US ] = "Local";
-};
-
-String STR_REPOSITORY_NEW
-{
- Text [ en-US ] = "New Repository";
-};
-
-String STR_MSG_ERROR_LOCAL_MOVE
-{
- Text [ en-US ] = "Error moving the following templates to $1.\n$2" ;
-};
-
-String STR_MSG_ERROR_REMOTE_MOVE
-{
- Text [ en-US ] = "Error moving the following templates from repository $1 to folder $2.\n$3" ;
-};
-
-String STR_MSG_ERROR_EXPORT
-{
- Text [ en-US ] = "Error exporting the following templates:\n$1";
-};
-
-String STR_MSG_ERROR_IMPORT
-{
- Text [ en-US ] = "Error importing the following templates to $1:\n$2";
-};
-
-String STR_MSG_ERROR_DELETE_TEMPLATE
-{
- Text [ en-US ] = "The following templates cannot be deleted:\n$1";
-};
-
-String STR_MSG_ERROR_DELETE_FOLDER
-{
- Text [ en-US ] = "The following folders cannot be deleted:\n$1";
-};
-
-String STR_MSG_ERROR_REPOSITORY_NAME
-{
- Text [ en-US ] = "Failed to create repository \"$1\".\nA repository with this name may already exist.";
-};
-
-String STR_MSG_ERROR_SELECT_FOLDER
-{
- Text [ en-US ] = "Select the destination folder(s) to save the template.";
-};
-
-String STR_INPUT_TEMPLATE_NEW
-{
- Text [ en-US ] = "Enter template name:";
-};
-
-String STR_QMSG_SEL_FOLDER_DELETE
-{
- Text [ en-US ] = "Do you want to delete the selected folders?";
-};
-
-String STR_QMSG_TEMPLATE_OVERWRITE
-{
- Text [ en-US ] = "A template named $1 already exist in $2. Do you want to overwrite it?";
-};
-
-String STR_QMSG_SEL_TEMPLATE_DELETE
-{
- Text [ en-US ] = "Do you want to delete the selected templates?";
-};
-
-TabPage TAB_TEMPLATE_MANAGER
-{
- Size = MAP_APPFONT( 290, 220 );
- Hide = TRUE;
-
- Control TEMPLATE_VIEW
- {
- Pos = MAP_APPFONT( 0, 20 );
- Size = MAP_APPFONT( 290, 200 );
- TabStop = TRUE;
- };
-
- ToolBox TBX_ACTION_VIEW
- {
- SVLook = TRUE ;
- TabStop = TRUE ;
- Pos = MAP_APPFONT ( 4 , 0 ) ;
-
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_REPOSITORY;
- Text [ en-US ] = "Repository";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview026.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_IMPORT ;
- Hide = TRUE;
- Text [ en-US ] = "Import" ;
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview010.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_FOLDER_DEL;
- Hide = TRUE;
- Text [ en-US ] = "Delete";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview025.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_SAVE;
- Hide = TRUE;
- Text [ en-US ] = "Save";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview028.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_FOLDER_NEW;
- Text [ en-US ] = "New folder";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview029.png"; };
- };
- };
- };
- };
-
- ToolBox TBX_ACTION_ACTION
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 4 , 0 ) ;
-
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_SEARCH;
- Text [en-US] = "Search";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionaction012.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_ACTION;
- Text [en-US] = "Action Menu";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionaction013.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_LINK;
- Text [en-US] = "Get more templates for %PRODUCTNAME";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview010.png" ; };
- };
- };
- };
- };
-
- ToolBox TBX_ACTION_TEMPLATES
- {
- SVLook = TRUE ;
- TabStop = TRUE ;
- Pos = MAP_APPFONT ( 4 , 0 ) ;
- Hide = TRUE;
-
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_SAVE;
- Hide = TRUE;
- Text [ en-US ] = "Save";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview028.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_OPEN;
- Text [ en-US ] = "Open";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actionview030.png"; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_EDIT;
- Text [ en-US ] = "Edit";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actiontemplates019.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_PROPERTIES;
- Text [ en-US ] = "Properties";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actiontemplates016.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_DEFAULT;
- Text [ en-US ] = "Set as default";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actiontemplates015.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_MOVE;
- Text [ en-US ] = "Move to folder" ;
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actiontemplates017.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_EXPORT;
- Text [ en-US ] = "Export";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actiontemplates020.png" ; };
- };
- };
-
- ToolBoxItem
- {
- Identifier = TBI_TEMPLATE_DELETE;
- Text [ en-US ] = "Delete";
-
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "actiontemplates018.png" ; };
- };
- };
- };
- };
-
- Image IMG_ACTION_SORT
- {
- ImageBitmap = Bitmap
- {
- File = "sortascending.png";
- };
- };
-
- Image IMG_ACTION_REFRESH
- {
- ImageBitmap = Bitmap
- {
- File = "reload.png";
- };
- };
-};
-
-ModelessDialog DLG_TEMPLATE_MANAGER
-{
- OutputSize = TRUE;
- SVLook = TRUE;
- Moveable = TRUE;
- Closeable = TRUE;
- Sizeable = TRUE;
- Hide = TRUE;
- Size = MAP_APPFONT ( 290 , 250 );
- Text [en-US] = "Template Manager";
-
- TabControl TAB_CONTROL
- {
- OutputSize = TRUE;
- Size = MAP_APPFONT( 290, 250 );
- Pos = MAP_APPFONT( 0, 0 );
- PageList =
- {
- PageItem
- {
- Identifier = FILTER_DOCS;
- Text [ en-US ] = "Documents";
- };
- PageItem
- {
- Identifier = FILTER_SHEETS;
- Text [ en-US ] = "Spreadsheets";
- };
- PageItem
- {
- Identifier = FILTER_PRESENTATIONS;
- Text [ en-US ] = "Presentations";
- };
- PageItem
- {
- Identifier = FILTER_DRAWS;
- Text [ en-US ] = "Drawings";
- };
- };
- };
-
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
new file mode 100644
index 000000000000..4dd7b8cc815f
--- /dev/null
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkWindow" id="TemplateDialog">
+ <property name="width_request">800</property>
+ <property name="height_request">560</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkNotebook" id="tab_control">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</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="visible">True</property>
+ <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="visible">True</property>
+ <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="visible">True</property>
+ <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="GtkToolbar" id="action_templates">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="GtkToolButton" id="template_save">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">template_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="open">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">open</property>
+ <property name="label" translatable="yes">Open</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actionview030.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="edit">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">edit</property>
+ <property name="label" translatable="yes">Edit</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actiontemplates019.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="properties">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">properties</property>
+ <property name="label" translatable="yes">Properties</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actiontemplates016.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="default">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">default</property>
+ <property name="label" translatable="yes">Set as Default</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actiontemplates015.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="move">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">move</property>
+ <property name="label" translatable="yes">Move to Folder</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actiontemplates017.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="export">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">export</property>
+ <property name="label" translatable="yes">Export</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actiontemplates020.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="template_delete">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">template_delete</property>
+ <property name="label" translatable="yes">Delete</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actiontemplates018.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">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="action_action">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="GtkToolButton" id="search">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">search</property>
+ <property name="label" translatable="yes">Search</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actionaction012.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="action_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">action_menu</property>
+ <property name="label" translatable="yes">Action Menu</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">sfx2/imglst/actionaction013.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="template_link">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action_name">template_link</property>
+ <property name="label" translatable="yes">Get more templates for %PRODUCTNAME</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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</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="GtkEntry" id="search_edit">
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">‚óŹ</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-TemplateLocalView" id="template_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-TemplateSearchView" id="search_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-TemplateRemoteView" id="remote_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="filter_docs">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Documents</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="filter_sheets">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Spreadsheets</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="filter_presentations">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Presentations</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="filter_draws">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Drawings</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>