Commit febde6d0 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

have GUI get the libdir path from Pd

parent e8bc3c63
......@@ -91,7 +91,7 @@ function finish_build() {
}
function build_index() {
var doc_path = path.join(pdgui.get_gui_dir(), "doc");
var doc_path = path.join(pdgui.get_lib_dir(), "doc");
pdgui.post("doc path is " + doc_path);
dive(doc_path, read_file, finish_build);
}
......
......@@ -2,6 +2,7 @@
var pwd;
var gui_dir;
var lib_dir;
var last_clipboard_data;
exports.set_pwd = function(pwd_string) {
......@@ -20,6 +21,14 @@ exports.get_gui_dir = function() {
return gui_dir;
}
function gui_set_lib_dir(dir) {
lib_dir = dir;
}
exports.get_lib_dir = function() {
return lib_dir;
}
exports.get_pd_opendir = function() {
if (pd_opendir) {
return pd_opendir;
......
......@@ -298,8 +298,8 @@ int sys_main(int argc, char **argv)
return (0);
if (sys_startgui(sys_guidir->s_name)) /* start the gui */
return(1);
/* check if we are unique, otherwise, just focus existing
instance, and if necessary open file inside it */\
/* send the libdir to the GUI */
gui_vmess("gui_set_lib_dir", "s", sys_libdir->s_name);
if (sys_openlist)
{
// send the files to be opened to the GUI. We send them one
......@@ -311,6 +311,10 @@ int sys_main(int argc, char **argv)
gui_vmess("gui_build_filelist", "s", nl->nl_string);
}
}
/* check if we are unique, otherwise, just focus existing
instance, and if necessary open file inside it. This doesn't
yet work with the new GUI because we need to set it up to
allow multiple instances. */
gui_vmess("gui_check_unique", "i", sys_unique);
if (sys_externalschedlib)
return (sys_run_scheduler(sys_externalschedlibname,
......
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