aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-10-29 18:58:45 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-10-29 18:58:45 +0000
commit620820b6836f0c7b3a3431d402a07dc25ee89adc (patch)
tree92080d32e2879342736cdfe2b1164670ecbb998e
parent480c4de5dfb157780cef7e764596d2506fcca1c3 (diff)
Following this thread:
http://lists.puredata.info/pipermail/pd-dev/2007-10/009797.html I have changed the save functions so that they will save the name of the object that it was actually instantiated with. This allows objects with savefns to work properly with namespaces. This is a fix for this bug: http://sourceforge.net/tracker/index.php?&aid=1818219&group_id=55736&atid=478070 svn path=/trunk/externals/moonlib/; revision=8902
-rw-r--r--gamme.c3
-rw-r--r--image.c3
-rw-r--r--mknob.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/gamme.c b/gamme.c
index 25577b9..59d327e 100644
--- a/gamme.c
+++ b/gamme.c
@@ -300,7 +300,8 @@ static void gamme_save(t_gobj *z, t_binbuf *b)
binbuf_addv(b, "ssiisiiiiiiiiiiiiii", gensym("#X"),gensym("obj"),
(t_int)x->x_obj.te_xpos, (t_int)x->x_obj.te_ypos,
- gensym("gamme"),x->x_width,x->x_height,
+ atom_getsymbol(binbuf_getvec(x->x_obj.te_binbuf)),
+ x->x_width,x->x_height,
c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11]);
binbuf_addv(b, ";");
}
diff --git a/image.c b/image.c
index a9b5876..c9ceac4 100644
--- a/image.c
+++ b/image.c
@@ -173,7 +173,8 @@ static void image_save(t_gobj *z, t_binbuf *b)
t_image *x = (t_image *)z;
binbuf_addv(b, "ssiissi", gensym("#X"),gensym("obj"),
x->x_obj.te_xpix, x->x_obj.te_ypix,
- gensym("image"),x->x_image,x->x_type);
+ atom_getsymbol(binbuf_getvec(x->x_obj.te_binbuf)),
+ x->x_image,x->x_type);
binbuf_addv(b, ";");
}
diff --git a/mknob.c b/mknob.c
index 1529ab2..d1f4bd0 100644
--- a/mknob.c
+++ b/mknob.c
@@ -268,7 +268,8 @@ static void mknob_save(t_gobj *z, t_binbuf *b)
ip2 = (int *)(&x->x_gui.x_fsf);
binbuf_addv(b, "ssiisiiffiisssiiiiiiiii", gensym("#X"),gensym("obj"),
(t_int)x->x_gui.x_obj.te_xpix, (t_int)x->x_gui.x_obj.te_ypix,
- gensym("mknob"), x->x_gui.x_w, x->x_gui.x_h,
+ atom_getsymbol(binbuf_getvec(x->x_obj.te_binbuf)),
+ x->x_gui.x_w, x->x_gui.x_h,
(float)x->x_min, (float)x->x_max,
x->x_lin0_log1, (*ip1)&IEM_INIT_ARGS_ALL,
srl[0], srl[1], srl[2],