:set 'gnus-group-tool-bar-update
:group 'gnus-group)
+(defvar image-load-path)
+
(defun gnus-group-make-tool-bar (&optional force)
"Make a group mode tool bar from `gnus-group-tool-bar'.
When FORCE, rebuild the tool bar."
(gmm-image-load-path-for-library "gnus"
"gnus/toggle-subscription.xpm"
nil t))
- (image-load-path
- (gmm-image-load-path-for-library "gnus"
- "gnus/toggle-subscription.xpm"
- 'image-load-path t))
+ (image-load-path (cons (car load-path)
+ (when (boundp 'image-load-path)
+ image-load-path)))
(map (gmm-tool-bar-from-list gnus-group-tool-bar
gnus-group-tool-bar-zap-list
'gnus-group-mode-map)))
(gnus-range-difference (list active) (gnus-info-read info))
seen))))))
+(defcustom gnus-group-update-tool-bar
+ (and (not (featurep 'xemacs))
+ (boundp 'tool-bar-mode)
+ tool-bar-mode
+ ;; Using `redraw-frame' (see `gnus-tool-bar-update') in Emacs 21 might
+ ;; be confusing, so maybe we shouldn't call it by default.
+ (fboundp 'force-window-update))
+ "Force updating the group buffer tool bar."
+ :group 'gnus-group
+ :version "22.1"
+ :type 'boolean)
+
(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level
gnus-tmp-marked number
gnus-tmp-method)
(if (member gnus-tmp-group gnus-group-marked)
gnus-process-mark ? ))
(buffer-read-only nil)
+ beg end
header gnus-tmp-header) ; passed as parameter to user-funcs.
(beginning-of-line)
+ (setq beg (point))
(gnus-add-text-properties
(point)
(prog1 (1+ (point))
gnus-marked ,gnus-tmp-marked-mark
gnus-indentation ,gnus-group-indentation
gnus-level ,gnus-tmp-level))
+ (setq end (point))
+ (when gnus-group-update-tool-bar
+ (gnus-put-text-property beg end 'point-entered
+ 'gnus-tool-bar-update)
+ (gnus-put-text-property beg end 'point-left
+ 'gnus-tool-bar-update))
(forward-line -1)
(when (inline (gnus-visual-p 'group-highlight 'highlight))
(gnus-run-hooks 'gnus-group-update-hook))
;; We might read in new NoCeM messages here.
(when (and gnus-use-nocem
- (null arg))
+ (or (and (numberp gnus-use-nocem)
+ (numberp arg)
+ (>= arg gnus-use-nocem))
+ (not arg)))
(gnus-nocem-scan-groups))
;; If ARG is not a number, then we read the active file.
(when (and arg (not (numberp arg)))