Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4512
Modified Files: Tag: impd_0_37 u_main.tk u_object.tk Log Message: drop patch on main window opens
Index: u_object.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/u_object.tk,v retrieving revision 1.1.2.23 retrieving revision 1.1.2.24 diff -C2 -d -r1.1.2.23 -r1.1.2.24 *** u_object.tk 27 Apr 2004 11:03:31 -0000 1.1.2.23 --- u_object.tk 27 Apr 2004 13:59:23 -0000 1.1.2.24 *************** *** 804,812 **** }
- - #drag'n'drop filer - lappend auto_path . - package require tkdnd - proc dropper_draw {self canvas} { global _ --- 804,807 ----
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.1.1.4.2.7.4.48 retrieving revision 1.1.1.4.2.7.4.49 diff -C2 -d -r1.1.1.4.2.7.4.48 -r1.1.1.4.2.7.4.49 *** u_main.tk 27 Apr 2004 11:03:31 -0000 1.1.1.4.2.7.4.48 --- u_main.tk 27 Apr 2004 13:59:22 -0000 1.1.1.4.2.7.4.49 *************** *** 88,91 **** --- 88,93 ---- }
+ package require tkdnd + # it's unfortunate but we seem to have to turn off global bindings # for Text objects to get control-s and control-t to do what we want for *************** *** 246,257 **** -filetypes { {{pd files} {.pd}} {{max files} {.pat}}} \ -initialdir $pd_opendir] ! if {$filename != ""} { ! set directory [string range $filename 0 [expr [string last / $filename] - 1]] ! set pd_opendir $directory ! set basename [string range $filename [expr [string last / $filename] + 1] end] ! pd "pd open [pdtk_enquote $basename] [pdtk_enquote $directory] ;" ! } }
proc menu_send {} { toplevel .sendpanel --- 248,263 ---- -filetypes { {{pd files} {.pd}} {{max files} {.pat}}} \ -initialdir $pd_opendir] ! if {$filename != ""} {open_file $filename} }
+ proc open_file {filename} { + set directory [string range $filename 0 [expr [string last / $filename] - 1]] + set pd_opendir $directory + set basename [string range $filename [expr [string last / $filename] + 1] end] + pd "pd open [pdtk_enquote $basename] [pdtk_enquote $directory] ;" + } + + dnd bindtarget . text/uri-list <Drop> {open_file %D} + proc menu_send {} { toplevel .sendpanel