Re: [AD] Grabber glitch (A.CC thread)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> ...not prompting to save...

Fixed thusly on trunk and branch.

> BTW, is there any reason there's no File->New option? I wanted to use it a
> few times last week and noticed it isn't there. I can see about adding it
> over the weekend.

Sounds sensible to me.

-- 
Eric Botcazou
Index: tools/grabber.c
===================================================================
RCS file: /cvsroot/alleg/allegro/tools/grabber.c,v
retrieving revision 1.50
diff -u -r1.50 grabber.c
--- tools/grabber.c	7 Feb 2003 12:59:13 -0000	1.50
+++ tools/grabber.c	10 May 2003 12:44:02 -0000
@@ -1817,6 +1817,26 @@
    *get_filename(buf) = 0;
 
    if (file_select_ex("Load datafile", buf, "dat", sizeof(buf), 0, 0)) {
+      if (is_modified) {
+	 int r = alert3("Previous data may have been modified.",
+			"Do you want to save them?", NULL,
+			"Save", "Don't save", "Cancel", 's', 'd', 27);
+
+	 switch (r) {
+
+	    case 1:
+	       saver();
+	       break;
+
+	    case 2:
+	       break;
+
+	    case 3:
+	    default:
+	       return D_REDRAW;
+	 }
+      }
+
       fix_filename_case(buf);
       load(buf, 1);
    }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/