gimp r24611 - in branches/weskaggs: . app/display app/gui



Author: weskaggs
Date: Tue Jan 15 03:34:56 2008
New Revision: 24611
URL: http://svn.gnome.org/viewvc/gimp?rev=24611&view=rev

Log:
Bill Skaggs  <weskaggs primate ucdavis edu>

	* app/display/gimpdisplayshell.[ch] 
	(gimp_display_shell_shrink_wrap_strict): New function to ensure
	correct shrink wrapping of an undecorated scratch image.

	* app/gui/gui-table.c (gui_scratch_display_create):
	Use the new function.


Modified:
   branches/weskaggs/ChangeLog
   branches/weskaggs/app/display/gimpdisplayshell.c
   branches/weskaggs/app/display/gimpdisplayshell.h
   branches/weskaggs/app/gui/gui-vtable.c

Modified: branches/weskaggs/app/display/gimpdisplayshell.c
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell.c	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell.c	Tue Jan 15 03:34:56 2008
@@ -1645,6 +1645,22 @@
     }
 }
 
+void
+gimp_display_shell_shrink_wrap_strict (GimpDisplayShell *shell)
+{
+  gint          width, height;
+
+  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+
+  if (! GTK_WIDGET_REALIZED (shell))
+    return;
+
+  width  = SCALEX (shell, gimp_image_get_width  (shell->display->image));
+  height = SCALEY (shell, gimp_image_get_height (shell->display->image));
+
+  gtk_window_resize (GTK_WINDOW (shell), width, height);
+}
+
 /**
  * gimp_display_shell_set_highlight:
  * @shell:     a #GimpDisplayShell

Modified: branches/weskaggs/app/display/gimpdisplayshell.h
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell.h	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell.h	Tue Jan 15 03:34:56 2008
@@ -178,13 +178,16 @@
   gint              scroll_start_x;
   gint              scroll_start_y;
   gboolean          button_press_before_focus;
-  guint32           last_motion_time;
+  guint32           last_disp_motion_time; /*  previous time of a forwarded motion event  */
+  guint32           last_read_motion_time;
 
   GdkRectangle     *highlight;         /* in image coordinates, can be NULL   */
   GimpDrawable     *mask;
   GimpChannelType   mask_color;
 
   gpointer          scroll_info;
+
+  GimpCoords        last_coords;       /* last motion event */
 };
 
 struct _GimpDisplayShellClass
@@ -250,6 +253,7 @@
 void        gimp_display_shell_update_icon         (GimpDisplayShell   *shell);
 
 void        gimp_display_shell_shrink_wrap         (GimpDisplayShell   *shell);
+void        gimp_display_shell_shrink_wrap_strict  (GimpDisplayShell   *shell);
 
 void        gimp_display_shell_set_highlight       (GimpDisplayShell   *shell,
                                                     const GdkRectangle *highlight);

Modified: branches/weskaggs/app/gui/gui-vtable.c
==============================================================================
--- branches/weskaggs/app/gui/gui-vtable.c	(original)
+++ branches/weskaggs/app/gui/gui-vtable.c	Tue Jan 15 03:34:56 2008
@@ -326,7 +326,7 @@
   gimp_display_shell_set_show_scrollbars (shell, FALSE);
   gimp_display_shell_set_show_statusbar  (shell, FALSE);
 
-  gimp_display_shell_shrink_wrap (shell);
+  gimp_display_shell_shrink_wrap_strict (shell);
 
   gimp_ui_manager_update (shell->menubar_manager, display);
 



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