Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2612
Modified Files: Tag: desiredata desire.tk Log Message: Visual Diff
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.358 retrieving revision 1.1.2.600.2.359 diff -C2 -d -r1.1.2.600.2.358 -r1.1.2.600.2.359 *** desire.tk 12 Aug 2007 22:09:41 -0000 1.1.2.600.2.358 --- desire.tk 13 Aug 2007 06:19:58 -0000 1.1.2.600.2.359 *************** *** 1124,1127 **** --- 1124,1133 ---- }
+ set image_filetypes { + {"image files" ".gif .png"} + {"gif files" ".gif"} + {"png files" ".png"} + {"all files" "*"} + }
#only works with tcltk 8.5 *************** *** 1825,1829 **** catch {wm iconphoto $win icon_pd} set @menubar $win.m ! $self new_menubar # turn buttonbar on/off set @buttonbar [ButtonBar new $self] --- 1831,1835 ---- catch {wm iconphoto $win icon_pd} set @menubar $win.m ! $self init_menus # turn buttonbar on/off set @buttonbar [ButtonBar new $self] *************** *** 2217,2221 **** def Canvas Array {} {$self editmode= 1; netsend [list .x$self menuarray]}
! def Canvas new_menubar {} { set name .$self set m $name.m --- 2223,2227 ---- def Canvas Array {} {$self editmode= 1; netsend [list .x$self menuarray]}
! def Canvas init_menus {} { set name .$self set m $name.m *************** *** 2226,2230 **** $self populate_menu edit {undo redo {} cut copy paste duplicate select_all subpatcherize {} tidy_up {}} $self populate_menu find {find find_again find_last_error} ! $self populate_menu view {reload redraw} $self populate_menu put {Object Message Number Symbol Comment {} bng tgl nbx vsl hsl vradio hradio vu dropper cnv {} Graph Array} $self populate_menu window {{}} --- 2232,2236 ---- $self populate_menu edit {undo redo {} cut copy paste duplicate select_all subpatcherize {} tidy_up {}} $self populate_menu find {find find_again find_last_error} ! $self populate_menu view {visual_diff {} reload redraw} $self populate_menu put {Object Message Number Symbol Comment {} bng tgl nbx vsl hsl vradio hradio vu dropper cnv {} Graph Array} $self populate_menu window {{}} *************** *** 8657,8660 **** --- 8663,8691 ---- $self selection_move +10 0 } + + #----------------------------------------------------------------- + def Canvas visual_diff {} { + #regsub {.pd} [$self name] {} filename + set filename [$self name] + set initialfile "" + foreach suffix {gif jpg jpeg png} { + set t [$self folder]/$filename.$suffix + post %s $t + if {[file exist $t]} {set initialfile $filename.$suffix; break} + } + set filename [tk_getOpenFile -defaultextension .pd -filetypes $::image_filetypes -initialdir [$self folder] -initialfile $initialfile] + image create photo image_$self -file $filename + $self blink_image + } + + def Canvas blink_image {} { + if {[llength [.$self.c gettags BLINKY]]} { + .$self.c delete BLINKY + } else { + .$self.c create image 0 0 -image image_$self -tag BLINKY -anchor nw + } + after 250 [list $self blink_image] + } + #-----------------------------------------------------------------
*************** *** 8711,8712 **** --- 8742,8745 ---- } } + + def Clipboard1 unknown {args} {puts wheee}