aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReiner Steib2006-03-08 14:27:20 +0000
committerReiner Steib2006-03-08 14:27:20 +0000
commit85fd80023e674a28cb941637fc1db0ded29d1a60 (patch)
tree2ad558d2a0926bd5077494c868fb692263483149
parent60a7c013cf5452ff389f5141319c67f8e55acb5b (diff)
downloademacs-85fd80023e674a28cb941637fc1db0ded29d1a60.tar.gz
emacs-85fd80023e674a28cb941637fc1db0ded29d1a60.zip
* gnus-util.el (gnus-tool-bar-update): New function.
* gnus-group.el (gnus-group-update-tool-bar): New variable. (gnus-group-insert-group-line): Add gnus-tool-bar-update. * gnus-topic.el (gnus-topic-prepare-topic): Add gnus-tool-bar-update.
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-group.el20
-rw-r--r--lisp/gnus/gnus-topic.el5
-rw-r--r--lisp/gnus/gnus-util.el17
4 files changed, 51 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 43bfc71eb5e..f2a76109562 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
12006-03-08 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-util.el (gnus-tool-bar-update): New function.
4
5 * gnus-group.el (gnus-group-update-tool-bar): New variable.
6 (gnus-group-insert-group-line): Add gnus-tool-bar-update.
7
8 * gnus-topic.el (gnus-topic-prepare-topic): Add gnus-tool-bar-update.
9
12006-03-06 Katsumi Yamaoka <yamaoka@jpl.org> 102006-03-06 Katsumi Yamaoka <yamaoka@jpl.org>
2 11
3 * mm-view.el (mm-w3m-cid-retrieve-1): Check carefully whether 12 * mm-view.el (mm-w3m-cid-retrieve-1): Check carefully whether
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 933c3762ed9..3d20af8b0df 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1379,6 +1379,18 @@ if it is a string, only list groups matching REGEXP."
1379 (gnus-range-difference (list active) (gnus-info-read info)) 1379 (gnus-range-difference (list active) (gnus-info-read info))
1380 seen)))))) 1380 seen))))))
1381 1381
1382(defcustom gnus-group-update-tool-bar
1383 (and (not (featurep 'xemacs))
1384 (boundp 'tool-bar-mode)
1385 tool-bar-mode
1386 ;; Using `redraw-frame' (see `gnus-tool-bar-update') in Emacs 21 might
1387 ;; be confusing, so maybe we shouldn't call it by default.
1388 (fboundp 'force-window-update))
1389 "Force updating the group buffer tool bar."
1390 :group 'gnus-group
1391 :version "22.1"
1392 :type 'boolean)
1393
1382(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level 1394(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level
1383 gnus-tmp-marked number 1395 gnus-tmp-marked number
1384 gnus-tmp-method) 1396 gnus-tmp-method)
@@ -1447,8 +1459,10 @@ if it is a string, only list groups matching REGEXP."
1447 (bbb-grouplens-group-p gnus-tmp-group)) 1459 (bbb-grouplens-group-p gnus-tmp-group))
1448 "")) 1460 ""))
1449 (buffer-read-only nil) 1461 (buffer-read-only nil)
1462 beg end
1450 header gnus-tmp-header) ; passed as parameter to user-funcs. 1463 header gnus-tmp-header) ; passed as parameter to user-funcs.
1451 (beginning-of-line) 1464 (beginning-of-line)
1465 (setq beg (point))
1452 (gnus-add-text-properties 1466 (gnus-add-text-properties
1453 (point) 1467 (point)
1454 (prog1 (1+ (point)) 1468 (prog1 (1+ (point))
@@ -1463,6 +1477,12 @@ if it is a string, only list groups matching REGEXP."
1463 gnus-marked ,gnus-tmp-marked-mark 1477 gnus-marked ,gnus-tmp-marked-mark
1464 gnus-indentation ,gnus-group-indentation 1478 gnus-indentation ,gnus-group-indentation
1465 gnus-level ,gnus-tmp-level)) 1479 gnus-level ,gnus-tmp-level))
1480 (setq end (point))
1481 (when gnus-group-update-tool-bar
1482 (gnus-put-text-property beg end 'point-entered
1483 'gnus-tool-bar-update)
1484 (gnus-put-text-property beg end 'point-left
1485 'gnus-tool-bar-update))
1466 (forward-line -1) 1486 (forward-line -1)
1467 (when (inline (gnus-visual-p 'group-highlight 'highlight)) 1487 (when (inline (gnus-visual-p 'group-highlight 'highlight))
1468 (gnus-run-hooks 'gnus-group-update-hook)) 1488 (gnus-run-hooks 'gnus-group-update-hook))
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index fc80a26f6b9..45585526bcf 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -585,6 +585,11 @@ articles in the topic and its subtopics."
585 (not (eq (nth 2 type) 'hidden)) 585 (not (eq (nth 2 type) 'hidden))
586 level all-entries unread)) 586 level all-entries unread))
587 (gnus-topic-update-unreads (car type) unread) 587 (gnus-topic-update-unreads (car type) unread)
588 (when gnus-group-update-tool-bar
589 (gnus-put-text-property beg end 'point-entered
590 'gnus-tool-bar-update)
591 (gnus-put-text-property beg end 'point-left
592 'gnus-tool-bar-update))
588 (goto-char end) 593 (goto-char end)
589 unread)) 594 unread))
590 595
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index c9a3f8c965a..686fe1cf837 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1459,6 +1459,23 @@ Return nil otherwise."
1459 display)) 1459 display))
1460 display))))) 1460 display)))))
1461 1461
1462(defun gnus-tool-bar-update (&rest ignore)
1463 "Update the tool bar."
1464 (when (and (boundp 'tool-bar-mode)
1465 tool-bar-mode)
1466 (let* ((args nil)
1467 (func (cond ((featurep 'xemacs)
1468 'ignore)
1469 ((fboundp 'tool-bar-update)
1470 'tool-bar-update)
1471 ((fboundp 'force-window-update)
1472 'force-window-update)
1473 ((fboundp 'redraw-frame)
1474 (setq args (list (selected-frame)))
1475 'redraw-frame)
1476 (t 'ignore))))
1477 (apply func args))))
1478
1462;; Fixme: This has only one use (in gnus-agent), which isn't worthwhile. 1479;; Fixme: This has only one use (in gnus-agent), which isn't worthwhile.
1463(defmacro gnus-mapcar (function seq1 &rest seqs2_n) 1480(defmacro gnus-mapcar (function seq1 &rest seqs2_n)
1464 "Apply FUNCTION to each element of the sequences, and make a list of the results. 1481 "Apply FUNCTION to each element of the sequences, and make a list of the results.