[Libreoffice-commits] .: Branch 'feature/unitymenus-quantal' - vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 5 05:20:34 PDT 2012


 vcl/unx/gtk/window/gtksalmenu.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 7ffc24eb76325afef89c25e8a7fe13124ed5a041
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Fri Oct 5 14:19:37 2012 +0200

    more SolarMutexes

diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 4047872..5a9ac3d 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;
 }


More information about the Libreoffice-commits mailing list