diff options
| author | Chong Yidong | 2006-11-06 16:47:33 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-11-06 16:47:33 +0000 |
| commit | e3135734b208cffc5a5319714fa036b15e950a2e (patch) | |
| tree | 55456019d0388eb280f73c82462d7d852585db7d /src/xmenu.c | |
| parent | c1f043a06378a5a3f6f5dd5b7b1b383439ebc9ef (diff) | |
| download | emacs-e3135734b208cffc5a5319714fa036b15e950a2e.tar.gz emacs-e3135734b208cffc5a5319714fa036b15e950a2e.zip | |
(Fmenu_or_popup_active_p): Define outside HAVE_MENUS.
Return nil if building without menus.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 397e8a59e81..24be4fd5cb7 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1414,7 +1414,7 @@ If FRAME is nil or not given, use the selected frame. */) | |||
| 1414 | 1414 | ||
| 1415 | gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar), | 1415 | gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar), |
| 1416 | GTK_WIDGET (children->data)); | 1416 | GTK_WIDGET (children->data)); |
| 1417 | 1417 | ||
| 1418 | popup_activated_flag = 1; | 1418 | popup_activated_flag = 1; |
| 1419 | g_list_free (children); | 1419 | g_list_free (children); |
| 1420 | } | 1420 | } |
| @@ -1496,15 +1496,6 @@ popup_activated () | |||
| 1496 | return popup_activated_flag; | 1496 | return popup_activated_flag; |
| 1497 | } | 1497 | } |
| 1498 | 1498 | ||
| 1499 | /* The following is used by delayed window autoselection. */ | ||
| 1500 | |||
| 1501 | DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, | ||
| 1502 | doc: /* Return t if a menu or popup dialog is active. */) | ||
| 1503 | () | ||
| 1504 | { | ||
| 1505 | return (popup_activated ()) ? Qt : Qnil; | ||
| 1506 | } | ||
| 1507 | |||
| 1508 | /* This callback is invoked when the user selects a menubar cascade | 1499 | /* This callback is invoked when the user selects a menubar cascade |
| 1509 | pushbutton, but before the pulldown menu is posted. */ | 1500 | pushbutton, but before the pulldown menu is posted. */ |
| 1510 | 1501 | ||
| @@ -3770,6 +3761,20 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 3770 | #endif /* not USE_X_TOOLKIT */ | 3761 | #endif /* not USE_X_TOOLKIT */ |
| 3771 | 3762 | ||
| 3772 | #endif /* HAVE_MENUS */ | 3763 | #endif /* HAVE_MENUS */ |
| 3764 | |||
| 3765 | |||
| 3766 | /* The following is used by delayed window autoselection. */ | ||
| 3767 | |||
| 3768 | DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, | ||
| 3769 | doc: /* Return t if a menu or popup dialog is active. */) | ||
| 3770 | () | ||
| 3771 | { | ||
| 3772 | #ifdef HAVE_MENUS | ||
| 3773 | return (popup_activated ()) ? Qt : Qnil; | ||
| 3774 | #else | ||
| 3775 | return Qnil; | ||
| 3776 | #endif /* HAVE_MENUS */ | ||
| 3777 | } | ||
| 3773 | 3778 | ||
| 3774 | void | 3779 | void |
| 3775 | syms_of_xmenu () | 3780 | syms_of_xmenu () |