emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tool bar icons not updated according to :active condition


From: Reiner Steib
Subject: Re: tool bar icons not updated according to :active condition
Date: Sat, 25 Feb 2006 10:31:53 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

On Fri, Feb 24 2006, Chong Yidong wrote:

>> In `gnus-group-make-tool-bar' the describe-group entry is also added
>> to the tool bar (icon: etc/images/gnus/describe-group.xpm):
>>
>>   (tool-bar-add-item-from-menu
>>     'gnus-group-describe-group "describe-group" gnus-group-mode-map)
>>
>> But after moving up/down in the group buffer (C-p/C-n), the icon is
>> not updated (enabled/disabled) when changing from a group to a topic
>> line and vice versa.
>>
>> After `C-l' (or after `redraw-frame' [3]), the correct icon is
>> displayed.  A workaround could be to redraw the frame after every
>> point-motion (is there a after-point-motion-hook?).
>
> You could use post-command-hook.

The following code updates the frame and the tool bar, but I think it
is too expensive (and maybe irritating for the user) because it
affects the whole frame, not only the tool bar.  Is it possible to
limit redrawing to the tool bar?

(defun rs-redraw ()
  (redraw-frame (selected-frame)))

(with-current-buffer gnus-group-buffer
  (add-to-list
   (make-local-variable 'post-command-hook)
   'rs-redraw))

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]