Enable some #if 0'ed code and use the just added API

gimp_display_delete(): remove shells from image windows with more than
one shell instead of destroying the window.
This commit is contained in:
Michael Natterer 2009-09-29 23:01:33 +02:00
parent d1dc70fbdf
commit ee2fdbcf8f
1 changed files with 11 additions and 7 deletions

View File

@ -459,16 +459,20 @@ gimp_display_delete (GimpDisplay *display)
*/
display->shell = NULL;
/* FIXME image window: enable this code for multiple shells */
#if 0
if (window && gimp_image_window_get_n_displays (window) > 1)
if (window)
{
gimp_image_window_remove_display (window, display);
if (gimp_image_window_get_n_shells (window) > 1)
{
gimp_image_window_remove_shell (window, shell);
}
else
{
gtk_widget_destroy (GTK_WIDGET (window));
}
}
else if (window)
#endif
else
{
gtk_widget_destroy (GTK_WIDGET (window));
g_object_unref (shell);
}
}