aboutsummaryrefslogtreecommitdiff
path: root/pd/src/x_gui.c
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-09-23 00:21:28 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-09-23 00:21:28 +0000
commit64fdb009695828b788fce074135b20a5e52c5fc4 (patch)
treea05144197dd339721b6d4a3a0927f7596e8872b6 /pd/src/x_gui.c
parenta30193fcd726552364de74984b200be2c30723e7 (diff)
imported version 0.37-0
svn path=/trunk/; revision=1016
Diffstat (limited to 'pd/src/x_gui.c')
-rw-r--r--pd/src/x_gui.c16
1 files changed, 6 insertions, 10 deletions
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);