mirror of https://github.com/GNOME/gimp.git
don't emit the "scaled" signal from gimp_display_shell_scale_setup(). Emit
2003-03-21 Sven Neumann <sven@gimp.org> * app/display/gimpdisplayshell-scale.c: don't emit the "scaled" signal from gimp_display_shell_scale_setup(). Emit it explicitely from gimp_display_shell_scale_resize() instead. * app/display/gimpdisplayshell-scroll.c: call gimp_display_shell_scale_setup() after scrolling in order to update scrollbars and rulers. * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-handlers.c: emit the "scaled" signal explicitely. * app/display/gimpdisplayshell-render.c: minor optimizations. * app/display/gimpdisplayshell.c: minor cleanup.
This commit is contained in:
parent
87cfd54e29
commit
6fb7877ebd
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2003-03-21 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-scale.c: don't emit the "scaled"
|
||||||
|
signal from gimp_display_shell_scale_setup(). Emit it explicitely
|
||||||
|
from gimp_display_shell_scale_resize() instead.
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-scroll.c: call
|
||||||
|
gimp_display_shell_scale_setup() after scrolling in order to
|
||||||
|
update scrollbars and rulers.
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-callbacks.c
|
||||||
|
* app/display/gimpdisplayshell-handlers.c: emit the "scaled" signal
|
||||||
|
explicitely.
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-render.c: minor optimizations.
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell.c: minor cleanup.
|
||||||
|
|
||||||
2003-03-21 Michael Natterer <mitch@gimp.org>
|
2003-03-21 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimpcellrendererviewable.c
|
* app/widgets/gimpcellrendererviewable.c
|
||||||
|
|
|
@ -308,6 +308,7 @@ gimp_display_shell_canvas_configure (GtkWidget *widget,
|
||||||
|
|
||||||
gimp_display_shell_scroll_clamp_offsets (shell);
|
gimp_display_shell_scroll_clamp_offsets (shell);
|
||||||
gimp_display_shell_scale_setup (shell);
|
gimp_display_shell_scale_setup (shell);
|
||||||
|
gimp_display_shell_scaled (shell);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -1363,11 +1363,11 @@ gimp_display_shell_draw_area (GimpDisplayShell *shell,
|
||||||
gint w,
|
gint w,
|
||||||
gint h)
|
gint h)
|
||||||
{
|
{
|
||||||
gint sx, sy;
|
gint sx, sy;
|
||||||
gint x1, y1;
|
gint x1, y1;
|
||||||
gint x2, y2;
|
gint x2, y2;
|
||||||
gint dx, dy;
|
gint dx, dy;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
|
@ -1449,7 +1449,7 @@ gimp_display_shell_draw_area (GimpDisplayShell *shell,
|
||||||
i - shell->disp_yoffset,
|
i - shell->disp_yoffset,
|
||||||
dx, dy);
|
dx, dy);
|
||||||
|
|
||||||
#if 0
|
#ifdef STRESS_TEST
|
||||||
/* Invalidate the projection just after we render it! */
|
/* Invalidate the projection just after we render it! */
|
||||||
gimp_image_invalidate_without_render (shell->gdisp->gimage,
|
gimp_image_invalidate_without_render (shell->gdisp->gimage,
|
||||||
j - shell->disp_xoffset,
|
j - shell->disp_xoffset,
|
||||||
|
|
|
@ -307,7 +307,10 @@ gimp_display_shell_resolution_changed_handler (GimpImage *gimage,
|
||||||
GimpDisplayShell *shell)
|
GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
if (! shell->dot_for_dot)
|
if (! shell->dot_for_dot)
|
||||||
gimp_display_shell_scale_setup (shell);
|
{
|
||||||
|
gimp_display_shell_scale_setup (shell);
|
||||||
|
gimp_display_shell_scaled (shell);
|
||||||
|
}
|
||||||
|
|
||||||
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
||||||
}
|
}
|
||||||
|
@ -317,7 +320,10 @@ gimp_display_shell_unit_changed_handler (GimpImage *gimage,
|
||||||
GimpDisplayShell *shell)
|
GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
if (! shell->dot_for_dot)
|
if (! shell->dot_for_dot)
|
||||||
gimp_display_shell_scale_setup (shell);
|
{
|
||||||
|
gimp_display_shell_scale_setup (shell);
|
||||||
|
gimp_display_shell_scaled (shell);
|
||||||
|
}
|
||||||
|
|
||||||
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
||||||
}
|
}
|
||||||
|
@ -420,6 +426,7 @@ gimp_display_shell_monitor_res_notify_handler (GObject *config,
|
||||||
if (! shell->dot_for_dot)
|
if (! shell->dot_for_dot)
|
||||||
{
|
{
|
||||||
gimp_display_shell_scale_setup (shell);
|
gimp_display_shell_scale_setup (shell);
|
||||||
|
gimp_display_shell_scaled (shell);
|
||||||
|
|
||||||
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
||||||
|
|
||||||
|
|
|
@ -857,8 +857,8 @@ render_image_init_info (RenderInfo *info,
|
||||||
info->h = h;
|
info->h = h;
|
||||||
info->scalex = SCALEFACTOR_X (shell);
|
info->scalex = SCALEFACTOR_X (shell);
|
||||||
info->scaley = SCALEFACTOR_Y (shell);
|
info->scaley = SCALEFACTOR_Y (shell);
|
||||||
info->src_x = UNSCALEX (shell, info->x);
|
info->src_x = (gfloat) info->x / info->scalex;
|
||||||
info->src_y = UNSCALEY (shell, info->y);
|
info->src_y = (gfloat) info->y / info->scaley;
|
||||||
info->src_bpp = gimp_image_projection_bytes (shell->gdisp->gimage);
|
info->src_bpp = gimp_image_projection_bytes (shell->gdisp->gimage);
|
||||||
info->dest = shell->render_buf;
|
info->dest = shell->render_buf;
|
||||||
info->dest_bpp = 3;
|
info->dest_bpp = 3;
|
||||||
|
@ -876,7 +876,7 @@ render_image_init_info (RenderInfo *info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint*
|
static guint *
|
||||||
render_image_init_alpha (gint mult)
|
render_image_init_alpha (gint mult)
|
||||||
{
|
{
|
||||||
static guint *alpha_mult = NULL;
|
static guint *alpha_mult = NULL;
|
||||||
|
@ -934,14 +934,10 @@ render_image_tile_fault (RenderInfo *info)
|
||||||
guchar *scale;
|
guchar *scale;
|
||||||
gint width;
|
gint width;
|
||||||
gint tilex;
|
gint tilex;
|
||||||
gint tiley;
|
|
||||||
gint step;
|
gint step;
|
||||||
gint bpp = info->src_bpp;
|
gint bpp = info->src_bpp;
|
||||||
gint x, b;
|
gint x, b;
|
||||||
|
|
||||||
tilex = info->src_x / TILE_WIDTH;
|
|
||||||
tiley = info->src_y / TILE_HEIGHT;
|
|
||||||
|
|
||||||
tile = tile_manager_get_tile (info->src_tiles,
|
tile = tile_manager_get_tile (info->src_tiles,
|
||||||
info->src_x, info->src_y,
|
info->src_x, info->src_y,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
|
@ -957,6 +953,8 @@ render_image_tile_fault (RenderInfo *info)
|
||||||
x = info->src_x;
|
x = info->src_x;
|
||||||
width = info->w;
|
width = info->w;
|
||||||
|
|
||||||
|
tilex = info->src_x / TILE_WIDTH;
|
||||||
|
|
||||||
while (width--)
|
while (width--)
|
||||||
{
|
{
|
||||||
for (b = 0; b < bpp; b++)
|
for (b = 0; b < bpp; b++)
|
||||||
|
|
|
@ -150,8 +150,6 @@ gimp_display_shell_scale_setup (GimpDisplayShell *shell)
|
||||||
gtk_widget_queue_draw (GTK_WIDGET (hruler));
|
gtk_widget_queue_draw (GTK_WIDGET (hruler));
|
||||||
gtk_widget_queue_draw (GTK_WIDGET (vruler));
|
gtk_widget_queue_draw (GTK_WIDGET (vruler));
|
||||||
|
|
||||||
gimp_display_shell_scaled (shell);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
g_print ("offset_x: %d\n"
|
g_print ("offset_x: %d\n"
|
||||||
"offset_y: %d\n"
|
"offset_y: %d\n"
|
||||||
|
@ -419,6 +417,7 @@ gimp_display_shell_scale_resize (GimpDisplayShell *shell,
|
||||||
|
|
||||||
gimp_display_shell_scroll_clamp_offsets (shell);
|
gimp_display_shell_scroll_clamp_offsets (shell);
|
||||||
gimp_display_shell_scale_setup (shell);
|
gimp_display_shell_scale_setup (shell);
|
||||||
|
gimp_display_shell_scaled (shell);
|
||||||
|
|
||||||
if (resize_window || redisplay)
|
if (resize_window || redisplay)
|
||||||
gimp_display_shell_expose_full (shell);
|
gimp_display_shell_expose_full (shell);
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "gimpdisplay.h"
|
#include "gimpdisplay.h"
|
||||||
#include "gimpdisplay-foreach.h"
|
#include "gimpdisplay-foreach.h"
|
||||||
#include "gimpdisplayshell.h"
|
#include "gimpdisplayshell.h"
|
||||||
|
#include "gimpdisplayshell-scale.h"
|
||||||
#include "gimpdisplayshell-scroll.h"
|
#include "gimpdisplayshell-scroll.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,25 +68,21 @@ gimp_display_shell_scroll (GimpDisplayShell *shell,
|
||||||
tool_manager_control_active (shell->gdisp->gimage->gimp, PAUSE,
|
tool_manager_control_active (shell->gdisp->gimage->gimp, PAUSE,
|
||||||
shell->gdisp);
|
shell->gdisp);
|
||||||
|
|
||||||
gdk_window_scroll (shell->canvas->window, -x_offset, -y_offset);
|
|
||||||
|
|
||||||
/* set the offsets back to the new values */
|
/* set the offsets back to the new values */
|
||||||
shell->offset_x += x_offset;
|
shell->offset_x += x_offset;
|
||||||
shell->offset_y += y_offset;
|
shell->offset_y += y_offset;
|
||||||
|
|
||||||
|
gdk_window_scroll (shell->canvas->window, -x_offset, -y_offset);
|
||||||
|
|
||||||
/* Make sure expose events are processed before scrolling again */
|
/* Make sure expose events are processed before scrolling again */
|
||||||
gdk_window_process_updates (shell->canvas->window, FALSE);
|
gdk_window_process_updates (shell->canvas->window, FALSE);
|
||||||
|
|
||||||
|
/* Update scrollbars and rulers */
|
||||||
|
gimp_display_shell_scale_setup (shell);
|
||||||
|
|
||||||
tool_manager_control_active (shell->gdisp->gimage->gimp, RESUME,
|
tool_manager_control_active (shell->gdisp->gimage->gimp, RESUME,
|
||||||
shell->gdisp);
|
shell->gdisp);
|
||||||
|
|
||||||
/* Update the scrollbars */
|
|
||||||
shell->hsbdata->value = shell->offset_x;
|
|
||||||
shell->vsbdata->value = shell->offset_y;
|
|
||||||
|
|
||||||
gtk_adjustment_changed (shell->hsbdata);
|
|
||||||
gtk_adjustment_changed (shell->vsbdata);
|
|
||||||
|
|
||||||
gimp_display_shell_scrolled (shell);
|
gimp_display_shell_scrolled (shell);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -1363,11 +1363,11 @@ gimp_display_shell_draw_area (GimpDisplayShell *shell,
|
||||||
gint w,
|
gint w,
|
||||||
gint h)
|
gint h)
|
||||||
{
|
{
|
||||||
gint sx, sy;
|
gint sx, sy;
|
||||||
gint x1, y1;
|
gint x1, y1;
|
||||||
gint x2, y2;
|
gint x2, y2;
|
||||||
gint dx, dy;
|
gint dx, dy;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
|
@ -1449,7 +1449,7 @@ gimp_display_shell_draw_area (GimpDisplayShell *shell,
|
||||||
i - shell->disp_yoffset,
|
i - shell->disp_yoffset,
|
||||||
dx, dy);
|
dx, dy);
|
||||||
|
|
||||||
#if 0
|
#ifdef STRESS_TEST
|
||||||
/* Invalidate the projection just after we render it! */
|
/* Invalidate the projection just after we render it! */
|
||||||
gimp_image_invalidate_without_render (shell->gdisp->gimage,
|
gimp_image_invalidate_without_render (shell->gdisp->gimage,
|
||||||
j - shell->disp_xoffset,
|
j - shell->disp_xoffset,
|
||||||
|
|
Loading…
Reference in New Issue