[ekiga] MainWindow: Fix GtkStack GSettings value being reset on exit.



commit 6a014a4170d4aedcd0a93a0572e4d62cfdbdb97e
Author: Damien Sandras <dsandras seconix com>
Date:   Sat Apr 18 17:37:41 2015 +0200

    MainWindow: Fix GtkStack GSettings value being reset on exit.
    
    This is a workaround against bug #724506

 lib/engine/gui/gtk-frontend/main_window.cpp |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/main_window.cpp b/lib/engine/gui/gtk-frontend/main_window.cpp
index c1f6b9a..baebef5 100644
--- a/lib/engine/gui/gtk-frontend/main_window.cpp
+++ b/lib/engine/gui/gtk-frontend/main_window.cpp
@@ -830,6 +830,15 @@ ekiga_main_window_dispose (GObject* gobject)
     g_object_unref (mw->priv->roster_view);
     mw->priv->roster_view = NULL;
   }
+
+  // Workaround bug #724506
+  // Unbind exactly once, then reset the variable. GTK+ will
+  // destroy the widget when things get finalized.
+  if (mw->priv->main_stack) {
+    g_settings_unbind (mw->priv->main_stack, "visible-child-name");
+    mw->priv->main_stack = NULL;
+  }
+
   if (mw->priv->builder) {
     g_object_unref (mw->priv->builder);
     mw->priv->builder = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]