all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Dino Chiesa" <dpchiesa@hotmail.com>
To: "Drew Adams" <drew.adams@oracle.com>, <11148@debbugs.gnu.org>
Subject: bug#11148: 23.3; x-popup-menu not behaving as documented
Date: Sun, 1 Apr 2012 13:36:48 -0700	[thread overview]
Message-ID: <BLU159-ds19B19F5DDB081DDB759827CE4F0@phx.gbl> (raw)
In-Reply-To: <E2396F2FEDE541D6BA419BFDFC40A475@us.oracle.com>

K, thanks for the reply.
I'll let you guys figure out what you want to do about 11138;

It may be that doc changes are the way to fix 11148.\
-Dino

-----Original Message----- 
From: Drew Adams
Sent: Sunday, April 01, 2012 9:19 AM
To: 'Dino Chiesa' ; 11148@debbugs.gnu.org
Subject: RE: bug#11148: 23.3; x-popup-menu not behaving as documented

> (x-popup-menu
>   t
>   (list "TITLE"
>         (list "PANE" (list "menu item 1" nil)
>         (list "menu item 2" nil))))
> ...shows a menu in which both items are selectable.
>
> This bug may be relevant to bug #11138. One of the proposed fixes for
> #11138 at the time of this report is to render a multi-line dialog box
> as a menu, with each "line" in the message displayed as an unselectable
> menu item.
>
> But this brief test seems to indicate that the "unselectable"
> menu items are not really unselectable, at least on Windows.
> In that case the proposed fix would be unsatisfactory.

First, I don't really care how bug #11138 is fixed.

My point in suggesting splitting a message at \n chars was that the bug can 
be
fixed - even if in a rudimentary way by treating the message's separate 
lines as
separate menu lines (since the code on MS Windows currently treats a
`message-box' as a popup menu).

Here is what I mean (one way), using the bug report's multiline message:

(defun foo (event)
  (interactive "e")
  (let ((choice  (x-popup-menu
                 event
                   '("Message"
                     ("" "First line in a long-ish message.")
                     ("" "This is line number 2 in the message.")
                     ("" ("OK"))))))
    (and choice  (call-interactively choice))))

(global-set-key [double-mouse-2] 'foo)
(global-set-key [mouse-2] nil)

Double-click mouse-2.  The message's lines are indeed handled as 
unselectable
menu items (yes, on MS Windows).

Is that the best looking implementation of a message dialog box?  Not IMO.

But given the desire to implement a message box using `x-popup-menu', that 
shows
at least that it can be done.  Is that better than the current 
implementation,
which jams the multiple lines of the message together?  Maybe.

Certainly we can hope for a better implementation.  Stefan suggested using a
tooltip frame, for instance.  And maybe (?) at least some of the 
implementation
could be moved from C to Lisp.

> I'd like to also raise a documentation bug, as well: there ought to be
> examples showing how to use x-popup-menu, on the page I cited above.
> A few simple examples will make this method much more usable.

Agreed, especially since there are a few different ways to use 
`x-popup-menu':
keymap, list of keymaps, or menu of multiple panes, the last of these being
radically different from the first two and unique wrt the rest of Emacs.






  reply	other threads:[~2012-04-01 20:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-01 15:45 bug#11148: 23.3; x-popup-menu not behaving as documented Dino Chiesa
2012-04-01 16:19 ` Drew Adams
2012-04-01 20:36   ` Dino Chiesa [this message]
2012-09-22  3:30     ` Chong Yidong
2012-04-01 16:28 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU159-ds19B19F5DDB081DDB759827CE4F0@phx.gbl \
    --to=dpchiesa@hotmail.com \
    --cc=11148@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.