aboutsummaryrefslogtreecommitdiff
path: root/patches-on-pdwindow-plugin.tcl
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-11-25 05:08:24 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-11-25 05:08:24 +0000
commit66c7a05ffae88f4ccbc81418b7d22f3ba19bc389 (patch)
treef19dad4c288a073e259e3cf10858dcde1e258b89 /patches-on-pdwindow-plugin.tcl
first working sketches of new Drag-n-Drop behaviors with tkdndHEADsvn2git-rootsvn2git-headscripts/guiplugins/dropsuite-plugin
svn path=/trunk/scripts/guiplugins/dropsuite-plugin/; revision=16580
Diffstat (limited to 'patches-on-pdwindow-plugin.tcl')
-rw-r--r--patches-on-pdwindow-plugin.tcl16
1 files changed, 16 insertions, 0 deletions
diff --git a/patches-on-pdwindow-plugin.tcl b/patches-on-pdwindow-plugin.tcl
new file mode 100644
index 0000000..c363a30
--- /dev/null
+++ b/patches-on-pdwindow-plugin.tcl
@@ -0,0 +1,16 @@
+# open all files dropped on the Pd Window
+
+package require tkdnd
+
+namespace eval ::patches_on_pdwindow {
+}
+
+::tkdnd::drop_target register .pdwindow DND_Files
+bind .pdwindow <<Drop:DND_Files>> {::patches_on_pdwindow::open_dropped_files %D}
+
+proc ::patches_on_pdwindow::open_dropped_files {files} {
+ foreach file $files {
+ open_file $file
+ }
+ return "link"
+}