unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 8176@debbugs.gnu.org
Subject: bug#8176: 24.0.50; GUI toolkit differences
Date: Tue, 12 Jul 2011 13:34:15 +1000	[thread overview]
Message-ID: <CAC=50j-i5GKgBVE51sCxgRn4mQVT2xJPHL9Bm0jW2rhD==i2hA@mail.gmail.com> (raw)
In-Reply-To: <CAC=50j-t9akhKpe5JsgAQQyDk__H_yQr7zc_5_CdtRD=PUX6sQ@mail.gmail.com>

OK, here is my attempt to draft an addition for 12.17.1 which may help
highlight the fact that not all toolkits are equivalent and what is
possible in some toolkits may not be possible in another.

"It should be noted that not all GUI toolkits used by emacs are
equivalent. Some toolkits have specific constraints on how they are
used. These constraints may be due to technical limitations of the
toolkit or they may represent deliberate design choices. It is
possible to implement elisp which works as expected under one toolkit
and either does not work under another or gives unexpected results.

An exmaple of this is the use of menu actions or buttons in a top
level menu-bar. The following code will work in a top level menu when
emacs is built with either the Lucid X toolkit or on MS Windows, but
will fail to work correctly when emacs is built against the GTK+ or
NextStep toolkits. Under these toolkits, the code compiles and the
menu item appears in the top level menu, but clicking on the item
fails to execute the associated action.

(defun menu-action-greet ()
   (interactive)
   (message "Hello Emacs User!"))

(defun top-level-menu ()
  (interactive)
  (define-key lisp-interaction-mode-map [menu-bar m]
     '(menu-item "Action Button" menu-action-greet)))



On Wed, Jul 6, 2011 at 4:56 PM, Tim Cross <theophilusx@gmail.com> wrote:
> On Wed, Jul 6, 2011 at 12:14 AM, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>> Tim Cross <theophilusx@gmail.com> writes:
>>
>>> My suggestion would be to add it to the elisp manual, possibly as a
>>> footnote, in either section 22.17 or possibly 22.17.1. Something along
>>> the lines that not all GUI toolkits are equal and some features or
>>> behaviours available in one toolkit may not be available in another.
>>> For example, GTK will not allow a top level menu button or action,
>>> while Lucid and NS do.
>>>
>>> A tricky part in documenting this is getting consistency of terms. I'm
>>> not sure if 'top level button or action' is really understood, but
>>> basically it refers to a menu item on the top level menu bar which
>>> performs an action other than to open a sub-menu.
>>
>> Could you suggest a paragraph for 22.17.1 that explains this problem?
>>
>> --
>> (domestic pets only, the antidote for overdose, milk.)
>>  bloggy blog http://lars.ingebrigtsen.no/
>>
>
> I will try to draft something in the next few days.
>
> Tim
>





  reply	other threads:[~2011-07-12  3:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05  4:13 bug#8176: 24.0.50; GUI toolkit differences Tim Cross
2011-07-04 14:05 ` Lars Magne Ingebrigtsen
2011-07-05  0:00   ` Tim Cross
2011-07-05  5:56     ` Jan Djärv
2011-07-05  6:02       ` Tim Cross
2011-07-05  8:48         ` Jan D.
2011-07-06  7:02           ` Tim Cross
2011-07-05 14:14     ` Lars Magne Ingebrigtsen
2011-07-06  6:56       ` Tim Cross
2011-07-12  3:34         ` Tim Cross [this message]
2011-07-15 16:33           ` Lars Magne Ingebrigtsen
2011-07-15 23:51             ` Tim Cross
2011-07-16 17:47               ` Glenn Morris
2011-07-16 18:04                 ` Lars Magne Ingebrigtsen
2011-07-16 18:14                 ` Andreas Schwab
2011-07-16 18:32                   ` Glenn Morris
2011-07-06 15:12     ` Jason Rumney

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAC=50j-i5GKgBVE51sCxgRn4mQVT2xJPHL9Bm0jW2rhD==i2hA@mail.gmail.com' \
    --to=theophilusx@gmail.com \
    --cc=8176@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).