Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wilkes
purr-data
Commits
febde6d0
Commit
febde6d0
authored
Feb 21, 2016
by
Jonathan Wilkes
Browse files
have GUI get the libdir path from Pd
parent
e8bc3c63
Changes
3
Hide whitespace changes
Inline
Side-by-side
pd/nw/dialog_search.html
View file @
febde6d0
...
...
@@ -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
);
}
...
...
pd/nw/pdgui.js
View file @
febde6d0
...
...
@@ -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
;
...
...
pd/src/s_main.c
View file @
febde6d0
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment