2004-09-20 [colin] 0.9.12cvs102.2
authorColin Leroy <colin@colino.net>
Mon, 20 Sep 2004 14:33:19 +0000 (14:33 +0000)
committerColin Leroy <colin@colino.net>
Mon, 20 Sep 2004 14:33:19 +0000 (14:33 +0000)
* src/plugins/image_viewer/viewer.c
Remove imlib stuff
use gtk_pixmap_set when clearing
(would be better to use gtkImages, but causes size-allocate
signals storm)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/plugins/image_viewer/viewer.c

index e3ab09b8d47f382fab995736515e5efe27a8a11e..a29d17e7e98b03bed36250483a50afae8ff67cd1 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-20 [colin]     0.9.12cvs102.2
+
+       * src/plugins/image_viewer/viewer.c
+               Remove imlib stuff
+               use gtk_pixmap_set when clearing
+               (would be better to use gtkImages, but causes size-allocate 
+               signals storm)
+
 2004-09-17 [paul]      0.9.12cvs102.1
 
        * ChangeLog
index f33610eede11a22309d6a59c03a527088835cef0..1c8559a84d25b74bd94b988afdac9d268b985a7e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.13.2.8 -r 1.13.2.9 src/common/socket.c; cvs diff -u -r 1.100.2.4 -r 1.100.2.5 AUTHORS; ) > 0.9.12cvs99.5.patchset
 ( cvs diff -u -r 1.2504.2.20 -r 1.2504.2.21 ChangeLog.claws; cvs diff -u -r 1.115.2.17 -r 1.115.2.18 src/main.c; ) > 0.9.12cvs101.1.patchset
 ( cvs diff -u -r 1.396.2.9 -r 1.396.2.10 ChangeLog; cvs diff -u -r 1.2504.2.21 -r 1.2504.2.22 ChangeLog.claws; cvs diff -u -r 1.391.2.9 -r 1.391.2.10 ChangeLog.jp; cvs diff -u -r 1.654.2.204 -r 1.654.2.205 configure.ac; cvs diff -u -r 1.149.2.14 -r 1.149.2.15 src/inc.c; ) > 0.9.12cvs102.1.patchset
+( cvs diff -u -r 1.7.2.7 -r 1.7.2.8 src/plugins/image_viewer/viewer.c; ) > 0.9.12cvs102.2.patchset
index 3de074bd9bd5edd817c547c2426708c903a34df6..abce0bf5ebdf2cc61e91db52a34bb11613dc835b 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=102
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index d4f337409ddbc3cc6b52ffa5fa659ef4fd513863..03267a8eba400401680ddcb802bacec31e671d1f 100644 (file)
@@ -129,57 +129,6 @@ static void image_viewer_load_file(ImageViewer *imageviewer, const gchar *imgfil
 
        g_object_unref(pixbuf);
 }
-#else
-#if HAVE_GDK_IMLIB
-static void image_viewer_load_file(ImageViewer *imageviewer, const gchar *imgfile)
-{
-       GdkImlibImage *im;
-       gint avail_width;
-       gint avail_height;
-       gint new_width;
-       gint new_height;
-
-       debug_print("image_viewer_show_mimepart\n");
-
-       im = gdk_imlib_load_image(imgfile);
-       if (!im) {
-               g_warning("Can't load the image.");     
-               return;
-       }
-
-       if (imageviewer->resize_img) {
-               avail_width = imageviewer->notebook->parent->allocation.width;
-               avail_height = imageviewer->notebook->parent->allocation.height;
-               if (avail_width > 8) avail_width -= 8;
-               if (avail_height > 8) avail_height -= 8;
-
-               image_viewer_get_resized_size(im->rgb_width, im->rgb_height,
-                                avail_width, avail_height,
-                                &new_width, &new_height);
-       } else {
-               new_width = im->rgb_width;
-               new_height = im->rgb_height;
-       }
-
-       gdk_imlib_render(im, new_width, new_height);
-
-       if (!imageviewer->image) {
-               imageviewer->image = gtk_image_new_from_pixmap(gdk_imlib_move_image(im),
-                                                              gdk_imlib_move_mask(im));
-
-               gtk_scrolled_window_add_with_viewport
-                       (GTK_SCROLLED_WINDOW(imageviewer->scrolledwin),
-                        imageviewer->image);
-       } else
-               gtk_image_set_from_pixmap(GTK_IMAGE(imageviewer->image),
-                              gdk_imlib_move_image(im),
-                              gdk_imlib_move_mask(im));      
-
-       gtk_widget_show(imageviewer->image);
-
-       gdk_imlib_destroy_image(im);
-}
-#endif /* HAVE_GDK_IMLIB */
 #endif /* HAVE_GDK_PIXBUF */
 
 static void image_viewer_set_notebook_page(MimeViewer *_mimeviewer)
@@ -239,7 +188,7 @@ static void image_viewer_clear_viewer(MimeViewer *_mimeviewer)
        image_viewer_set_notebook_page(_mimeviewer);
 
        if (imageviewer->image != NULL)
-               gtk_image_set_from_pixmap(GTK_IMAGE(imageviewer->image), NULL, NULL);
+               gtk_pixmap_set(GTK_PIXMAP(imageviewer->image), NULL, NULL);
        hadj = gtk_scrolled_window_get_hadjustment
                (GTK_SCROLLED_WINDOW(imageviewer->scrolledwin));
        gtk_adjustment_set_value(hadj, 0.0);