* image.[ch]: Add utility to sync image settings to user preferences.
* pixbuf-renderer.c: Fix rounding errors.
* preferences.c: Call image_options_sync() when applying changes.
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
##### an offical release when making enhancements and translation updates. #####
+Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
+
+ * image.[ch]: Add utility to sync image settings to user preferences.
+ * pixbuf-renderer.c: Fix rounding errors.
+ * preferences.c: Call image_options_sync() when applying changes.
+
Fri Mar 25 22:39:30 2005 John Ellis <johne@verizon.net>
* image.c: Connect to 'zoom' signal of pixbuf-renderer and notify
> fix broken zoom out drawing when using source tiles.
> image.c:
- > need to keep a list of ImageWindows and provide function to sync options to each object.
+ d> need to keep a list of ImageWindows and provide function to sync options to each object.
d> test and probably fix delay_flip.
> UPDATE: works as before (pre pixbuf-renderer), but should be fixed to provide a single redraw
by pre-rendering any scaled tiles that are visible before signaling 'render_complete'.
> make this a g_object with signals for completed, changed, etc.
- > fix region computation rounding when updating scaled image in 'area ready' signal.
+ d> fix region computation rounding when updating scaled image in 'area ready' signal.
> work on pan view:
-------------
- > update translations: ( ) ( ) ( )
+ > update translations: it( ) ( ) ( )
> document recent additions/changes:
> Added 'Fast jpeg thumbnailing'.
#define IMAGE_AUTO_REFRESH_TIME 3000
+static GList *image_list = NULL;
+
+
/*
*-------------------------------------------------------------------
* 'signals'
gdk_flush();
}
+/*
+ *-------------------------------------------------------------------
+ * prefs sync
+ *-------------------------------------------------------------------
+ */
+
+static void image_options_set(ImageWindow *imd)
+{
+ g_object_set(G_OBJECT(imd->pr), "zoom_quality", zoom_quality,
+ "zoom_2pass", two_pass_zoom,
+ "zoom_expand", zoom_to_fit_expands,
+ "dither_quality", dither_quality,
+ "scroll_reset", scroll_reset_method,
+ "cache_display", tile_cache_max,
+ "window_fit", fit_window,
+ "window_limit", limit_window_size,
+ "window_limit_value", max_window_size,
+ NULL);
+}
+
+void image_options_sync(void)
+{
+ GList *work;
+
+ work = image_list;
+ while (work)
+ {
+ ImageWindow *imd;
+
+ imd = work->data;
+ work = work->next;
+
+ image_options_set(imd);
+ }
+}
+
/*
*-------------------------------------------------------------------
* init / destroy
static void image_free(ImageWindow *imd)
{
+ image_list = g_list_remove(image_list, imd);
+
image_reset(imd);
image_read_ahead_cancel(imd);
imd->pr = GTK_WIDGET(pixbuf_renderer_new());
- g_object_set(G_OBJECT(imd->pr), "zoom_2pass", TRUE, NULL);
+ image_options_set(imd);
if (imd->has_frame)
{
g_signal_connect(G_OBJECT(imd->pr), "render_complete",
G_CALLBACK(image_render_complete_cb), imd);
+ image_list = g_list_append(image_list, imd);
+
return imd;
}
gpointer data,
gdouble zoom);
+/* reset default options */
+void image_options_sync(void);
+
#endif
void pixbuf_renderer_area_changed(PixbufRenderer *pr, gint x, gint y, gint width, gint height)
{
- gint sx, sy, sw, sh;
+ gint x1, y1, x2, y2;
g_return_if_fail(IS_PIXBUF_RENDERER(pr));
height += 2;
}
- sx = (gint)floor((double)x * pr->scale);
- sy = (gint)floor((double)y * pr->scale);
- sw = (gint)ceil((double)width * pr->scale);
- sh = (gint)ceil((double)height * pr->scale);
+ x1 = (gint)floor((double)x * pr->scale);
+ y1 = (gint)floor((double)y * pr->scale);
+ x2 = (gint)ceil((double)(x + width) * pr->scale);
+ y2 = (gint)ceil((double)(y + height) * pr->scale);
- pr_queue(pr, sx, sy, sw, sh, FALSE, TILE_RENDER_AREA, TRUE);
+ pr_queue(pr, x1, y1, x2 - x1, y2 - y1, FALSE, TILE_RENDER_AREA, TRUE);
}
void pixbuf_renderer_zoom_adjust(PixbufRenderer *pr, gdouble increment)
#include "editors.h"
#include "filelist.h"
#include "fullscreen.h"
+#include "image.h"
#include "img-view.h"
#include "layout_config.h"
#include "layout_util.h"
g_free(l_conf);
+ image_options_sync();
+
if (refresh)
{
filter_rebuild();