]> git.eshelyaron.com Git - emacs.git/commitdiff
* xmenu.c (x_menu_in_use): Removed.
authorJan Djärv <jan.h.d@swipnet.se>
Tue, 16 Nov 2004 20:52:32 +0000 (20:52 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Tue, 16 Nov 2004 20:52:32 +0000 (20:52 +0000)
(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.

src/ChangeLog
src/xfns.c
src/xmenu.c
src/xterm.h

index bb7dc6365b530aae476e7712a1f66882f42d7757..4fa76aeb5dab011b40991d75d427f53c8ed5015d 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-16  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * 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.
+
 2004-11-16  Richard M. Stallman  <rms@gnu.org>
 
        * keymap.c (Fmap_keymap): New arg SORT-FIRST.  Use
index 66b2448527c666c3f4000ef73f1319f2614d048a..165ba37571d437f459ca8be414726ce005a0e516 100644 (file)
@@ -5144,7 +5144,7 @@ or directory must exist.  ONLY-DIR-P is ignored."  */)
 
   GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
 
-  if (x_menu_in_use ())
+  if (popup_activated ())
     error ("Trying to use a menu from within a menu-entry");
 
   CHECK_STRING (prompt);
@@ -5232,6 +5232,7 @@ or directory must exist.  ONLY-DIR-P is ignored."  */)
   record_unwind_protect (clean_up_file_dialog, make_save_value (dialog, 0));
 
   /* Process events until the user presses Cancel or OK.  */
+  x_menu_set_in_use (1);
   result = 0;
   while (result == 0)
     {
@@ -5297,7 +5298,7 @@ directories.  */)
 
   GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
 
-  if (x_menu_in_use ())
+  if (popup_activated ())
     error ("Trying to use a menu from within a menu-entry");
 
   CHECK_STRING (prompt);
index 23904576edfa4979177fc979926899c0c3361b36..6f990bd11b1b89313a63d28d956df340d74e549b 100644 (file)
@@ -1118,14 +1118,6 @@ on the left of the dialog box and all following items on the right.
 
 #ifndef MSDOS
 
-/* Return non-zero if a dialog or popup menu is already popped up.  */
-
-int
-x_menu_in_use ()
-{
-  return ! NILP (menu_items_inuse);
-}
-
 /* Set menu_items_inuse so no other popup menu or dialog is created.  */
 
 void
@@ -1133,6 +1125,7 @@ x_menu_set_in_use (in_use)
      int in_use;
 {
   menu_items_inuse = in_use ? Qt : Qnil;
+  popup_activated_flag = in_use;
 }
 
 /* Wait for an X event to arrive or for a timer to expire.  */
index 0738f8475633f07905e17d39af30cb53921f951b..4422dd274c209e384cdbb2811131ac423203bf07 100644 (file)
@@ -1069,7 +1069,6 @@ extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap,
 
 /* Defined in xmenu.c */
 
-extern int x_menu_in_use P_ ((void));
 extern void x_menu_set_in_use P_ ((int));
 extern void x_menu_wait_for_event P_ ((void *data));
 extern void x_activate_menubar P_ ((struct frame *));