summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/window/gtksalmenu.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-10-05 14:19:37 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:52:55 +0100
commit58b5f1714ddab4afec382f535887cf6f98a4c11b (patch)
tree00d27f669683da166486ccb39e9dc1063007afca /vcl/unx/gtk/window/gtksalmenu.cxx
parent839a18eb41aa6c3dd74b66fa4f50636a39f327ac (diff)
more SolarMutexes
Diffstat (limited to 'vcl/unx/gtk/window/gtksalmenu.cxx')
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 4047872179bb..5a9ac3dfd6af 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -407,6 +407,7 @@ GtkSalMenu::GtkSalMenu( sal_Bool bMenuBar ) :
GtkSalMenu::~GtkSalMenu()
{
+ SolarMutexGuard aGuard;
if ( mbMenuBar == sal_True )
((GtkSalFrame*) mpFrame)->SetMenu( NULL );
@@ -420,6 +421,7 @@ sal_Bool GtkSalMenu::VisibleMenuBar()
void GtkSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos )
{
+ SolarMutexGuard aGuard;
GtkSalMenuItem *pItem = static_cast<GtkSalMenuItem*>( pSalMenuItem );
if ( nPos == MENU_APPEND )
@@ -432,11 +434,13 @@ void GtkSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos )
void GtkSalMenu::RemoveItem( unsigned nPos )
{
+ SolarMutexGuard aGuard;
maItems.erase( maItems.begin() + nPos );
}
void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos )
{
+ SolarMutexGuard aGuard;
GtkSalMenuItem *pItem = static_cast< GtkSalMenuItem* >( pSalMenuItem );
GtkSalMenu *pGtkSubMenu = static_cast< GtkSalMenu* >( pSubMenu );
@@ -492,6 +496,7 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame )
const GtkSalFrame* GtkSalMenu::GetFrame() const
{
+ SolarMutexGuard aGuard;
const GtkSalMenu* pMenu = this;
while( pMenu && ! pMenu->mpFrame )
pMenu = pMenu->mpParentSalMenu;
@@ -716,6 +721,7 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand )
sal_Bool GtkSalMenu::IsItemVisible( unsigned nPos )
{
+ SolarMutexGuard aGuard;
sal_Bool bVisible = sal_False;
if ( nPos < maItems.size() )
@@ -734,6 +740,7 @@ void GtkSalMenu::EnableItem( unsigned, sal_Bool )
void GtkSalMenu::ShowItem( unsigned nPos, sal_Bool bShow )
{
+ SolarMutexGuard aGuard;
if ( nPos < maItems.size() )
( ( GtkSalMenuItem* ) maItems[ nPos ] )->mbVisible = bShow;
}