mirror of https://github.com/GNOME/gimp.git
shrink-wrap the newly filled empty display in an idle function.
2008-03-20 Michael Natterer <mitch@gimp.org> * app/display/gimpdisplayshell.[ch]: shrink-wrap the newly filled empty display in an idle function. svn path=/trunk/; revision=25138
This commit is contained in:
parent
0ce7241e45
commit
4aa6416c72
|
@ -1,3 +1,8 @@
|
|||
2008-03-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell.[ch]: shrink-wrap the newly filled
|
||||
empty display in an idle function.
|
||||
|
||||
2008-03-20 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/uri/gimpmountoperation.c: make the dialogs transient to
|
||||
|
|
|
@ -286,6 +286,8 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
|||
shell->icon_size = 32;
|
||||
shell->icon_idle_id = 0;
|
||||
|
||||
shell->fill_idle_id = 0;
|
||||
|
||||
shell->cursor_format = GIMP_CURSOR_FORMAT_BITMAP;
|
||||
shell->current_cursor = (GimpCursorType) -1;
|
||||
shell->tool_cursor = GIMP_TOOL_CURSOR_NONE;
|
||||
|
@ -481,6 +483,12 @@ gimp_display_shell_destroy (GtkObject *object)
|
|||
shell->title_idle_id = 0;
|
||||
}
|
||||
|
||||
if (shell->fill_idle_id)
|
||||
{
|
||||
g_source_remove (shell->fill_idle_id);
|
||||
shell->fill_idle_id = 0;
|
||||
}
|
||||
|
||||
if (shell->nav_popup)
|
||||
{
|
||||
gtk_widget_destroy (shell->nav_popup);
|
||||
|
@ -1094,6 +1102,12 @@ gimp_display_shell_reconnect (GimpDisplayShell *shell)
|
|||
g_return_if_fail (GIMP_IS_DISPLAY (shell->display));
|
||||
g_return_if_fail (GIMP_IS_IMAGE (shell->display->image));
|
||||
|
||||
if (shell->fill_idle_id)
|
||||
{
|
||||
g_source_remove (shell->fill_idle_id);
|
||||
shell->fill_idle_id = 0;
|
||||
}
|
||||
|
||||
gimp_display_shell_connect (shell);
|
||||
|
||||
g_signal_emit (shell, display_shell_signals[RECONNECT], 0);
|
||||
|
@ -1113,6 +1127,12 @@ gimp_display_shell_empty (GimpDisplayShell *shell)
|
|||
g_return_if_fail (GIMP_IS_DISPLAY (shell->display));
|
||||
g_return_if_fail (shell->display->image == NULL);
|
||||
|
||||
if (shell->fill_idle_id)
|
||||
{
|
||||
g_source_remove (shell->fill_idle_id);
|
||||
shell->fill_idle_id = 0;
|
||||
}
|
||||
|
||||
gimp_display_shell_selection_control (shell, GIMP_SELECTION_OFF);
|
||||
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_TO, 1.0);
|
||||
|
@ -1129,6 +1149,16 @@ gimp_display_shell_empty (GimpDisplayShell *shell)
|
|||
gimp_display_shell_expose_full (shell);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_display_shell_fill_idle (GimpDisplayShell *shell)
|
||||
{
|
||||
shell->fill_idle_id = 0;
|
||||
|
||||
gimp_display_shell_scale_shrink_wrap (shell);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_fill (GimpDisplayShell *shell,
|
||||
GimpImage *image,
|
||||
|
@ -1149,6 +1179,10 @@ gimp_display_shell_fill (GimpDisplayShell *shell,
|
|||
gimp_statusbar_fill (GIMP_STATUSBAR (shell->statusbar));
|
||||
|
||||
gimp_display_shell_appearance_update (shell);
|
||||
|
||||
shell->fill_idle_id = g_idle_add_full (G_PRIORITY_LOW,
|
||||
(GSourceFunc) gimp_display_shell_fill_idle,
|
||||
shell, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -135,6 +135,8 @@ struct _GimpDisplayShell
|
|||
gint icon_size; /* size of the icon pixmap */
|
||||
guint icon_idle_id; /* ID of the idle-function */
|
||||
|
||||
guint fill_idle_id; /* display_shell_fill() idle ID */
|
||||
|
||||
GimpCursorFormat cursor_format; /* Currently used cursor format */
|
||||
GimpCursorType current_cursor; /* Currently installed main cursor */
|
||||
GimpToolCursorType tool_cursor; /* Current Tool cursor */
|
||||
|
|
Loading…
Reference in New Issue