Commit f45f2444 authored by Albert Gräf's avatar Albert Gräf
Browse files

Backport 'add-to-path' from vanilla rev. c917dd19, to make Gem happy.

parent beafe719
......@@ -31,6 +31,7 @@ void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
void glob_midi_setapi(t_pd *dummy, t_floatarg f);
void glob_start_path_dialog(t_pd *dummy, t_floatarg flongform);
void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
void glob_addtopath(t_pd *dummy, t_symbol *path, t_float saveit);
void glob_start_startup_dialog(t_pd *dummy, t_floatarg flongform);
void glob_startup_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
void glob_ping(t_pd *dummy);
......@@ -168,6 +169,8 @@ void glob_init(void)
gensym("start-path-dialog"), 0);
class_addmethod(glob_pdobject, (t_method)glob_path_dialog,
gensym("path-dialog"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_addtopath,
gensym("add-to-path"), A_SYMBOL, A_DEFFLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_start_startup_dialog,
gensym("start-startup-dialog"), 0);
class_addmethod(glob_pdobject, (t_method)glob_startup_dialog,
......
......@@ -802,6 +802,22 @@ void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
}
}
/* AG 20190801: add one item to search path (backported from
vanilla rev. c917dd19, to make GEM happy). */
void glob_addtopath(t_pd *dummy, t_symbol *path, t_float saveit)
{
t_symbol *s = sys_decodedialog(path);
if (*s->s_name)
{
sys_searchpath = namelist_append_files(sys_searchpath, s->s_name);
if (saveit) {
/* AG: We just ignore this flag for now, later maybe save the
preferences here. GEM doesn't need this, and we don't use
Deken, so we can do without this. */
}
}
}
/* start a startup dialog window */
void glob_start_startup_dialog(t_pd *dummy)
{
......
Supports Markdown
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