From 64fdb009695828b788fce074135b20a5e52c5fc4 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 23 Sep 2003 00:21:28 +0000 Subject: imported version 0.37-0 svn path=/trunk/; revision=1016 --- pd/src/x_gui.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'pd/src/x_gui.c') diff --git a/pd/src/x_gui.c b/pd/src/x_gui.c index 03e1b0dd..b469467a 100644 --- a/pd/src/x_gui.c +++ b/pd/src/x_gui.c @@ -48,19 +48,15 @@ void gfxstub_new(t_pd *owner, void *key, const char *cmd) char namebuf[80]; t_gfxstub *x; t_symbol *s; - /* if any exists with matching key, no need to make a - new one; just tell tk to send it front. */ + /* if any exists with matching key, burn it. */ for (x = gfxstub_list; x; x = x->x_next) - { if (x->x_key == key) - { - sys_vgui("raise .gfxstub%x\n", x); - sys_vgui("focus .gfxstub%x\n", x); - return; - } - } - if (strlen(cmd) + 84 > MAXPDSTRING) + gfxstub_deleteforkey(key); + if (strlen(cmd) + 50 > MAXPDSTRING) + { + bug("audio dialog too long"); return; + } x = (t_gfxstub *)pd_new(gfxstub_class); sprintf(namebuf, ".gfxstub%x", (t_int)x); -- cgit v1.2.1