From: Tim Cross <theophilusx@gmail.com>
To: 8176@debbugs.gnu.org
Subject: bug#8176: 24.0.50; GUI toolkit differences
Date: Sat, 05 Mar 2011 15:13:44 +1100 [thread overview]
Message-ID: <8762ry8arr.fsf@rapttech.com.au> (raw)
The code below works under some GUI toolkits (i.e. windows, lucid and I
think GNUStep), but will not work under versions built with GTK. From a
discussion on the emacs-dev list, this appears to be due to design
constraints with the GTK toolkit, which will not allow menu
actions/buttons to be defined at the top level. I tried to verify this
using the GTK documentation, but was unable to find anything specific.
Either this is a bug in GTK or how emacs interfaces with the library
(seems unlikely, more likely a desing constraint of GTK) and should be
fixed or a footnote added to the manual to let developers know of this
limitation in some toolkits, noteably GTK based ones.
The following code was evaluated within the scratch buffer. I confirmed
it works fine under emacs 24 built with lucid, but fails to work when
built with GTK2+. Others reported it worked find under win32, but failed
on ns.
(defun tx-greet ()
(interactive)
(message "Hello Tim!"))
(defun tx-menu ()
(interactive)
(define-key lisp-interaction-mode-map [menu-bar tx]
'(menu-item "TX Test" tx-greet)))
Tim
--
Tim Cross
tcross@rapttech.com.au
There are two types of people in IT - those who do not manage what they
understand and those who do not understand what they manage.
next reply other threads:[~2011-03-05 4:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 4:13 Tim Cross [this message]
2011-07-04 14:05 ` bug#8176: 24.0.50; GUI toolkit differences 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
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=8762ry8arr.fsf@rapttech.com.au \
--to=theophilusx@gmail.com \
--cc=8176@debbugs.gnu.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).