diff src/dialog-msw.c @ 593:5fd7ba8b56e7

[xemacs-hg @ 2001-05-31 12:45:27 by ben] xemacs-faq.texi: Major rewrite. Update all MS Windows info to current. Redo section 6.1 almost completely. Incorporate sections 1 and 2 of Hrvoje's FAQ. etags.el: Fix infloop when going up to the root. s\cygwin32.h: Don't unilaterally include ntplay, but only when we're compiling with native sound (look in configure now). event-msw.c: Fix yet more problems with C-g handling. Implement debug-mswindows-events. event-stream.c, events.h, signal.c, sysdep.h: Rearrange the signal-handling code to eliminate the former spaghetti logic paths in it. Document clearly what "low-level" and "high-level" timeouts are. Rename some functions with unclear names (e.g. "...alarm...") to names that reflect what they actually do (e.g. "...async_timeout..."). Fix numerous bugs discovered in the process. console-x.h, event-Xt.c, event-msw.c, frame-x.c: Hopefully make XEmacs properly maintain the "iconified" state on frames at all times. This should fix the "can't delete a frame with C-x 5 0 when there's another iconified frame out there" bug. Put a notice in of further changes that should probably be made to clean up the frame-visibility support. (especially directed at Jan Vroonhof) lisp.h, miscplay.c: Rename SBufbyte to CBufbyte to avoid a misleading name. Eliminate UChar, which is not used anywhere and contributes no semantic info. Add a comment about the documentation-only properties of the char/unsigned char typedefs. Add SChar_Binary as an explicitly `signed' version of Char_Binary and put back the `signed' declarations in miscplay.c. alloc.c: Use char typedefs. console-msw.c, device-msw.c, dialog-msw.c, editfns.c, fileio.c, glyphs-eimage.c, menubar-msw.c, ntplay.c, objects-msw.c, realpath.c, redisplay-msw.c, select-msw.c, syswindows.h, win32.c: Eliminate numerous C++ errors. frame-msw.c: Eliminate numerous C++ errors and Mule-ize. glyphs-msw.c: Eliminate numerous C++ errors and use char typedefs. configure.in: Fix problems detecting both native and Linux sound on Cygwin when compiled with --with-msw=no. Rearrange file-coding handling a bit to avoid warning when compiling with Mule. configure.in, configure.usage, INSTALL: Document XEMACS_CC and corresponding compiler option --xemacs-compiler. Explain how to build xemacs using a C++ compiler.
author ben
date Thu, 31 May 2001 12:45:41 +0000
parents 183866b06e0b
children af57a77cbc92
line wrap: on
line diff
--- a/src/dialog-msw.c	Thu May 31 12:03:39 2001 +0000
+++ b/src/dialog-msw.c	Thu May 31 12:45:41 2001 +0000
@@ -42,7 +42,6 @@
 static Lisp_Object Q_initial_directory;
 static Lisp_Object Q_initial_filename;
 static Lisp_Object Q_filter_list;
-static Lisp_Object Q_title;
 static Lisp_Object Q_allow_multi_select;
 static Lisp_Object Q_create_prompt_on_nonexistent;
 static Lisp_Object Q_overwrite_prompt;
@@ -286,11 +285,11 @@
 }
 
 
-#define ALIGN_TEMPLATE					\
-{							\
-  unsigned int slippage = Dynarr_length (template) & 3;	\
-  if (slippage)						\
-    Dynarr_add_many (template, &zeroes, slippage);	\
+#define ALIGN_TEMPLATE						\
+{								\
+  unsigned int slippage = Dynarr_length (template_) & 3;	\
+  if (slippage)							\
+    Dynarr_add_many (template_, &zeroes, slippage);		\
 }
 
 static struct
@@ -413,7 +412,7 @@
 handle_question_dialog_box (struct frame *f, Lisp_Object keys)
 {
   Lisp_Object_dynarr *dialog_items = Dynarr_new (Lisp_Object);
-  unsigned_char_dynarr *template = Dynarr_new (unsigned_char);
+  unsigned_char_dynarr *template_ = Dynarr_new (unsigned_char);
   unsigned int button_row_width = 0;
   unsigned int text_width, text_height;
   Lisp_Object question = Qnil, title = Qnil;
@@ -422,7 +421,7 @@
   record_unwind_protect (free_dynarr_opaque_ptr,
 			 make_opaque_ptr (dialog_items));
   record_unwind_protect (free_dynarr_opaque_ptr,
-			 make_opaque_ptr (template));
+			 make_opaque_ptr (template_));
 
   /* A big NO NEED to GCPRO gui_items stored in the array: they are just
      pointers into KEYS list, which is GC-protected by the caller */
@@ -543,20 +542,20 @@
     dlg_tem.cx = text_width + 2 * X_TEXT_FROM_EDGE;
     dlg_tem.cy = (Y_TEXT_FROM_EDGE + text_height + Y_TEXT_FROM_BUTTON
 		  + Y_BUTTON + Y_BUTTON_FROM_EDGE);
-    Dynarr_add_many (template, &dlg_tem, sizeof (dlg_tem));
+    Dynarr_add_many (template_, &dlg_tem, sizeof (dlg_tem));
 
     /* We want no menu and standard class */
-    Dynarr_add_many (template, &zeroes, 4);
+    Dynarr_add_many (template_, &zeroes, 4);
 
     /* And the third is the dialog title. "XEmacs" unless one is supplied.
        Note that the string must be in Unicode. */
     if (NILP (title))
-      Dynarr_add_many (template, L"XEmacs", 14);
+      Dynarr_add_many (template_, L"XEmacs", 14);
     else
-      push_lisp_string_as_unicode (template, title);
+      push_lisp_string_as_unicode (template_, title);
 
     /* We want standard dialog font */
-    Dynarr_add_many (template, L"\x08MS Shell Dlg", 28);
+    Dynarr_add_many (template_, L"\x08MS Shell Dlg", 28);
 
     /* Next add text control. */
     item_tem.style = WS_CHILD | WS_VISIBLE | SS_LEFT | SS_NOPREFIX;
@@ -568,17 +567,17 @@
     item_tem.id = 0xFFFF;
 
     ALIGN_TEMPLATE;
-    Dynarr_add_many (template, &item_tem, sizeof (item_tem));
+    Dynarr_add_many (template_, &item_tem, sizeof (item_tem));
 
     /* Right after class id follows */
-    Dynarr_add_many (template, &ones, 2);
-    Dynarr_add_many (template, &static_class_id, sizeof (static_class_id));
+    Dynarr_add_many (template_, &ones, 2);
+    Dynarr_add_many (template_, &static_class_id, sizeof (static_class_id));
 
     /* Next thing to add is control text, as Unicode string */
-    push_lisp_string_as_unicode (template, question);
+    push_lisp_string_as_unicode (template_, question);
 
     /* Specify 0 length creation data */
-    Dynarr_add_many (template, &zeroes, 2);
+    Dynarr_add_many (template_, &zeroes, 2);
 
     /* Now it's the button time */
     item_tem.y = Y_TEXT_FROM_EDGE + text_height + Y_TEXT_FROM_BUTTON;
@@ -601,11 +600,12 @@
 	item_tem.id = i + ID_ITEM_BIAS;
 
 	ALIGN_TEMPLATE;
-	Dynarr_add_many (template, &item_tem, sizeof (item_tem));
+	Dynarr_add_many (template_, &item_tem, sizeof (item_tem));
 
 	/* Right after 0xFFFF and class id atom follows */
-	Dynarr_add_many (template, &ones, 2);
-	Dynarr_add_many (template, &button_class_id, sizeof (button_class_id));
+	Dynarr_add_many (template_, &ones, 2);
+	Dynarr_add_many (template_, &button_class_id,
+			 sizeof (button_class_id));
 
 	/* Next thing to add is control text, as Unicode string */
 	{
@@ -621,11 +621,11 @@
 					       2 * XSTRING_LENGTH (ctext) + 3,
 					       &accel_unused,
 					       ctext);
-	  push_bufbyte_string_as_unicode (template, trans, translen);
+	  push_bufbyte_string_as_unicode (template_, trans, translen);
 	}
 
 	/* Specify 0 length creation data. */
-	Dynarr_add_many (template, &zeroes, 2);
+	Dynarr_add_many (template_, &zeroes, 2);
 
 	item_tem.x += item_tem.cx + X_BUTTON_SPACING;
       }
@@ -654,7 +654,7 @@
     /* Woof! Everything is ready. Pop pop pop in now! */
     did->hwnd =
       CreateDialogIndirectParam (NULL,
-				 (LPDLGTEMPLATE) Dynarr_atp (template, 0),
+				 (LPDLGTEMPLATE) Dynarr_atp (template_, 0),
 				 FRAME_MSWINDOWS_HANDLE (f), dialog_proc,
 				 (LPARAM) LISP_TO_VOID (dialog_data));
     if (!did->hwnd)