diff src/dialog.c @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents 558f606b08ae
children 2f8bb876ab1d
line wrap: on
line diff
--- a/src/dialog.c	Mon Aug 13 10:34:15 2007 +0200
+++ b/src/dialog.c	Mon Aug 13 10:35:03 2007 +0200
@@ -63,8 +63,18 @@
 {
   struct frame *f = selected_frame ();
   struct device *d = XDEVICE (f->device);
-  
-  MAYBE_DEVMETH (d, popup_dialog_box, (f, dbox_desc));
+
+  if (!HAS_DEVMETH_P (d, popup_dialog_box))
+    signal_simple_error ("Device does not support dialogs", f->device);
+
+  if (SYMBOLP (dbox_desc))
+    dbox_desc = Fsymbol_value (dbox_desc);
+  CHECK_CONS (dbox_desc);
+  CHECK_STRING (XCAR (dbox_desc));
+  if (!CONSP (XCDR (dbox_desc)))
+    signal_simple_error ("Dialog descriptor must supply at least one button", dbox_desc);
+
+  DEVMETH (d, popup_dialog_box, (f, dbox_desc));
 
   return Qnil;
 }