summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-13 14:41:07 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:33 +0100
commite5818a4f5bd0f0c347e533c841c6663c2e223245 (patch)
tree5107c21649c6549dd941024d5d691f0d16cb617b /sfx2/source
parentbdfc0056c12452bae2bfe7b05547cf3f13ca4241 (diff)
Resolves: #i122298# Added quick help texts to title bar buttons of sidebar...
panels and deck (cherry picked from commit 2f18055a153f4e66ec72b0c20673032d6edeebab) Change-Id: Ic573030d5b8a437e09a763fb0350c22ef33e151a
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/sidebar/DeckTitleBar.cxx15
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.cxx5
-rw-r--r--sfx2/source/sidebar/Sidebar.hrc3
-rw-r--r--sfx2/source/sidebar/Sidebar.src9
4 files changed, 26 insertions, 6 deletions
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 0370ef85dadd..ed7fd178fa81 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -18,6 +18,8 @@
#include "DeckTitleBar.hxx"
#include "sfx2/sidebar/Theme.hxx"
+#include "sfx2/sfxresid.hxx"
+#include "Sidebar.hrc"
#include <vcl/image.hxx>
@@ -39,16 +41,12 @@ DeckTitleBar::DeckTitleBar (
: TitleBar(rsTitle, pParentWindow, GetBackgroundPaint()),
mnCloserItemIndex(1),
maCloserAction(rCloserAction),
- mbIsCloserVisible(rCloserAction)
+ mbIsCloserVisible(false)
{
OSL_ASSERT(pParentWindow != NULL);
if (maCloserAction)
- {
- maToolBox.InsertItem(
- mnCloserItemIndex,
- Theme::GetImage(Theme::Image_Closer));
- }
+ SetCloserVisible(true);
#ifdef DEBUG
SetText(A2S("DeckTitleBar"));
@@ -72,9 +70,14 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible)
mbIsCloserVisible = bIsCloserVisible;
if (mbIsCloserVisible)
+ {
maToolBox.InsertItem(
mnCloserItemIndex,
Theme::GetImage(Theme::Image_Closer));
+ maToolBox.SetQuickHelpText(
+ mnCloserItemIndex,
+ String(SfxResId(SFX_STR_SIDEBAR_CLOSE_DECK)));
+ }
else
maToolBox.RemoveItem(
maToolBox.GetItemPos(mnCloserItemIndex));
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index 0175741d0daf..9b67e3ca2e37 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -17,6 +17,8 @@
*/
#include "PanelTitleBar.hxx"
+#include "sfx2/sfxresid.hxx"
+#include "Sidebar.hrc"
#include "Paint.hxx"
#include "Panel.hxx"
@@ -73,6 +75,9 @@ void PanelTitleBar::SetMenuAction ( const ::boost::function<void(void)>& rMenuAc
mnMenuItemIndex,
Theme::GetImage(Theme::Image_PanelMenu));
maToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT);
+ maToolBox.SetQuickHelpText(
+ mnMenuItemIndex,
+ String(SfxResId(SFX_STR_SIDEBAR_MORE_OPTIONS)));
}
else if ( maMenuAction && !rMenuAction )
{
diff --git a/sfx2/source/sidebar/Sidebar.hrc b/sfx2/source/sidebar/Sidebar.hrc
index 852648c6a929..c9c4d79a5401 100644
--- a/sfx2/source/sidebar/Sidebar.hrc
+++ b/sfx2/source/sidebar/Sidebar.hrc
@@ -51,3 +51,6 @@
#define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL 132
#define STRING_CUSTOMIZATION 200
#define STRING_RESTORE 201
+
+#define SFX_STR_SIDEBAR_MORE_OPTIONS (RID_SFX_SIDEBAR_START + 1)
+#define SFX_STR_SIDEBAR_CLOSE_DECK (RID_SFX_SIDEBAR_START + 2)
diff --git a/sfx2/source/sidebar/Sidebar.src b/sfx2/source/sidebar/Sidebar.src
index 64eef88e3a23..6ec57c10126f 100644
--- a/sfx2/source/sidebar/Sidebar.src
+++ b/sfx2/source/sidebar/Sidebar.src
@@ -155,4 +155,13 @@ Resource RID_SIDEBAR_RESOURCE
};
};
+String SFX_STR_SIDEBAR_MORE_OPTIONS
+{
+ Text [en-US] = "More Options";
+};
+
+String SFX_STR_SIDEBAR_CLOSE_DECK
+{
+ Text [en-US] = "Close Sidebar Deck";
+};