[gimp/soc-2010-cage] app: really really destroy the tool options widgets this time



commit 4fe070f95eec382a12478d5c63d51e100d0e4ca7
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jun 24 18:36:25 2010 +0200

    app: really really destroy the tool options widgets this time

 app/tools/gimp-tools.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index 64847f4..f3a8b40 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -237,7 +237,10 @@ gimp_tools_exit (Gimp *gimp)
       options_gui = g_object_get_data (G_OBJECT (tool_info->tool_options),
                                        "gimp-tool-options-gui");
 
-      g_object_unref (options_gui);
+      gtk_widget_destroy (options_gui);
+
+      g_object_set_data (G_OBJECT (tool_info->tool_options),
+                         "gimp-tool-options-gui", NULL);
     }
 
   tool_manager_exit (gimp);
@@ -357,9 +360,10 @@ gimp_tools_restore (Gimp *gimp)
           gtk_widget_show (label);
         }
 
-      g_object_set_data (G_OBJECT (tool_info->tool_options),
-                         "gimp-tool-options-gui",
-                         g_object_ref_sink (options_gui));
+      g_object_set_data_full (G_OBJECT (tool_info->tool_options),
+                              "gimp-tool-options-gui",
+                              g_object_ref_sink (options_gui),
+                              (GDestroyNotify) g_object_unref);
 
       if (tool_info->presets)
         gimp_tool_presets_load (tool_info->presets, NULL);



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