[gimp] app: simpler code in view_close_cmd_callback()



commit 59f67e05039325e9e4ec2e043561ff4450a28fb5
Author: Michael Natterer <mitch gimp org>
Date:   Wed Dec 12 23:25:45 2012 +0100

    app: simpler code in view_close_cmd_callback()

 app/actions/view-commands.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c
index 33fa14a..9918b03 100644
--- a/app/actions/view-commands.c
+++ b/app/actions/view-commands.c
@@ -99,15 +99,13 @@ view_close_cmd_callback (GtkAction *action,
   GimpDisplay      *display;
   GimpDisplayShell *shell;
   GimpImage        *image;
-
   return_if_no_display (display, data);
-  shell  = gimp_display_get_shell(display);
+
+  shell = gimp_display_get_shell (display);
   image = gimp_display_get_image (display);
 
   /* Check for active image so we don't close the last display. */
-  if (! GIMP_IS_IMAGE (image) || ! gimp_image_get_active_drawable (image))
-    return;
-  if (shell)
+  if (shell && image)
     gimp_display_shell_close (shell, FALSE);
 }
 



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