From: John Ellis Date: Sun, 3 Apr 2005 05:46:47 +0000 (+0000) Subject: Sun Apr 3 00:36:22 2005 John Ellis X-Git-Tag: v1.0.0~1774 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=b46ad56f91d139288728284fa35506c7dd2fac9b Sun Apr 3 00:36:22 2005 John Ellis * image.c (image_options_set): Only enable PixbufRenderer 'window_fit' when both the ImageWindow and global setting are both enabled. * pan-view.c (pan_window_image_scroll_notify_cb): Add call to gtk_adjustment_value_changed to fix performance hit when scrolling. * pixbuf-renderer.c: Set tile render_todo flags to RENDER_ALL when invalidating so that there is no chance it will be used with old data. Only emit 'scroll-notify' signal when the value or range changes. Fix copy of zoom value in pixbuf_renderer_move. ##### Note: GQview CVS on sourceforge is not always up to date, please use ##### ##### an offical release when making enhancements and translation updates. ##### --- diff --git a/ChangeLog b/ChangeLog index 48bd8ea3..2088fb3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Sun Apr 3 00:36:22 2005 John Ellis + + * image.c (image_options_set): Only enable PixbufRenderer 'window_fit' + when both the ImageWindow and global setting are both enabled. + * pan-view.c (pan_window_image_scroll_notify_cb): Add call to + gtk_adjustment_value_changed to fix performance hit when scrolling. + * pixbuf-renderer.c: Set tile render_todo flags to RENDER_ALL when + invalidating so that there is no chance it will be used with old data. + Only emit 'scroll-notify' signal when the value or range changes. + Fix copy of zoom value in pixbuf_renderer_move. + Sat Apr 2 17:28:16 2005 John Ellis * image.c (image_options_set): Update PixbufRenderer parent window so diff --git a/TODO b/TODO index 38b5f132..9c7f1967 100644 --- a/TODO +++ b/TODO @@ -8,7 +8,7 @@ Major: d> fix two pass render from corrupting it->qd pointer (need one pointer for each queue?). d> fix image_change_from_image (to do this need a pixbuf_renderer_move_image). d> fix broken zoom out drawing when using source tiles. - > fix 2pass zoom when using source tiles and zoomed out (not always rendering second pass) + d> fix 2pass zoom when using source tiles and zoomed out (not always rendering second pass) > image.c: d> need to keep a list of ImageWindows and provide function to sync options to each object. @@ -23,9 +23,9 @@ Major: > work on pan view: > Pick a better keyboard shortcut than Control + J :) - > Fix occasional redraw bugs when zoomed out. - > Fix occasional odd requests for non-visible tiles when zoomed out (related to above?). - > Fix slowness in image.c with huge grid size by changing use of pre-allocated tile array + d> Fix occasional redraw bugs when zoomed out. + d> Fix occasional odd requests for non-visible tiles when zoomed out (related to above?). + d> Fix slowness in image.c with huge grid size by changing use of pre-allocated tile array to on-demand tile allocation (can this be implemented like source tiles?). OR: use an array so that we do not need to walk a GList of pre-allocated tile containers w> Fix search scrolling to try to center image and info popup. diff --git a/src/image.c b/src/image.c index e2cb6fa7..8d445a8f 100644 --- a/src/image.c +++ b/src/image.c @@ -1343,7 +1343,7 @@ static void image_options_set(ImageWindow *imd) "dither_quality", dither_quality, "scroll_reset", scroll_reset_method, "cache_display", tile_cache_max, - "window_fit", fit_window, + "window_fit", (imd->top_window_sync && fit_window), "window_limit", limit_window_size, "window_limit_value", max_window_size, NULL); diff --git a/src/pan-view.c b/src/pan-view.c index 2f6394dc..8a591ced 100644 --- a/src/pan-view.c +++ b/src/pan-view.c @@ -4058,6 +4058,8 @@ static void pan_window_image_scroll_notify_cb(PixbufRenderer *pr, gpointer data) GdkRectangle rect; gint width, height; + if (pr->scale == 0.0) return; + pixbuf_renderer_get_visible_rect(pr, &rect); pixbuf_renderer_get_image_size(pr, &width, &height); @@ -4071,6 +4073,7 @@ static void pan_window_image_scroll_notify_cb(PixbufRenderer *pr, gpointer data) pref_signal_block_data(pw->scrollbar_h, pw); gtk_adjustment_changed(adj); + gtk_adjustment_value_changed(adj); pref_signal_unblock_data(pw->scrollbar_h, pw); adj = gtk_range_get_adjustment(GTK_RANGE(pw->scrollbar_v)); @@ -4083,9 +4086,8 @@ static void pan_window_image_scroll_notify_cb(PixbufRenderer *pr, gpointer data) pref_signal_block_data(pw->scrollbar_v, pw); gtk_adjustment_changed(adj); + gtk_adjustment_value_changed(adj); pref_signal_unblock_data(pw->scrollbar_v, pw); - -// printf("scrolled to %d,%d @ %d x %d\n", x, y, width, height); } static void pan_window_scrollbar_h_value_cb(GtkRange *range, gpointer data) diff --git a/src/pixbuf-renderer.c b/src/pixbuf-renderer.c index 6449678e..a54466c7 100644 --- a/src/pixbuf-renderer.c +++ b/src/pixbuf-renderer.c @@ -1766,7 +1766,7 @@ static void pr_tile_invalidate_all(PixbufRenderer *pr) work = work->next; it->render_done = TILE_RENDER_NONE; - it->render_todo = TILE_RENDER_NONE; + it->render_todo = TILE_RENDER_ALL; it->blank = FALSE; it->w = MIN(pr->tile_width, pr->width - it->x); @@ -1798,7 +1798,7 @@ static void pr_tile_invalidate_region(PixbufRenderer *pr, gint x, gint y, gint w it->y < y2 && it->y + it->h > y1) { it->render_done = TILE_RENDER_NONE; - it->render_todo = TILE_RENDER_NONE; + it->render_todo = TILE_RENDER_ALL; } } } @@ -2371,7 +2371,6 @@ static gint pr_scroll_clamp(PixbufRenderer *pr) pr->x_scroll = 0; pr->y_scroll = 0; - pr_scroll_notify_signal(pr); return FALSE; } @@ -2396,8 +2395,6 @@ static gint pr_scroll_clamp(PixbufRenderer *pr) pr->y_scroll = CLAMP(pr->y_scroll, 0, pr->height - pr->vis_height); } - pr_scroll_notify_signal(pr); - return (old_xs != pr->x_scroll || old_ys != pr->y_scroll); } @@ -2609,6 +2606,7 @@ static void pr_zoom_sync(PixbufRenderer *pr, gdouble zoom, if (sized || clamped) pr_border_clear(pr); pr_redraw(pr, redrawn); + pr_scroll_notify_signal(pr); pr_zoom_signal(pr); pr_update_signal(pr); } @@ -2665,6 +2663,7 @@ static void pr_size_sync(PixbufRenderer *pr, gint new_width, gint new_height) pr_tile_sync(pr, pr->width, pr->height, FALSE); #endif + pr_scroll_notify_signal(pr); pr_update_signal(pr); } @@ -2715,6 +2714,8 @@ void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y) pr_scroll_clamp(pr); if (pr->x_scroll == old_x && pr->y_scroll == old_y) return; + pr_scroll_notify_signal(pr); + if (pr->overlay_list) { gint new_x, new_y; @@ -3097,7 +3098,7 @@ void pixbuf_renderer_move(PixbufRenderer *pr, PixbufRenderer *source) pr->source_tiles = source->source_tiles; source->source_tiles = NULL; - pr_zoom_sync(pr, pr->zoom, TRUE, FALSE, TRUE, FALSE, 0, 0); + pr_zoom_sync(pr, source->zoom, TRUE, FALSE, TRUE, FALSE, 0, 0); pr_redraw(pr, TRUE); } else