Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/dvi
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-08-25 20:10:01 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-08-25 20:10:01 (GMT)
commit7399cf0e5de076aae5cc2b3545f07c2af4bab5be (patch)
treec86e612ec18c65bcef904ac7b7ca1ccd3d1e6337 /dvi
parent70406cb1287e812e39ef0af769b9fcc6cc727503 (diff)
Fix rotation of thumbnails, ported to new API. Moved library dependencies
* djvu/djvu-document.c: (djvu_document_thumbnails_get_thumbnail): * dvi/Makefile.am: * dvi/dvi-document.c: (dvi_document_thumbnails_get_thumbnail): * dvi/mdvi-lib/Makefile.am: Fix rotation of thumbnails, ported to new API. Moved library dependencies earlier, probably it will fix linkage problem.
Diffstat (limited to 'dvi')
-rw-r--r--dvi/Makefile.am6
-rw-r--r--dvi/dvi-document.c16
-rw-r--r--dvi/mdvi-lib/Makefile.am5
3 files changed, 12 insertions, 15 deletions
diff --git a/dvi/Makefile.am b/dvi/Makefile.am
index efa83da..f9de1e4 100644
--- a/dvi/Makefile.am
+++ b/dvi/Makefile.am
@@ -17,12 +17,8 @@ libgtkdvi_la_SOURCES = \
fonts.c \
fonts.h
-libgtkdvi_la_LIBADD = mdvi-lib/libmdvi.la \
- $(DVI_LIBS) -lkpathsea
+libgtkdvi_la_LIBADD = mdvi-lib/libmdvi.la
-if WITH_TYPE1_FONTS
-libgtkdvi_la_LIBADD += -lt1lib
-endif
diff --git a/dvi/dvi-document.c b/dvi/dvi-document.c
index 1bb465c..d462758 100644
--- a/dvi/dvi-document.c
+++ b/dvi/dvi-document.c
@@ -310,19 +310,15 @@ dvi_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document,
pixbuf = mdvi_pixbuf_device_get_pixbuf (&dvi_document->context->device);
g_mutex_unlock (dvi_context_mutex);
-
- if (border) {
- border_pixbuf = ev_document_misc_get_thumbnail_frame (thumb_width, thumb_height, NULL);
- gdk_pixbuf_copy_area (pixbuf, 0, 0,
- thumb_width - 2, thumb_height - 2,
- border_pixbuf, 2, 2);
- g_object_unref (pixbuf);
- pixbuf = border_pixbuf;
- }
-
rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, 360 - rotation);
g_object_unref (pixbuf);
+
+ if (border) {
+ GdkPixbuf *tmp_pixbuf = rotated_pixbuf;
+ rotated_pixbuf = ev_document_misc_get_thumbnail_frame (-1, -1, 0, tmp_pixbuf);
+ g_object_unref (tmp_pixbuf);
+ }
return rotated_pixbuf;
}
diff --git a/dvi/mdvi-lib/Makefile.am b/dvi/mdvi-lib/Makefile.am
index aa9ef94..4eec509 100644
--- a/dvi/mdvi-lib/Makefile.am
+++ b/dvi/mdvi-lib/Makefile.am
@@ -38,4 +38,9 @@ libmdvi_la_SOURCES = \
util.c \
vf.c
+libmdvi_la_LIBADD = \
+ -lkpathsea
+if WITH_TYPE1_FONTS
+libmdvi_la_LIBADD += -lt1lib
+endif