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

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


> > 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.

Ok, patch attached. I though I'd send it earlier today, but it seems my ISP
for some odd reason doesn't let me send messages to the sourceforge list. >:(

--- /home/allegro/Allegro/allegro-4.1.9/tools/grabber.c	Sun Jan 26 18:22:56 2003
+++ grabber.c	Sat May 10 09:35:26 2003
@@ -77,6 +77,7 @@
 static char *pack_getter(int, int *);
 static char *prop_getter(int, int *);

+static int renewer(void);
 static int loader(void);
 static int merger(void);
 static int saver(void);
@@ -114,6 +118,7 @@

 static MENU file_menu[32] =
 {
+   { "&New\t(ctrl+W)",              renewer,          NULL,       0, NULL  },
    { "&Load\t(ctrl+L)",             loader,           NULL,       0, NULL  },
    { "&Save\t(ctrl+S)",             saver,            NULL,       0, NULL  },
    { "Save S&tripped",              strip_saver,      NULL,       0, NULL  },
@@ -229,6 +246,7 @@
    { d_edit_proc,       439,  16,   40,   8,    0,    0,    0,       0,          4,             0,       ygrid_string,     NULL, NULL  },
    { droplist_mod_proc, 430,  48,   195,  28,   0,    0,    0,       0,          0,             0,       pack_getter,      NULL, NULL  },
    { prop_proc,         260,  86,   365,  107,  0,    0,    0,       D_EXIT,     0,             0,       prop_getter,      NULL, NULL  },
+   { d_keyboard_proc,   0,    0,    0,    0,    0,    0,    C('w'),  0,          0,             0,       renewer,          NULL, NULL  },
    { d_keyboard_proc,   0,    0,    0,    0,    0,    0,    C('l'),  0,          0,             0,       loader,           NULL, NULL  },
    { d_keyboard_proc,   0,    0,    0,    0,    0,    0,    C('s'),  0,          0,             0,       saver,            NULL, NULL  },
    { d_keyboard_proc,   0,    0,    0,    0,    0,    0,    C('u'),  0,          0,             0,       updater,          NULL, NULL  },
@@ -1826,6 +2009,18 @@


 
+/* handle the new file command */
+static int renewer(void)
+{
+   CHECK_MENU_HOOK("New", DATEDIT_MENU_FILE);
+
+   load(NULL,1);
+   
+   return D_REDRAW;
+}
+
+
+
 /* handle the merge command */
 static int merger(void)
 {




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