Commit 5a614ede authored by Ivica Bukvic's avatar Ivica Bukvic Committed by Hans-Christoph Steiner
Browse files

Pd-0.42.5-extended-l2ork-dev-20101217.tar.bz2

parent e065dfeb
......@@ -1629,9 +1629,9 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
sys_vgui(".x%x.c itemconfigure %s -outline $select_nlet_color -width $highlight_width\n",
x,
canvas_cnct_outlet_tag);
sys_vgui(".x%x.c raise %s\n",
x,
canvas_cnct_outlet_tag);
//sys_vgui(".x%x.c raise %s\n",
// x,
// canvas_cnct_outlet_tag);
outlet_issignal = obj_issignaloutlet(ob,closest);
}
// jsarlo
......@@ -1958,9 +1958,9 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
sys_vgui(".x%x.c itemconfigure %s -outline $select_nlet_color -width $highlight_width\n",
x,
canvas_cnct_inlet_tag);
sys_vgui(".x%x.c raise %s\n",
x,
canvas_cnct_inlet_tag);
//sys_vgui(".x%x.c raise %s\n",
// x,
// canvas_cnct_inlet_tag);
inlet_issignal = obj_issignaloutlet(ob2, closest2);
}
canvas_setcursor(x, CURSOR_EDITMODE_CONNECT);
......
......@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 42
#define PD_BUGFIX_VERSION 5
#define PD_TEST_VERSION "extended-l2ork-20101216"
#define PD_TEST_VERSION "extended-l2ork-20101217"
/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
......
......@@ -349,7 +349,7 @@ static t_class *sel2_class;
typedef struct _selectelement
{
t_word e_w;
t_atom e_atom;
t_outlet *e_outlet;
} t_selectelement;
......@@ -357,6 +357,7 @@ typedef struct _sel2
{
t_object x_obj;
t_atomtype x_type;
t_int x_mixed;
t_int x_nelement;
t_selectelement *x_vec;
t_outlet *x_rejectout;
......@@ -366,10 +367,10 @@ static void sel2_float(t_sel2 *x, t_float f)
{
t_selectelement *e;
int nelement;
if (x->x_type == A_FLOAT)
if (x->x_type == A_FLOAT || x->x_mixed == 1)
{
for (nelement = x->x_nelement, e = x->x_vec; nelement--; e++)
if (e->e_w.w_float == f)
if (e->e_atom.a_type == A_FLOAT && e->e_atom.a_w.w_float == f)
{
outlet_bang(e->e_outlet);
return;
......@@ -382,10 +383,10 @@ static void sel2_symbol(t_sel2 *x, t_symbol *s)
{
t_selectelement *e;
int nelement;
if (x->x_type == A_SYMBOL)
if (x->x_type == A_SYMBOL || x->x_mixed)
{
for (nelement = x->x_nelement, e = x->x_vec; nelement--; e++)
if (e->e_w.w_symbol == s)
if (e->e_atom.a_type == A_SYMBOL && e->e_atom.a_w.w_symbol == s)
{
outlet_bang(e->e_outlet);
return;
......@@ -431,15 +432,26 @@ static void *select_new(t_symbol *s, int argc, t_atom *argv)
t_selectelement *e;
t_sel2 *x = (t_sel2 *)pd_new(sel2_class);
x->x_nelement = argc;
x->x_type = argv[0].a_type;
t_int f,s = 0;
x->x_vec = (t_selectelement *)getbytes(argc * sizeof(*x->x_vec));
x->x_type = argv[0].a_type;
for (n = 0, e = x->x_vec; n < argc; n++, e++)
{
e->e_outlet = outlet_new(&x->x_obj, &s_bang);
if ((x->x_type = argv->a_type) == A_FLOAT)
e->e_w.w_float = atom_getfloatarg(n, argc, argv);
else e->e_w.w_symbol = atom_getsymbolarg(n, argc, argv);
if (argv[n].a_type == A_FLOAT)
{
e->e_atom.a_w.w_float = atom_getfloatarg(n, argc, argv);
e->e_atom.a_type = A_FLOAT;
f = 1;
}
else
{
e->e_atom.a_w.w_symbol = atom_getsymbolarg(n, argc, argv);
e->e_atom.a_type = A_SYMBOL;
s = 1;
}
}
x->x_mixed = f * s;
x->x_rejectout = outlet_new(&x->x_obj, &s_float);
return (x);
}
......@@ -508,6 +520,8 @@ static void route_list(t_route *x, t_symbol *sel, int argc, t_atom *argv)
{
t_float f;
if (!argc) return;
if (argv->a_type != A_FLOAT)
goto rejected;
f = atom_getfloat(argv);
for (nelement = x->x_nelement, e = x->x_vec; nelement--; e++)
if (e->e_w.w_float == f)
......@@ -569,6 +583,7 @@ static void route_list(t_route *x, t_symbol *sel, int argc, t_atom *argv)
}
}
}
rejected:
outlet_list(x->x_rejectout, 0, argc, argv);
}
......@@ -600,6 +615,12 @@ static void *route_new(t_symbol *s, int argc, t_atom *argv)
e->e_w.w_float = atom_getfloatarg(n, argc, argv);
else e->e_w.w_symbol = atom_getsymbolarg(n, argc, argv);
}
if (argc == 1)
{
if (argv->a_type == A_FLOAT)
floatinlet_new(&x->x_obj, &x->x_vec->e_w.w_float);
else symbolinlet_new(&x->x_obj, &x->x_vec->e_w.w_symbol);
}
x->x_rejectout = outlet_new(&x->x_obj, &s_list);
return (x);
}
......@@ -1259,12 +1280,15 @@ static void makefilename_float(t_makefilename *x, t_floatarg f)
char buf[MAXPDSTRING];
if (x->x_accept == A_FLOAT) {
if (x->x_intconvert)
sprintf(buf, x->x_format->s_name, (int)f);
else
sprintf(buf, x->x_format->s_name, f);
sprintf(buf, x->x_format->s_name, (int)f);
else sprintf(buf, x->x_format->s_name, f);
}
else
sprintf(buf, x->x_format->s_name, "");
{
char buf2[MAXPDSTRING];
sprintf(buf2, "%g", f);
sprintf(buf, x->x_format->s_name, buf2);
}
if (buf[0]!=0)
outlet_symbol(x->x_obj.ob_outlet, gensym(buf));
}
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment