changeset 29:8a8ec4b3e769

Sun Apr 3 00:36:22 2005 John Ellis <johne@verizon.net> * 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. #####
author gqview
date Sun, 03 Apr 2005 05:46:47 +0000
parents ddbf419cb18d
children a310e31fc513
files ChangeLog TODO src/image.c src/pan-view.c src/pixbuf-renderer.c
diffstat 5 files changed, 27 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Apr 02 22:59:31 2005 +0000
+++ b/ChangeLog	Sun Apr 03 05:46:47 2005 +0000
@@ -1,3 +1,14 @@
+Sun Apr  3 00:36:22 2005  John Ellis  <johne@verizon.net>
+
+	* 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  <johne@verizon.net>
 
 	* image.c (image_options_set): Update PixbufRenderer parent window so
--- a/TODO	Sat Apr 02 22:59:31 2005 +0000
+++ b/TODO	Sun Apr 03 05:46:47 2005 +0000
@@ -8,7 +8,7 @@
   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 @@
 
  > 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.
--- a/src/image.c	Sat Apr 02 22:59:31 2005 +0000
+++ b/src/image.c	Sun Apr 03 05:46:47 2005 +0000
@@ -1343,7 +1343,7 @@
 					"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);
--- a/src/pan-view.c	Sat Apr 02 22:59:31 2005 +0000
+++ b/src/pan-view.c	Sun Apr 03 05:46:47 2005 +0000
@@ -4058,6 +4058,8 @@
 	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 @@
 
 	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 @@
 
 	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)
--- a/src/pixbuf-renderer.c	Sat Apr 02 22:59:31 2005 +0000
+++ b/src/pixbuf-renderer.c	Sun Apr 03 05:46:47 2005 +0000
@@ -1766,7 +1766,7 @@
 		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 @@
 		    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 @@
 		pr->x_scroll = 0;
 		pr->y_scroll = 0;
 
-		pr_scroll_notify_signal(pr);
 		return FALSE;
 		}
 
@@ -2396,8 +2395,6 @@
 		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 @@
 	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 @@
 	pr_tile_sync(pr, pr->width, pr->height, FALSE);
 #endif
 
+	pr_scroll_notify_signal(pr);
 	pr_update_signal(pr);
 }
 
@@ -2715,6 +2714,8 @@
 	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 @@
 		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