emacs-devel
[Top][All Lists]
Advanced

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

Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs


From: Masatake YAMATO
Subject: Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
Date: Wed, 09 Oct 2013 13:32:42 +0900 (JST)

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 <f10> 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.
> 



reply via email to

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