gimp r28229 - in trunk: . app/display
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28229 - in trunk: . app/display
- Date: Sat, 28 Mar 2009 21:13:20 +0000 (UTC)
Author: mitch
Date: Sat Mar 28 21:13:20 2009
New Revision: 28229
URL: http://svn.gnome.org/viewvc/gimp?rev=28229&view=rev
Log:
2009-03-28 Michael Natterer <mitch gimp org>
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): swallow the
code of gimp_display_shell_image_size_starts_to_fit() because it
didn't make things clearer. Add local variables instead to make
things more readable.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell-handlers.c
Modified: trunk/app/display/gimpdisplayshell-handlers.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-handlers.c (original)
+++ trunk/app/display/gimpdisplayshell-handlers.c Sat Mar 28 21:13:20 2009
@@ -487,21 +487,6 @@
}
static void
-gimp_display_shell_image_size_starts_to_fit (GimpDisplayShell *shell,
- gint previous_width,
- gint previous_height,
- gint new_width,
- gint new_height,
- gboolean *horizontally,
- gboolean *vertically)
-{
- *horizontally = SCALEX (shell, previous_width) > shell->disp_width &&
- SCALEX (shell, new_width) <= shell->disp_width;
- *vertically = SCALEY (shell, previous_height) > shell->disp_height &&
- SCALEY (shell, new_height) <= shell->disp_height;
-}
-
-static void
gimp_display_shell_size_changed_detailed_handler (GimpImage *image,
gint previous_origin_x,
gint previous_origin_y,
@@ -518,20 +503,18 @@
}
else
{
- GimpImage *image;
- gboolean horizontally, vertically;
+ GimpImage *image = GIMP_IMAGE (shell->display->image);
+ gint new_width = gimp_image_get_width (image);
+ gint new_height = gimp_image_get_height (image);
gint scaled_previous_origin_x = SCALEX (shell, previous_origin_x);
gint scaled_previous_origin_y = SCALEY (shell, previous_origin_y);
+ gboolean horizontally;
+ gboolean vertically;
- image = GIMP_IMAGE (shell->display->image);
-
- gimp_display_shell_image_size_starts_to_fit (shell,
- previous_width,
- previous_height,
- gimp_image_get_width (image),
- gimp_image_get_height (image),
- &horizontally,
- &vertically);
+ horizontally = (SCALEX (shell, previous_width) > shell->disp_width &&
+ SCALEX (shell, new_width) <= shell->disp_width);
+ vertically = (SCALEY (shell, previous_height) > shell->disp_height &&
+ SCALEY (shell, new_height) <= shell->disp_height);
gimp_display_shell_scroll_set_offset (shell,
shell->offset_x + scaled_previous_origin_x,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]