[Libreoffice-commits] core.git: Branch 'feature/sidebar' - sfx2/source

Andre Fischer af at apache.org
Tue May 14 12:33:31 PDT 2013


 sfx2/source/sidebar/DeckTitleBar.cxx  |   15 +++++++++------
 sfx2/source/sidebar/PanelTitleBar.cxx |    5 +++++
 sfx2/source/sidebar/Sidebar.hrc       |    3 +++
 sfx2/source/sidebar/Sidebar.src       |    9 +++++++++
 4 files changed, 26 insertions(+), 6 deletions(-)

New commits:
commit 17383db8f19de33c2adac783ac91c2cbf3cab438
Author: Andre Fischer <af at apache.org>
Date:   Mon May 13 14:41:07 2013 +0000

    Resolves: #i122298# Added quick help texts to title bar buttons of sidebar...
    
    panels and deck
    
    (cherry picked from commit 2f18055a153f4e66ec72b0c20673032d6edeebab)
    
    Change-Id: Ic573030d5b8a437e09a763fb0350c22ef33e151a

diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 0370ef8..ed7fd17 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 0175741..9b67e3c 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 852648c..c9c4d79 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 64eef88..6ec57c1 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";
+};
 


More information about the Libreoffice-commits mailing list