diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-09 16:41:04 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-09 16:41:04 +0000 |
commit | e1fc51c3a1d944193032d8bb1d95741d090b6d3b (patch) | |
tree | 7a2121c73a5acb69a080e73ad8e3b50cc3670616 /pd/tcl/wheredoesthisgo.tcl | |
parent | 21c068f1916330e90f814bed461fe0821d1665ec (diff) |
checked in pd-0.43-1test4.src.tar.gz
svn path=/trunk/; revision=15558
Diffstat (limited to 'pd/tcl/wheredoesthisgo.tcl')
-rw-r--r-- | pd/tcl/wheredoesthisgo.tcl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/pd/tcl/wheredoesthisgo.tcl b/pd/tcl/wheredoesthisgo.tcl index 1e9e0344..acee40c0 100644 --- a/pd/tcl/wheredoesthisgo.tcl +++ b/pd/tcl/wheredoesthisgo.tcl @@ -6,15 +6,14 @@ package provide wheredoesthisgo 0.1 proc open_file {filename} { set directory [file normalize [file dirname $filename]] set basename [file tail $filename] - if {[regexp -nocase -- "\.(pd|pat|mxt)$" $filename]} { + if { + [file exists $filename] + && [regexp -nocase -- "\.(pd|pat|mxt)$" $filename] + } then { ::pdtk_canvas::started_loading_file [format "%s/%s" $basename $filename] pdsend "pd open [enquote_path $basename] [enquote_path $directory]" - # remove duplicates first, then the duplicate added after to the top - set index [lsearch -exact $::recentfiles_list $filename] - set ::recentfiles_list [lreplace $::recentfiles_list $index $index] - lappend ::recentfiles_list $filename - set ::recentfiles_list [lrange $::recentfiles_list 0 $::total_recentfiles] - ::pd_menus::update_recentfiles_menu + # now this is done in pd_guiprefs + ::pd_guiprefs::update_recentfiles $filename } { ::pdwindow::post [format [_ "Ignoring '%s': doesn't look like a Pd-file"] $filename] } |