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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 1 05:02:27 PDT 2012


 vcl/unx/gtk/window/gtkframe.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 08df1f6202ddd159e865258af0ecc30fd758f929
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Mon Oct 1 14:01:25 2012 +0200

    revoke the watch when dying

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 3cf6bbb..5f10583 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -612,9 +612,9 @@ void GtkSalFrame::EnsureAppMenuWatch()
          G_BUS_NAME_WATCHER_FLAGS_NONE,
          on_registrar_available,
          on_registrar_unavailable,
-         reinterpret_cast<gpointer>(this),
+         static_cast<GtkSalFrame*>(this),
          NULL);
-    ensure_dbus_setup(gtk_widget_get_window(GTK_WIDGET(m_pWindow)), this);
+    ensure_dbus_setup(gtk_widget_get_window(GTK_WIDGET(m_pWindow)), static_cast<GtkSalFrame*>(this));
 }
 
 GtkSalFrame::~GtkSalFrame()
@@ -660,6 +660,8 @@ GtkSalFrame::~GtkSalFrame()
         gtk_widget_destroy( GTK_WIDGET( m_pFixedContainer ) );
     {
         SolarMutexGuard aGuard;
+        if(m_nWatcherId)
+            g_bus_unwatch_name(m_nWatcherId);
         if(m_pSalMenu)
             static_cast<GtkSalMenu*>(m_pSalMenu)->DisconnectFrame();
         if( m_pWindow )


More information about the Libreoffice-commits mailing list