diff options
author | wordtech <wordtech@f3661a36-4baa-549a-d6c7-40e0ffef350e> | 2009-12-21 04:52:48 (GMT) |
---|---|---|
committer | wordtech <wordtech@f3661a36-4baa-549a-d6c7-40e0ffef350e> | 2009-12-21 04:52:48 (GMT) |
commit | 3877c83502e5c7ea381027c7b8a03c2a309c59cf (patch) | |
tree | 692d09b4f5182ac64c214b80c1a5087663a8d0aa /library/tkdnd.tcl | |
parent | d3a3f51736ab1b2e15fcc1a6e981469b54af14a3 (diff) | |
download | tkdnd-3877c83502e5c7ea381027c7b8a03c2a309c59cf.zip tkdnd-3877c83502e5c7ea381027c7b8a03c2a309c59cf.tar.gz tkdnd-3877c83502e5c7ea381027c7b8a03c2a309c59cf.tar.bz2 |
Additional Mac OS X updates--track drag widget via array lookup
Diffstat (limited to 'library/tkdnd.tcl')
-rw-r--r-- | library/tkdnd.tcl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/tkdnd.tcl b/library/tkdnd.tcl index d2d31a7..1d494a7 100644 --- a/library/tkdnd.tcl +++ b/library/tkdnd.tcl @@ -47,7 +47,7 @@ namespace eval tkdnd { variable _platform_namespace variable _drop_file_temp_dir variable _auto_update 1 - global _macpath + global _macpath ;#put array of Mac drop targets in global namespace bind TkDND_Drag1 <ButtonPress-1> {tkdnd::_begin_drag press %W %s %X %Y} bind TkDND_Drag1 <B1-Motion> {tkdnd::_begin_drag motion %W %s %X %Y} @@ -130,7 +130,6 @@ namespace eval tkdnd { source $dir/tkdnd_macosx.tcl set _platform_namespace macdnd load $dir/$PKG_LIB_FILE $PACKAGE_NAME - set _macpath {} } } source $dir/tkdnd_compat.tcl @@ -192,9 +191,10 @@ proc tkdnd::drop_target { mode path { types {} } } { } aqua { global _macpath - macdnd::registerdragwidget [winfo toplevel $path] $types - set _macpath $path - return $_macpath + global _mactypes ;#list of registered drag types + macdnd::registerdragwidget $path $types + set _macpath($path) $path + set _mactypes $types } } set old_types [bind $path <<DropTargetTypes>>] @@ -212,7 +212,7 @@ proc tkdnd::drop_target { mode path { types {} } } { } aqua { global _macpath - macdnd::unregisterdragwidget [winfo toplevel $path] + macdnd::unregisterdragwidget _macpath($path) } } bind $path <<DropTargetTypes>> {} |