GNU bug report logs -
#8176
24.0.50; GUI toolkit differences
Previous Next
Reported by: Tim Cross <theophilusx <at> gmail.com>
Date: Sat, 5 Mar 2011 04:14:02 UTC
Severity: minor
Tags: fixed
Found in version 24.0.50
Fixed in version 24.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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 <at> 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.
This bug report was last modified 14 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.