From d3c7d646709be13f96b6b7ca6a2c9403150a0e47 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 13 Apr 2010 00:07:43 +0000 Subject: 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 --- pddplink.tcl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pddplink.tcl (limited to 'pddplink.tcl') 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" + } +} -- cgit v1.2.1