diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-04-13 00:07:43 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-04-13 00:07:43 +0000 |
commit | d3c7d646709be13f96b6b7ca6a2c9403150a0e47 (patch) | |
tree | 786a0f7ccd04db172a70e47592cd7aada6fb7e91 /pddplink.tcl | |
parent | 4eae209a441add9fc52334877a47e5bd8c5641d3 (diff) |
stripped out all Tcl code and replaced it with a single proc that uses the built-in opening functions; fixed some compiler warnings
svn path=/trunk/externals/pddp/; revision=13426
Diffstat (limited to 'pddplink.tcl')
-rw-r--r-- | pddplink.tcl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pddplink.tcl b/pddplink.tcl new file mode 100644 index 0000000..8ae2b33 --- /dev/null +++ b/pddplink.tcl @@ -0,0 +1,13 @@ + +proc pddplink_open {filename dir} { + if {[string first "://" $filename] > -1} { + menu_openhtml $filename + } elseif {[file pathtype $filename] eq "absolute"} { + menu_openhtml $filename + } elseif {[file exists [file join $dir $filename]]} { + menu_doc_open $dir $filename + } else { + bell ;# beep on error to provide instant feedback + pdtk_post "\[pddplink\] ERROR file not found: $filename\n" + } +} |