Sun Apr 3 00:36:22 2005 John Ellis <johne@verizon.net>
authorJohn Ellis <johne@verizon.net>
Sun, 3 Apr 2005 05:46:47 +0000 (05:46 +0000)
committerJohn Ellis <johne@verizon.net>
Sun, 3 Apr 2005 05:46:47 +0000 (05:46 +0000)
        * 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. #####

ChangeLog
TODO
src/image.c
src/pan-view.c
src/pixbuf-renderer.c

index 48bd8ea..2088fb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/TODO b/TODO
index 38b5f13..9c7f196 100644 (file)
--- 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.
index e2cb6fa..8d445a8 100644 (file)
@@ -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);
index 2f6394d..8a591ce 100644 (file)
@@ -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)
index 6449678..a54466c 100644 (file)
@@ -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