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
David MacDonald
purr-data
Commits
56e3c5fd
Commit
56e3c5fd
authored
May 30, 2013
by
Ivica Bukvic
Browse files
fixed typo that prevented k12 mode from functioning properly
parent
119fa865
Changes
1
Show whitespace changes
Inline
Side-by-side
pd/src/pd.tk
View file @
56e3c5fd
...
...
@@ -1345,22 +1345,27 @@ proc menu_doc_open {dir basename} {
#
namespace
export
menu_
*
#}
proc
::
menu_doc_open
{
dir
basename
}
{
if
{[
file
pathtype
$
dir
]
eq
"relative"
}
{
set
dirname
"$::sys_libdir/$dir"
}
else
{
set
dirname
$
dir
}
set
textextension
"[string tolower [file extension $basename]]"
if
{[
lsearch
-
exact
[
lindex
$::
filetypes
0
1
]
$
textextension
]
>
-
1
}
{
set
fullpath
[
file
normalize
[
file
join
$
dirname
$
basename
]]
set
dirname
[
file
dirname
$
fullpath
]
set
basename
[
file
tail
$
fullpath
]
pdsend
"pd open [enquote_path $basename] [enquote_path $dirname]"
}
else
{
::
menu_openfile
"$dirname/$basename"
}
}
#
TODO
enquote
a
filename
to
send
it
to
pd
,
" isn't handled properly tho...
#proc enquote_path {message} {
# string map {"
,
" "
\\,
" "
;
" "
\\;
" "
" "
\\
"} $message
#}
#proc ::menu_doc_open {dir basename} {
# if {[file pathtype $dir] eq "
relative
"} {
# set dirname "
$::
sys_libdir
/$
dir
"
# } else {
# set dirname $dir
# }
# set textextension "
[
string
tolower
[
file
extension
$
basename
]]
"
# if {[lsearch -exact [lindex $::filetypes 0 1] $textextension] > -1} {
# set fullpath [file normalize [file join $dirname $basename]]
# set dirname [file dirname $fullpath]
# set basename [file tail $fullpath]
# pdsend "
pd
open
[
enquote_path
$
basename
]
[
enquote_path
$
dirname
]
"
# } else {
# ::menu_openfile "
$
dirname
/$
basename
"
# }
#}
# open HTML docs from the menu using the OS-default HTML viewer
proc ::menu_openfile {filename} {
...
...
@@ -2771,7 +2776,7 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.edit entryconfigure "Edit mode" -background "#7dd37d"
}
if
{
$
autotips
==
1
}
{
if {
$k12_mode == 0 &&
$autotips == 1 } {
$name.m.edit entryconfigure "Autotips" -background "#7dd37d"
}
...
...
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