[gimp] Destroy the toplevel, not the shell in gimp_display_delete()
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Destroy the toplevel, not the shell in gimp_display_delete()
- Date: Tue, 29 Sep 2009 18:40:42 +0000 (UTC)
commit 375a25dd24ce9530d2f8b500974d59cae3ddada6
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 25 22:06:19 2009 +0200
Destroy the toplevel, not the shell in gimp_display_delete()
Also add disabled code that removes the display from an image window
that has more then one display.
app/display/gimpdisplay.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpdisplay.c b/app/display/gimpdisplay.c
index 2640189..00f5fb7 100644
--- a/app/display/gimpdisplay.c
+++ b/app/display/gimpdisplay.c
@@ -437,14 +437,29 @@ gimp_display_delete (GimpDisplay *display)
if (display->shell)
{
- GtkWidget *shell = display->shell;
+ GtkWidget *shell = display->shell;
+ GtkWidget *toplevel = gtk_widget_get_toplevel (shell);
+#if 0
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (toplevel);
+#endif
/* set display->shell to NULL *before* destroying the shell.
* all callbacks in gimpdisplayshell-callbacks.c will check
* this pointer and do nothing if the shell is in destruction.
*/
display->shell = NULL;
- gtk_widget_destroy (shell);
+
+ /* FIXME image window: enable this code for multiple shells */
+#if 0
+ if (gimp_image_window_get_n_displays (window) > 1)
+ {
+ gimp_image_window_remove_display (window, display);
+ }
+ else
+#endif
+ {
+ gtk_widget_destroy (toplevel);
+ }
}
g_object_unref (display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]