From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs Date: Wed, 09 Oct 2013 13:32:42 +0900 (JST) Organization: Red Hat Japan, Inc. Message-ID: <20131009.133242.7368376887673130.yamato@redhat.com> References: <831u3vsjrf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1381293186 24613 80.91.229.3 (9 Oct 2013 04:33:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2013 04:33:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 09 06:33:09 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTlSO-0007op-9i for ged-emacs-devel@m.gmane.org; Wed, 09 Oct 2013 06:33:08 +0200 Original-Received: from localhost ([::1]:40148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTlSN-0004d4-Uc for ged-emacs-devel@m.gmane.org; Wed, 09 Oct 2013 00:33:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTlSE-0004cs-QX for emacs-devel@gnu.org; Wed, 09 Oct 2013 00:33:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTlS8-0003Zp-R6 for emacs-devel@gnu.org; Wed, 09 Oct 2013 00:32:58 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:19953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTlS2-0003ZU-9V; Wed, 09 Oct 2013 00:32:46 -0400 Original-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r994WiVQ029542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Oct 2013 00:32:44 -0400 Original-Received: from localhost (dhcp-193-40.nrt.redhat.com [10.64.193.40]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r994WgGl013085; Wed, 9 Oct 2013 00:32:43 -0400 In-Reply-To: <831u3vsjrf.fsf@gnu.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164033 Archived-At: Hi, I've tested on gnome-terminal of Fedora 19 GNU/Linux(without mouse). It works fine! I'd like to report one thing I found during test. pressing shows nothing if menu-bar-mode is off. It is nice if menu-bar is shown temporary and automatically. Here is a temporary solution. use your code only if menu-bar is shown. Masatake YAMATO === modified file 'lisp/menu-bar.el' *** lisp/menu-bar.el 2013-10-08 15:11:29 +0000 --- lisp/menu-bar.el 2013-10-09 03:52:47 +0000 *************** *** 2394,2400 **** (cond ((eq type 'x) (x-menu-bar-open frame)) ((eq type 'w32) (w32-menu-bar-open frame)) ! ((null tty-menu-open-use-tmm) (let* ((x tty-menu--initial-menu-x) (menu (menu-bar-menu-at-x-y x 0 frame))) (popup-menu (or --- 2394,2401 ---- (cond ((eq type 'x) (x-menu-bar-open frame)) ((eq type 'w32) (w32-menu-bar-open frame)) ! ((and (null tty-menu-open-use-tmm) ! (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0)))) (let* ((x tty-menu--initial-menu-x) (menu (menu-bar-menu-at-x-y x 0 frame))) (popup-menu (or > Trunk revision 114582 adds support for menus on a text-mode terminal. > Typing F10 will drop the Files menu, and you can get to the others by > using C-f/C-b and the right/left arrow keys. Within a menu, C-n/C-p > and the up/down arrows allow navigation between items, and RET selects > an item. Help-echo for menu items is displayed in the echo area. > > If you have a mouse supported, clicking on the menu bar should drop > down the menu under the click; clicking on the mode line or on the > text area should pop up menus specific to those areas. Navigation > within the menu and selection with a mouse work as you'd expect. > > I tested this on the w32 text terminal, with and without a mouse, and > on GNU/Linux without a mouse. Xterm-mouse still doesn't work as > expected, so there's probably something else to be done about that. > > Please test on GNU/Linux terminals with GPM. Also, I hope I didn't > break the GUI frames (other than w32, which I tested). The NS build > is my greatest worry, as I couldn't even try compiling it. > > HAVE_MENUS is now unconditionally defined by configure. I didn't yet > remove HAVE_MENUS from the sources, because that could serve as > stopgap and temporary work-around, in case I screwed up some build. > Also, perhaps people will want to have a --without-menus option at > configure time. > > This was a long journey for me, it started years ago, when I discussed > possible implementations with Gerd Moellmann (his ideas are at the > core of the implementation, see the commentary in term.c). Now it's > over. Enjoy the results. >