gimp r26487 - in trunk: . app/display



Author: martinn
Date: Sun Aug 10 14:26:29 2008
New Revision: 26487
URL: http://svn.gnome.org/viewvc/gimp?rev=26487&view=rev

Log:
2008-08-10  Martin Nordholts  <martinn svn gnome org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap):
	Always center the image after a wrap. I can't think of a case when
	that shouldn't happen.

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): Centering
	occurs implicitly after wrapping now, no need to do it explicitly.

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image): Handle the no-image
	case.


Modified:
   trunk/ChangeLog
   trunk/app/display/gimpdisplayshell-handlers.c
   trunk/app/display/gimpdisplayshell-scroll.c
   trunk/app/display/gimpdisplayshell.c

Modified: trunk/app/display/gimpdisplayshell-handlers.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-handlers.c	(original)
+++ trunk/app/display/gimpdisplayshell-handlers.c	Sun Aug 10 14:26:29 2008
@@ -492,7 +492,6 @@
        * has change size
        */
       gimp_display_shell_shrink_wrap (shell, FALSE);
-      gimp_display_shell_scroll_center_image_on_next_size_allocate (shell);
     }
   else
     {

Modified: trunk/app/display/gimpdisplayshell-scroll.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-scroll.c	(original)
+++ trunk/app/display/gimpdisplayshell-scroll.c	Sun Aug 10 14:26:29 2008
@@ -252,7 +252,8 @@
 
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
-  if (! shell->display)
+  if (! shell->display ||
+      ! shell->display->image)
     return;
 
   target_offset_x = shell->offset_x;

Modified: trunk/app/display/gimpdisplayshell.c
==============================================================================
--- trunk/app/display/gimpdisplayshell.c	(original)
+++ trunk/app/display/gimpdisplayshell.c	Sun Aug 10 14:26:29 2008
@@ -1884,6 +1884,9 @@
         }
 
       gtk_window_resize (GTK_WINDOW (shell), width, height);
+
+      /* A wrap always means that we should center the image too */
+      gimp_display_shell_scroll_center_image_on_next_size_allocate (shell);
     }
 }
 



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