[gimp/soc-2011-seamless-clone2] app: simpler code in view_close_cmd_callback()
- From: Clayton Walker <claytonw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-seamless-clone2] app: simpler code in view_close_cmd_callback()
- Date: Wed, 8 May 2013 14:51:51 +0000 (UTC)
commit e83b15058fce48c400b0e6e3d749ef2dab11be55
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]