aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-09-02 01:46:34 +0000
committerKatsumi Yamaoka2010-09-02 01:46:34 +0000
commitae682ff5aeacc6e99a76d567b487cd2fa0d9a4a9 (patch)
treea2331b874172c2223940ea33a173f80c573a5d59
parentc9fc72fa5acddcdc670a2eb89a777f48fb031820 (diff)
downloademacs-ae682ff5aeacc6e99a76d567b487cd2fa0d9a4a9.tar.gz
emacs-ae682ff5aeacc6e99a76d567b487cd2fa0d9a4a9.zip
gnus-html.el (gnus-html-rescale-image): Yet another try at getting the image sizing right.
-rw-r--r--lisp/gnus/ChangeLog2
-rw-r--r--lisp/gnus/gnus-html.el19
2 files changed, 12 insertions, 9 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 4685373cf5f..735536971ea 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -3,6 +3,8 @@
3 * gnus-html.el (gnus-html-wash-tags): Don't show images that are really 3 * gnus-html.el (gnus-html-wash-tags): Don't show images that are really
4 small. They're probably tracking images. 4 small. They're probably tracking images.
5 (gnus-html-wash-tags): Remove all <pre_int> place holders. 5 (gnus-html-wash-tags): Remove all <pre_int> place holders.
6 (gnus-html-rescale-image): Yet another try at getting the image sizing
7 right.
6 8
7 * nntp.el (nntp-request-set-mark): Refuse to do marks if 9 * nntp.el (nntp-request-set-mark): Refuse to do marks if
8 nntp-marks-file-name is nil. 10 nntp-marks-file-name is nil.
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 6824fbf7d39..7e13a0bde97 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -274,14 +274,16 @@ fit these criteria."
274 (window-height (truncate (* gnus-max-image-proportion 274 (window-height (truncate (* gnus-max-image-proportion
275 (- (nth 3 edges) (nth 1 edges))))) 275 (- (nth 3 edges) (nth 1 edges)))))
276 scaled-image) 276 scaled-image)
277 (or 277 (when (> height window-height)
278 (cond ((> height window-height) 278 (setq image (or (create-image file 'imagemagick nil
279 (create-image file 'imagemagick nil 279 :height window-height)
280 :height window-height)) 280 image))
281 ((> width window-width) 281 (when (> (car (image-size image t)) window-width)
282 (create-image file 'imagemagick nil 282 (setq image (or
283 :width window-width))) 283 (create-image file 'imagemagick nil
284 image)))) 284 :width window-width)
285 image))))
286 image)))
285 287
286(defun gnus-html-prune-cache () 288(defun gnus-html-prune-cache ()
287 (let ((total-size 0) 289 (let ((total-size 0)
@@ -301,7 +303,6 @@ fit these criteria."
301 (decf total-size (cadr file)) 303 (decf total-size (cadr file))
302 (delete-file (nth 2 file))))))) 304 (delete-file (nth 2 file)))))))
303 305
304
305(defun gnus-html-image-url-blocked-p (url blocked-images) 306(defun gnus-html-image-url-blocked-p (url blocked-images)
306"Find out if URL is blocked by BLOCKED-IMAGES." 307"Find out if URL is blocked by BLOCKED-IMAGES."
307 (let ((ret (and blocked-images 308 (let ((ret (and blocked-images