comparison src/event-gtk.c @ 2081:e8db6a10ad42

[xemacs-hg @ 2004-05-15 07:31:43 by malcolmp] Added support for Gtk menu bar, menu item and dialog button mnemonics.
author malcolmp
date Sat, 15 May 2004 07:31:49 +0000
parents 91d4c8c65a0f
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
2080:ebba17579ace 2081:e8db6a10ad42
54 54
55 #include <gdk/gdkkeysyms.h> 55 #include <gdk/gdkkeysyms.h>
56 56
57 #ifdef HAVE_DRAGNDROP 57 #ifdef HAVE_DRAGNDROP
58 #include "dragdrop.h" 58 #include "dragdrop.h"
59 #endif
60
61 #ifdef HAVE_MENUBARS
62 # include "menubar.h"
59 #endif 63 #endif
60 64
61 #if defined (HAVE_OFFIX_DND) 65 #if defined (HAVE_OFFIX_DND)
62 #include "offix.h" 66 #include "offix.h"
63 #endif 67 #endif
1323 1327
1324 if (key_event_p) 1328 if (key_event_p)
1325 { 1329 {
1326 GdkEventKey *key_event = &gdk_event->key; 1330 GdkEventKey *key_event = &gdk_event->key;
1327 Lisp_Object keysym; 1331 Lisp_Object keysym;
1332
1333 #ifdef HAVE_MENUBARS
1334 /* If the user wants see if the event is a menu bar accelerator.
1335 The process of checking absorbs the event and starts menu
1336 processing so send a null event into XEmacs to make sure it
1337 does nothing.
1338 */
1339 if (!NILP (Vmenu_accelerator_enabled)
1340 && gtk_accel_groups_activate(GTK_OBJECT (FRAME_GTK_SHELL_WIDGET(frame)),
1341 key_event->keyval,
1342 (GdkModifierType) *state))
1343 {
1344 zero_event(emacs_event);
1345 return 1;
1346 }
1347 #endif
1328 1348
1329 /* This used to compute the frame from the given X window and 1349 /* This used to compute the frame from the given X window and
1330 store it here, but we really don't care about the frame. */ 1350 store it here, but we really don't care about the frame. */
1331 emacs_event->channel = DEVICE_CONSOLE (d); 1351 emacs_event->channel = DEVICE_CONSOLE (d);
1332 1352