From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miguel Frasson Newsgroups: gmane.emacs.devel Subject: Re: pop-up tool-bar Date: 08 Oct 2004 08:12:32 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097236953 17573 80.91.229.6 (8 Oct 2004 12:02:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2004 12:02:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 08 14:02:27 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CFtS6-0007S0-00 for ; Fri, 08 Oct 2004 14:02:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFtYt-000373-Gw for ged-emacs-devel@m.gmane.org; Fri, 08 Oct 2004 08:09:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CFtXH-00020Y-TI for emacs-devel@gnu.org; Fri, 08 Oct 2004 08:07:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CFtXE-0001y4-GJ for emacs-devel@gnu.org; Fri, 08 Oct 2004 08:07:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFtXE-0001xl-3r for emacs-devel@gnu.org; Fri, 08 Oct 2004 08:07:44 -0400 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CFtQG-0001oW-Gn for emacs-devel@gnu.org; Fri, 08 Oct 2004 08:00:33 -0400 Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CFtQD-0001dU-00 for ; Fri, 08 Oct 2004 14:00:29 +0200 Original-Received: from 84e5e716.math.leidenuniv.nl ([132.229.231.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Oct 2004 14:00:29 +0200 Original-Received: from frasson by 84e5e716.math.leidenuniv.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Oct 2004 14:00:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 51 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 84e5e716.math.leidenuniv.nl User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28080 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28080 "Drew Adams" writes: > Second, I don't understand your "Maybe..." paragraph. Is that related to the > pb you mentioned, or is it a different topic? Are you perhaps suggesting > here to disable the Tool Bar menu item, rather than hide it? > > - If so, yes, that could be done, but I think it's better to get rid of it > altogether - at least in the case where someone uses tool-bar-mode (shows > tool-bar everywhere all the time). Currently, if you turn off tool-bar-mode, > "Tool Bar" appears (assuming tool-bar-here-mode is on); if you turn on > tool-bar-mode, "Tool Bar" disappears. That makes sense to me. > > - If not, if this is a proposed solution to the selection pb, then disable > what button? when? My post, in this topic, was confising. I meant something like: if permanent toolbar, no "Buttons" menu item; if temporary toolbar (like, if I use toolbar and it will disappear), then deactivate "Buttons" menu item. > Third, in terms of the inadvertent selection pb: I don't have a good > solution. How can the tool-bar be hidden after the mouse-up event takes > place? The hiding needs to take place in the same command that shows it (and > that pushes the next event back onto unread-command-events). > > The mouse-up event is two events removed from the event that triggers > command show-tool-bar-for-one-command: 1) click Tool Bar, 2) mouse-down, 3) > mouse-up. The Tool Bar click shows, then hides, the tool-bar, but the hiding > doesn't take place until the mouse-down. > > I tried doing things like (if transient-mark-mode (deactivate-mark)) in the > unwind-protect (to not show the inadvertent selection), but that didn't > help. There's probably a simple solution I'm not seeing. Anyone? I have not tried, but did you try something with `run-with-idle-timer'? I don't know if Emacs is not idle meanwhile the mouse events are not complete... if it is idle, this can provide a solution. Its a good idea if the variable customizable variable `idle-update-delay' (if I understand its function) is respected. No problem if the toolbar stays a little longer visible, if user likes so. But I am not sure if this is the meaning of `idle-update-delay' (maybe this is for tooltips or so...) Maybe the delay for the hide of the toolbar could be an option. I don't know whether this is a good idea. Miguel. -- Miguel Vinicius Santini Frasson http://www.math.leidenuniv.nl/~frasson