[gnus git] branch master updated: n0-17-97-g8780d87 =1= Stop any animations going on at article exit time.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  8780d8751e0f587624e8811aea7a40983d786d7c (commit)
      from  cede763acc53b665da23065a6c83bb5e71a27704 (commit)


- Log -----------------------------------------------------------------
commit 8780d8751e0f587624e8811aea7a40983d786d7c
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Sun Jun 26 23:23:21 2011 +0200

    Stop any animations going on at article exit time.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fcb70a1..ad36326 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2011-06-26  Lars Magne Ingebrigtsen  <[email protected]>
 
+	* gnus-art.el (gnus-article-stop-animations): New function to stop any
+	animations going on at article exit time.
+
 	* gnus-registry.el (gnus-registry-user-format-function-M): Reinstate,
 	since removing it breaks people upgrading.
 
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 3ebb5cc..eca4deb 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -4509,6 +4509,7 @@ commands:
 		 t)))
 	(with-current-buffer name
 	  (set (make-local-variable 'gnus-article-edit-mode) nil)
+	  (gnus-article-stop-animations)
 	  (when gnus-article-mime-handles
 	    (mm-destroy-parts gnus-article-mime-handles)
 	    (setq gnus-article-mime-handles nil))
@@ -4533,6 +4534,11 @@ commands:
 	  (gnus-start-date-timer gnus-article-update-date-headers))
 	(current-buffer)))))
 
+(defun gnus-article-stop-animations ()
+  (dolist (timer timer-list)
+    (when (eq (aref timer 5) 'image-animate-timeout)
+      (cancel-timer timer))))
+
 ;; Set article window start at LINE, where LINE is the number of lines
 ;; from the head of the article.
 (defun gnus-article-set-window-start (&optional line)
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index f974d38..4c059e9 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -7298,6 +7298,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
       (run-hooks 'gnus-summary-prepare-exit-hook)
       (when (gnus-buffer-live-p gnus-article-buffer)
 	(with-current-buffer gnus-article-buffer
+	  (gnus-article-stop-animations)
 	  (mm-destroy-parts gnus-article-mime-handles)
 	  ;; Set it to nil for safety reason.
 	  (setq gnus-article-mime-handle-alist nil)
@@ -9579,6 +9580,7 @@ C-u g', show the raw article."
       ;; Destroy any MIME parts.
       (when (gnus-buffer-live-p gnus-article-buffer)
 	(with-current-buffer gnus-article-buffer
+	  (gnus-article-stop-animations)
 	  (mm-destroy-parts gnus-article-mime-handles)
 	  ;; Set it to nil for safety reason.
 	  (setq gnus-article-mime-handle-alist nil)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    3 +++
 lisp/gnus-art.el |    6 ++++++
 lisp/gnus-sum.el |    2 ++
 3 files changed, 11 insertions(+), 0 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.