From 47565f7ff3bbb1d56e2a7851c44ae10981c229ac Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Wed, 28 Dec 2005 13:37:40 +0000 Subject: Fix for the bug #325067 with more intelligent selection of current link in * backend/ev-link.c: (ev_link_get_page), (ev_link_init): * shell/ev-page-action.c: (build_new_tree_cb): * shell/ev-sidebar-links.c: (links_page_num_func), (update_page_callback_foreach), (update_page_callback): * shell/ev-view.c: (scroll_to_current_page): Fix for the bug #325067 with more intelligent selection of current link in sidebar. Make sidebar handle links of FITR-like type more correctly. * dvi/pixbuf-device.c: (dvi_pixbuf_draw_rule), (dvi_pixbuf_put_pixel): Fix memory consumtion with disabled alpha channel. --- (limited to 'dvi') diff --git a/dvi/pixbuf-device.c b/dvi/pixbuf-device.c index 1a81c01..1ef4365 100644 --- a/dvi/pixbuf-device.c +++ b/dvi/pixbuf-device.c @@ -70,25 +70,22 @@ static void dvi_pixbuf_draw_rule(DviContext *dvi, int x, int y, Uint w, Uint h, return; rowstride = gdk_pixbuf_get_rowstride (c_device->pixbuf); - p = gdk_pixbuf_get_pixels (c_device->pixbuf) + rowstride * y + 4 * x; + p = gdk_pixbuf_get_pixels (c_device->pixbuf) + rowstride * y + 3 * x; for (i = 0; i < h; i++) { if (i == 0 || i == h - 1 || fill) { for (j = 0; j < w; j++) { - p[j * 4] = red; - p[j * 4 + 1] = green; - p[j * 4 + 2] = blue; - p[j * 4 + 3] = 0xff; + p[j * 3] = red; + p[j * 3 + 1] = green; + p[j * 3 + 2] = blue; } } else { p[0] = red; p[1] = green; p[2] = blue; - p[3] = 0xff; - p[(w - 1) * 4] = red; - p[(w - 1) * 4 + 1] = green; - p[(w - 1) * 4 + 2] = blue; - p[(w - 1) * 4 + 3] = 0xff; + p[(w - 1) * 3] = red; + p[(w - 1) * 3 + 1] = green; + p[(w - 1) * 3 + 2] = blue; } p += rowstride; } @@ -142,12 +139,11 @@ static void dvi_pixbuf_put_pixel(void *image, int x, int y, Ulong color) { guchar *p; - p = gdk_pixbuf_get_pixels (GDK_PIXBUF(image)) + y * gdk_pixbuf_get_rowstride(GDK_PIXBUF(image)) + x * 4; + p = gdk_pixbuf_get_pixels (GDK_PIXBUF(image)) + y * gdk_pixbuf_get_rowstride(GDK_PIXBUF(image)) + x * 3; p[0] = (color >> 16) & 0xff; p[1] = (color >> 8) & 0xff; p[2] = color & 0xff; - p[3] = (color >> 24) & 0xff; } static void dvi_pixbuf_set_color(void *device_data, Ulong fg, Ulong bg) -- cgit v0.9.1