diff options
| author | Jan Djärv | 2004-11-16 20:52:32 +0000 |
|---|---|---|
| committer | Jan Djärv | 2004-11-16 20:52:32 +0000 |
| commit | 5ae53dcfca43ee0c8560f6e4fadfa9081adf68ae (patch) | |
| tree | ef102a5760e50b95ee822831b3a64b8d8161ed2e /src | |
| parent | ee31cd78ef49f569262b1a591949d707583dcdb3 (diff) | |
| download | emacs-5ae53dcfca43ee0c8560f6e4fadfa9081adf68ae.tar.gz emacs-5ae53dcfca43ee0c8560f6e4fadfa9081adf68ae.zip | |
* xmenu.c (x_menu_in_use): Removed.
(x_menu_set_in_use): Also set popup_activated_flag.
* xfns.c (Fx_file_dialog): Call popup_activated instead of
x_menu_in_use. Call x_menu_set_in_use in Motif version also.
* xterm.h: (x_menu_in_use): Removed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/xfns.c | 5 | ||||
| -rw-r--r-- | src/xmenu.c | 9 | ||||
| -rw-r--r-- | src/xterm.h | 1 |
4 files changed, 14 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bb7dc6365b5..4fa76aeb5da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2004-11-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xmenu.c (x_menu_in_use): Removed. | ||
| 4 | (x_menu_set_in_use): Also set popup_activated_flag. | ||
| 5 | |||
| 6 | * xfns.c (Fx_file_dialog): Call popup_activated instead of | ||
| 7 | x_menu_in_use. Call x_menu_set_in_use in Motif version also. | ||
| 8 | |||
| 9 | * xterm.h: (x_menu_in_use): Removed. | ||
| 10 | |||
| 1 | 2004-11-16 Richard M. Stallman <rms@gnu.org> | 11 | 2004-11-16 Richard M. Stallman <rms@gnu.org> |
| 2 | 12 | ||
| 3 | * keymap.c (Fmap_keymap): New arg SORT-FIRST. Use | 13 | * keymap.c (Fmap_keymap): New arg SORT-FIRST. Use |
diff --git a/src/xfns.c b/src/xfns.c index 66b2448527c..165ba37571d 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5144,7 +5144,7 @@ or directory must exist. ONLY-DIR-P is ignored." */) | |||
| 5144 | 5144 | ||
| 5145 | GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); | 5145 | GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); |
| 5146 | 5146 | ||
| 5147 | if (x_menu_in_use ()) | 5147 | if (popup_activated ()) |
| 5148 | error ("Trying to use a menu from within a menu-entry"); | 5148 | error ("Trying to use a menu from within a menu-entry"); |
| 5149 | 5149 | ||
| 5150 | CHECK_STRING (prompt); | 5150 | CHECK_STRING (prompt); |
| @@ -5232,6 +5232,7 @@ or directory must exist. ONLY-DIR-P is ignored." */) | |||
| 5232 | record_unwind_protect (clean_up_file_dialog, make_save_value (dialog, 0)); | 5232 | record_unwind_protect (clean_up_file_dialog, make_save_value (dialog, 0)); |
| 5233 | 5233 | ||
| 5234 | /* Process events until the user presses Cancel or OK. */ | 5234 | /* Process events until the user presses Cancel or OK. */ |
| 5235 | x_menu_set_in_use (1); | ||
| 5235 | result = 0; | 5236 | result = 0; |
| 5236 | while (result == 0) | 5237 | while (result == 0) |
| 5237 | { | 5238 | { |
| @@ -5297,7 +5298,7 @@ directories. */) | |||
| 5297 | 5298 | ||
| 5298 | GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); | 5299 | GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); |
| 5299 | 5300 | ||
| 5300 | if (x_menu_in_use ()) | 5301 | if (popup_activated ()) |
| 5301 | error ("Trying to use a menu from within a menu-entry"); | 5302 | error ("Trying to use a menu from within a menu-entry"); |
| 5302 | 5303 | ||
| 5303 | CHECK_STRING (prompt); | 5304 | CHECK_STRING (prompt); |
diff --git a/src/xmenu.c b/src/xmenu.c index 23904576edf..6f990bd11b1 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1118,14 +1118,6 @@ on the left of the dialog box and all following items on the right. | |||
| 1118 | 1118 | ||
| 1119 | #ifndef MSDOS | 1119 | #ifndef MSDOS |
| 1120 | 1120 | ||
| 1121 | /* Return non-zero if a dialog or popup menu is already popped up. */ | ||
| 1122 | |||
| 1123 | int | ||
| 1124 | x_menu_in_use () | ||
| 1125 | { | ||
| 1126 | return ! NILP (menu_items_inuse); | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | /* Set menu_items_inuse so no other popup menu or dialog is created. */ | 1121 | /* Set menu_items_inuse so no other popup menu or dialog is created. */ |
| 1130 | 1122 | ||
| 1131 | void | 1123 | void |
| @@ -1133,6 +1125,7 @@ x_menu_set_in_use (in_use) | |||
| 1133 | int in_use; | 1125 | int in_use; |
| 1134 | { | 1126 | { |
| 1135 | menu_items_inuse = in_use ? Qt : Qnil; | 1127 | menu_items_inuse = in_use ? Qt : Qnil; |
| 1128 | popup_activated_flag = in_use; | ||
| 1136 | } | 1129 | } |
| 1137 | 1130 | ||
| 1138 | /* Wait for an X event to arrive or for a timer to expire. */ | 1131 | /* Wait for an X event to arrive or for a timer to expire. */ |
diff --git a/src/xterm.h b/src/xterm.h index 0738f847563..4422dd274c2 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1069,7 +1069,6 @@ extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap, | |||
| 1069 | 1069 | ||
| 1070 | /* Defined in xmenu.c */ | 1070 | /* Defined in xmenu.c */ |
| 1071 | 1071 | ||
| 1072 | extern int x_menu_in_use P_ ((void)); | ||
| 1073 | extern void x_menu_set_in_use P_ ((int)); | 1072 | extern void x_menu_set_in_use P_ ((int)); |
| 1074 | extern void x_menu_wait_for_event P_ ((void *data)); | 1073 | extern void x_menu_wait_for_event P_ ((void *data)); |
| 1075 | extern void x_activate_menubar P_ ((struct frame *)); | 1074 | extern void x_activate_menubar P_ ((struct frame *)); |