[gimp] app: really really destroy the tool options widgets this time



commit c448cc7d251d8ef575f52eb653a11738fe147329
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 0b6f38d..446f49b 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -235,7 +235,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);
@@ -355,9 +358,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]