[Libreoffice-commits] core.git: icon-themes/galaxy sfx2/inc sfx2/source
Rafael Dominguez
venccsralph at gmail.com
Wed May 8 16:52:02 PDT 2013
icon-themes/galaxy/sfx2/imglst/actionview030.png |binary
sfx2/inc/templatedlg.hxx | 1 +
sfx2/source/doc/templatedlg.cxx | 13 +++++++++++++
sfx2/source/doc/templatedlg.hrc | 2 ++
sfx2/source/doc/templatedlg.src | 11 +++++++++++
5 files changed, 27 insertions(+)
New commits:
commit f9f421d4428c901aa0bc9483ac3835e7950c657d
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Wed May 8 19:11:13 2013 -0430
Add open action to template manager toolbar.
Change-Id: I5cec8814776f2658c990fb45193736a60178965b
diff --git a/icon-themes/galaxy/sfx2/imglst/actionview030.png b/icon-themes/galaxy/sfx2/imglst/actionview030.png
new file mode 100644
index 0000000..53c5ee8
Binary files /dev/null and b/icon-themes/galaxy/sfx2/imglst/actionview030.png differ
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx
index c7b40f6..c5feb96 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/sfx2/inc/templatedlg.hxx
@@ -80,6 +80,7 @@ private:
void OnTemplateImport ();
void OnTemplateSearch ();
+ void OnTemplateOpen ();
void OnTemplateEdit ();
void OnTemplateProperties ();
void OnTemplateDelete ();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index e9892a6..2db2c8b 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -314,6 +314,7 @@ void SfxTemplateManagerDlg::setSaveMode(bool bMode)
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);
@@ -525,6 +526,9 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXTemplateHdl)
{
switch(mpTemplateBar->GetCurItemId())
{
+ case TBI_TEMPLATE_OPEN:
+ OnTemplateOpen();
+ break;
case TBI_TEMPLATE_EDIT:
OnTemplateEdit();
break;
@@ -877,6 +881,7 @@ 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);
@@ -907,6 +912,7 @@ 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);
@@ -1166,6 +1172,13 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
mpSearchEdit->GrabFocus();
}
+void SfxTemplateManagerDlg::OnTemplateOpen ()
+{
+ ThumbnailViewItem *pItem = const_cast<ThumbnailViewItem*>(*maSelTemplates.begin());
+
+ OpenTemplateHdl(pItem);
+}
+
void SfxTemplateManagerDlg::OnTemplateEdit ()
{
uno::Sequence< PropertyValue > aArgs(3);
diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc
index dec2b52..40bdfa05 100644
--- a/sfx2/source/doc/templatedlg.hrc
+++ b/sfx2/source/doc/templatedlg.hrc
@@ -43,6 +43,8 @@
#define TBI_TEMPLATE_FOLDER_NEW 29
+#define TBI_TEMPLATE_OPEN 30
+
#define STR_ACTION_REFRESH 263
#define STR_ACTION_SORT_NAME 264
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 32f3319..c205b99 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -241,6 +241,17 @@ TabPage TAB_TEMPLATE_MANAGER
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";
More information about the Libreoffice-commits
mailing list