[Libreoffice-commits] core.git: vcl/unx

David Tardon dtardon at redhat.com
Tue Aug 19 06:24:33 PDT 2014


 vcl/unx/gtk/fpicker/SalGtkPicker.cxx |    2 +-
 vcl/unx/gtk/fpicker/SalGtkPicker.hxx |    7 -------
 vcl/unx/gtk/window/gtksalmenu.cxx    |    9 +--------
 3 files changed, 2 insertions(+), 16 deletions(-)

New commits:
commit ca54b6ea903da7a1bc815c27389d2f1d362edaff
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Aug 19 15:22:45 2014 +0200

    use SolarMutex instead of a custom GdkThreadLock
    
    C.f. commit 861a1c2dea41c141bffce54c30d53e65b7b88973.
    
    Change-Id: I9f6cf917c63ee8c0db5461529c4ee277e231368f

diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index 25553aa..ccae7d1 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -98,7 +98,7 @@ extern "C"
 {
     static gboolean canceldialog(RunDialog *pDialog)
     {
-        GdkThreadLock lock;
+        SolarMutexGuard g;
         pDialog->cancel();
         return false;
     }
diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.hxx b/vcl/unx/gtk/fpicker/SalGtkPicker.hxx
index 6a72e7f..8f4552c 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.hxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.hxx
@@ -66,13 +66,6 @@ class SalGtkPicker
         OUString getResString( sal_Int32 aId );
 };
 
-class GdkThreadLock
-{
-public:
-    GdkThreadLock() { gdk_threads_enter(); }
-    ~GdkThreadLock() { gdk_threads_leave(); }
-};
-
 //Run the Gtk Dialog. Watch for any "new windows" created while we're
 //executing and consider that a CANCEL event to avoid e.g. "file cannot be opened"
 //modal dialogs and this one getting locked if some other API call causes this
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 92176b7..09cd44f 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -450,17 +450,10 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig
     pItem->mpSubMenu = pGtkSubMenu;
 }
 
-class GdkThreadLock
-{
-public:
-    GdkThreadLock() { gdk_threads_enter(); }
-    ~GdkThreadLock() { gdk_threads_leave(); }
-};
-
 static bool bInvalidMenus = false;
 static gboolean RefreshMenusUnity(gpointer)
 {
-    GdkThreadLock aLock;
+    SolarMutexGuard g;
 
     SalDisplay* pSalDisplay = GetGenericData()->GetSalDisplay();
     std::list< SalFrame* >::const_iterator pSalFrame = pSalDisplay->getFrames().begin();


More information about the Libreoffice-commits mailing list