[PD-cvs] pd/src desire.tk,1.1.2.600.2.394,1.1.2.600.2.395

chunlee chunlee at users.sourceforge.net
Sat Aug 18 06:45:58 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31452

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
some fixes


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.394
retrieving revision 1.1.2.600.2.395
diff -C2 -d -r1.1.2.600.2.394 -r1.1.2.600.2.395
*** desire.tk	18 Aug 2007 00:56:24 -0000	1.1.2.600.2.394
--- desire.tk	18 Aug 2007 04:45:54 -0000	1.1.2.600.2.395
***************
*** 1481,1484 ****
--- 1481,1485 ----
  		#can't wait till @mapped get updated thru proc change
  		if {$@gop} {foreach x [$@objects values] {$x outside_of_the_box}}
+ 		$self save_geometry
  		netsend [list .$self vis 0]
  		#netsend [list .$self close]
***************
*** 1499,1505 ****
  def Canvas save_geometry {} {
  	set geometry [wm geometry .$self]
! 	puts "geometry $geometry"
  	foreach {size x y} [split $geometry "+"] {mset {w h} [split $size "x"]; set x1 $x; set y1 $y}
! 	netsend [list .$self bounds $x1 $y1 [expr $x1+$w] [expr $y1+$h]]
  }
  
--- 1500,1507 ----
  def Canvas save_geometry {} {
  	set geometry [wm geometry .$self]
! 	set cw [winfo width [$self widget]]; set ch [winfo height [$self widget]]
  	foreach {size x y} [split $geometry "+"] {mset {w h} [split $size "x"]; set x1 $x; set y1 $y}
! 	set x2 [expr $x1+$cw]; set y2 [expr $y1+$ch]
! 	netsend [list .$self bounds $x1 $y1 $x2 $y2]
  }
  
***************
*** 1809,1814 ****
      # turn statusbar on/off
      if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
!     pack [canvas $c -width [lindex $@canvas_size 0] -height [lindex $@canvas_size 1] -background white] \
! 	-side left -expand 1 -fill both
      set @yscroll $win.yscroll; set @xscroll $win.xscroll
      $self init_scrollbars
--- 1811,1817 ----
      # turn statusbar on/off
      if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
!     set w [expr [lindex $@canvas_size 0]-4];# dd canvas is 4 pixel out with pd canvas? 
!     set h [expr [lindex $@canvas_size 1]-4]   
!     pack [canvas $c -width $w -height $h -background white] -side left -expand 1 -fill both
      set @yscroll $win.yscroll; set @xscroll $win.xscroll
      $self init_scrollbars
***************
*** 2422,2425 ****
--- 2425,2429 ----
  	if {$event == "ButtonPress"} {lappend @list [lreplace $mess 0 0 "Motion"]}
  	lappend @list $mess
+ 	puts "adding mess: \t $mess"
  }
  
***************
*** 2451,2454 ****
--- 2455,2459 ----
  	set focus [string range [focus] 1 [string first . [focus] 2]-1]
  	set step [lindex $@list $@idx]
+ 	puts "\t $step"
  	mset {event widget x y mode k kval} $step
  	switch $event {
***************
*** 2493,2497 ****
  	event generate $w <$name> -x $x -y $y
  	if {$event=="KeyPress"} {event generate $w <KeyRelease-$k> -x $x -y $y}
- 	puts "playing <$name> -x $x -y $y"
  	$self play $@delay
  }
--- 2498,2501 ----
***************
*** 2522,2525 ****
--- 2526,2531 ----
  }
  
+ def Macro reset {} {set @idx 0}
+ 
  set ::macro [Macro new]
  set ::macro_state 0
***************
*** 2529,2532 ****
--- 2535,2539 ----
  def Canvas macro_play {} {
  	mset {x y} $@click_at
+ 	$::macro reset 
  	$::macro play [$::macro delay]
  	#$::macro test_playable $x $y
***************
*** 5127,5130 ****
--- 5134,5138 ----
  	if {[llength $@macro_q]} {
  		set w [focus]
+ 		puts "focus ::: \t $w"
  		set m [lindex $@macro_q 0]
  		set fudge 0
***************
*** 5142,5148 ****
  			default {puts "Error: this event should not have been here.."}
  		}
! 		if {$fudge} {event generate $w <Motion> -x $x -y $y}
  		event generate $w <$name> -x $x -y $y
! 		if {$event=="key"} {event generate $w <KeyRelease-$k> -x $x -y $y}
  		set @macro_q [lreplace $@macro_q 0 0]
  		after $delay [list $self macro_schedule $@macro_delay] $obj
--- 5150,5157 ----
  			default {puts "Error: this event should not have been here.."}
  		}
! 		if {$fudge} {event generate $w <Motion> -x $x -y $y; puts "fudge motion::: $w"}
  		event generate $w <$name> -x $x -y $y
! 		puts "event generate $w <$name> -x $x -y $y"
! 		if {$event=="key"} {event generate $w <KeyRelease-$k> -x $x -y $y; puts "fudge key:::: $w"}
  		set @macro_q [lreplace $@macro_q 0 0]
  		after $delay [list $self macro_schedule $@macro_delay] $obj
***************
*** 7031,7035 ****
  	bind $f       <KeyPress> "$self key %K 0"
  	bind $f <Shift-KeyPress> "$self key %K 1"
! 	bind $@textbox <Tab>      "$self key %K ; break"
  	bind $@textbox <KeyPress> "$self key %K "
  	focus .$self.comp
--- 7040,7044 ----
  	bind $f       <KeyPress> "$self key %K 0"
  	bind $f <Shift-KeyPress> "$self key %K 1"
! 	bind $@textbox <Tab>      "$self key %K; break"
  	bind $@textbox <KeyPress> "$self key %K "
  	focus .$self.comp
***************
*** 7114,7118 ****
  			switch $self {
  				browser {$self fill_box [$@textbox get]}
! 				completion {$self adjust_box; $@textself resize BackSpace; $@textself changed}
  			}
  		}
--- 7123,7127 ----
  			switch $self {
  				browser {$self fill_box [$@textbox get]}
! 				completion {$self adjust_box; $@textself resize; $@textself changed}
  			}
  		}
***************
*** 7677,7681 ****
  	bind .$self         <Tab> "$self traversal %K %W forward"
  	bind .$self <Control-Tab> "$self traversal %K %W back"
- 	
  }
  
--- 7686,7689 ----





More information about the Pd-cvs mailing list