Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8147
Modified Files: Tag: desiredata desire.tk Log Message: compatibility with recent 8.5; removed some slow operations (that cause a redraw of the whole canvas)
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.396 retrieving revision 1.1.2.600.2.397 diff -C2 -d -r1.1.2.600.2.396 -r1.1.2.600.2.397 *** desire.tk 18 Aug 2007 07:01:37 -0000 1.1.2.600.2.396 --- desire.tk 18 Aug 2007 17:15:52 -0000 1.1.2.600.2.397 *************** *** 200,204 **** }
! if {$tcl_version>=8.5} { #def Observable changed {args} { # puts "Observable changed $self called from [info level [expr [info level]-2]]" --- 200,204 ---- }
! if {$have_expand} { #def Observable changed {args} { # puts "Observable changed $self called from [info level [expr [info level]-2]]" *************** *** 1325,1329 **** set tags [concat $tags [$self classtags]] } ! if {$tcl_version>=8.5} { append item { if {![llength [$c gettags $ss]]} { --- 1325,1329 ---- set tags [concat $tags [$self classtags]] } ! if {$have_expand} { append item { if {![llength [$c gettags $ss]]} { *************** *** 1624,1629 **** def Canvas editmode {} {return $@editmode} def Canvas editmode= {mode} { if {!$mode} {$self deselect_all} ! $self redraw set @editmode $mode; $self changed editmode # catch {.$self.bbar.edit configure -image icon_mode_$mode} --- 1624,1630 ---- def Canvas editmode {} {return $@editmode} def Canvas editmode= {mode} { + if {$mode == $@editmode} {return} if {!$mode} {$self deselect_all} ! $self redraw ;# why this??? set @editmode $mode; $self changed editmode # catch {.$self.bbar.edit configure -image icon_mode_$mode} *************** *** 1881,1885 **** if {$y2 > 100} {set ymax $y2} set bbox [list $xmin $ymin $xmax $ymax] ! $c configure -scrollregion $bbox set @bbox $bbox } --- 1882,1888 ---- if {$y2 > 100} {set ymax $y2} set bbox [list $xmin $ymin $xmax $ymax] ! set oldbbox [$c cget -scrollregion] ! # it is very inefficient to call "configure" here ! if {"$oldbbox" != "$bbox"} {$c configure -scrollregion $bbox} set @bbox $bbox } *************** *** 4344,4353 ****
def Canvas click_on_nothing {f target x y} { ! [$self widget] configure -cursor {} if {$@focus != ""} {if {[[$@focus class] <= TextBox]} {$@focus unedit}} if {$@action == "insert"} {return} if {![expr $f&255]} { $self deselect_all ! $self click_deselect_io } switch $@action { --- 4347,4357 ----
def Canvas click_on_nothing {f target x y} { ! # this cget check actually saves a full tk redraw ! if {[[$self widget] cget -cursor] != {}} {[$self widget] configure -cursor {}} if {$@focus != ""} {if {[[$@focus class] <= TextBox]} {$@focus unedit}} if {$@action == "insert"} {return} if {![expr $f&255]} { $self deselect_all ! #$self click_deselect_io } switch $@action { *************** *** 4395,4399 **** } else {$self unclick_runmode $target $f $x $y} $self adjust_scrollbars ! $self checkgeometry }
--- 4399,4403 ---- } else {$self unclick_runmode $target $f $x $y} $self adjust_scrollbars ! #$self checkgeometry }
*************** *** 4430,4434 **** def Canvas get_bbox {} {return $@bbox}
! if {$tcl_version>=8.5} { def Canvas notice {origin args} {$self child_changed $origin {expand}$args} } else { --- 4434,4438 ---- def Canvas get_bbox {} {return $@bbox}
! if {$have_expand} { def Canvas notice {origin args} {$self child_changed $origin {expand}$args} } else { *************** *** 4936,4940 **** $self update_hilite_io # if {[$self class] == "Canvas"} {$self restack} - puts "elapsed exists: [info exists @elapsed]" if {[info exists @elapsed]} { mset {x1 y1 x2 y2} [$self bbox] --- 4940,4943 ---- *************** *** 5927,5931 ****
def FloatBox calc {x y x1 y1} { ! puts "$@min $@max" if {!$@min && !$@max} { set d [expr $@ovalue+($y1-$y)*$@rate] --- 5930,5934 ----
def FloatBox calc {x y x1 y1} { ! #puts "$@min $@max" if {!$@min && !$@max} { set d [expr $@ovalue+($y1-$y)*$@rate]