diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2003-09-11 09:04:32 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2003-09-11 09:04:32 +0000 |
commit | 49cc44f855c16ae11988e9ff3739fdc01ac8aebe (patch) | |
tree | 4a47d1b56d0cda8f8f34965c881c0bba1e4f46fd /cyclone/sickle/sickle.c | |
parent | 53f05d96ff8e49c87977fa91a06ebade8893606e (diff) |
*** empty log message ***
svn path=/trunk/externals/miXed/; revision=947
Diffstat (limited to 'cyclone/sickle/sickle.c')
-rw-r--r-- | cyclone/sickle/sickle.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cyclone/sickle/sickle.c b/cyclone/sickle/sickle.c index 765209a..8df7974 100644 --- a/cyclone/sickle/sickle.c +++ b/cyclone/sickle/sickle.c @@ -27,21 +27,24 @@ static void sickle_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av) import_max(fn->s_name, ""); } -static void sickle_import(t_sickle *x, t_symbol *fn, t_symbol *dir) +static void sickle_doimport(t_sickle *x, t_symbol *fn, t_symbol *dir) { + if (!dir || dir == &s_) dir = x->x_dir; if (fn && fn != &s_) - { - if (!dir || dir == &s_) dir = x->x_dir; import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : ""); - } else - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, dir); } static void sickle_click(t_sickle *x, t_floatarg xpos, t_floatarg ypos, - t_floatarg shift, t_floatarg ctrl, t_floatarg alt) + t_floatarg shift, t_floatarg ctrl, t_floatarg alt) +{ + sickle_doimport(x, 0, 0); +} + +static void sickle_import(t_sickle *x, t_symbol *fn) { - sickle_import(x, 0, 0); + sickle_doimport(x, fn, 0); } static void sickle_bang(t_sickle *x) @@ -82,7 +85,7 @@ void sickle_setup(void) sizeof(t_sickle), 0, A_DEFSYM, 0); class_addbang(sickle_class, sickle_bang); class_addmethod(sickle_class, (t_method)sickle_import, - gensym("import"), A_DEFSYM, A_DEFSYM, 0); + gensym("import"), A_DEFSYM, 0); class_addmethod(sickle_class, (t_method)sickle_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); |