You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/05/22 13:48:45 UTC
svn commit: r1485165 - in /openoffice/trunk/main/sfx2/source/sidebar:
MenuButton.cxx TabBar.cxx TabBar.hxx
Author: af
Date: Wed May 22 11:48:44 2013
New Revision: 1485165
URL: http://svn.apache.org/r1485165
Log:
i122366: Uncheck sidebar menu button after menu is closed.
Modified:
openoffice/trunk/main/sfx2/source/sidebar/MenuButton.cxx
openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx
openoffice/trunk/main/sfx2/source/sidebar/TabBar.hxx
Modified: openoffice/trunk/main/sfx2/source/sidebar/MenuButton.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/MenuButton.cxx?rev=1485165&r1=1485164&r2=1485165&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/MenuButton.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/MenuButton.cxx Wed May 22 11:48:44 2013
@@ -109,18 +109,12 @@ void MenuButton::MouseMove (const MouseE
void MenuButton::MouseButtonDown (const MouseEvent& rMouseEvent)
{
-#if 0
- Hide();
- CheckBox::MouseButtonDown(rMouseEvent);
- Show();
-#else
if (rMouseEvent.IsLeft())
{
mbIsLeftButtonDown = true;
CaptureMouse();
Invalidate();
}
-#endif
}
@@ -128,11 +122,6 @@ void MenuButton::MouseButtonDown (const
void MenuButton::MouseButtonUp (const MouseEvent& rMouseEvent)
{
-#if 0
- Hide();
- CheckBox::MouseButtonUp(rMouseEvent);
- Show();
-#else
if (IsMouseCaptured())
ReleaseMouse();
@@ -150,7 +139,6 @@ void MenuButton::MouseButtonUp (const Mo
mbIsLeftButtonDown = false;
Invalidate();
}
-#endif
}
Modified: openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx?rev=1485165&r1=1485164&r2=1485165&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx Wed May 22 11:48:44 2013
@@ -379,8 +379,11 @@ void TabBar::UpdateFocusManager (FocusMa
IMPL_LINK(TabBar, OnToolboxClicked, void*, EMPTYARG)
{
+ if ( ! mpMenuButton)
+ return 0;
+
::std::vector<DeckMenuData> aMenuData;
-
+
for(ItemContainer::const_iterator iItem(maItems.begin()),iEnd(maItems.end());
iItem!=iEnd;
++iItem)
@@ -404,6 +407,7 @@ IMPL_LINK(TabBar, OnToolboxClicked, void
mpMenuButton->GetPosPixel(),
mpMenuButton->GetSizePixel()),
aMenuData);
+ mpMenuButton->Check(sal_False);
return 0;
}
Modified: openoffice/trunk/main/sfx2/source/sidebar/TabBar.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/TabBar.hxx?rev=1485165&r1=1485164&r2=1485165&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/TabBar.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/TabBar.hxx Wed May 22 11:48:44 2013
@@ -34,6 +34,7 @@
#include <boost/scoped_ptr.hpp>
class Button;
+class CheckBox;
class RadioButton;
namespace css = ::com::sun::star;
@@ -98,7 +99,7 @@ public:
private:
cssu::Reference<css::frame::XFrame> mxFrame;
- ::boost::scoped_ptr<Button> mpMenuButton;
+ ::boost::scoped_ptr<CheckBox> mpMenuButton;
class Item
{
public: