[PD-cvs] pd/src desire.tk,1.1.2.481,1.1.2.482

Mathieu Bouchard matju at users.sourceforge.net
Tue Sep 26 08:20:56 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
Escape key cancels a TextBox edition


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.481
retrieving revision 1.1.2.482
diff -C2 -d -r1.1.2.481 -r1.1.2.482
*** desire.tk	22 Sep 2006 23:37:36 -0000	1.1.2.481
--- desire.tk	26 Sep 2006 06:20:53 -0000	1.1.2.482
***************
*** 1696,1700 ****
  	set @tab_repeats 0
  	# stores which line is the longest if multiple line
! 	set @longline 1 
  	$@canvas obj_in_edit= $self
  	set @selected? 1
--- 1696,1700 ----
  	set @tab_repeats 0
  	# stores which line is the longest if multiple line
! 	set @longline 1
  	$@canvas obj_in_edit= $self
  	set @selected? 1
***************
*** 1730,1733 ****
--- 1730,1734 ----
  	bind $t <Control-Return> "$self key %W %x %y 10 %A 0"
  	bind $t <Return>         "$self unedit"
+ 	bind $t <Escape>         "$self unedit 0"
  	#bind $t <Any-Enter> "puts \"keep compltion box please..........\" "
  	#bind $t <Any-Leave> "puts \"destroy the compltion box please..........\" "
***************
*** 1900,1913 ****
  }
  
! def TextBox unedit {} {
  	if {!$@edit} {return}
  	set @edit 0
  	set c [$@canvas widget]
  	set t $c.${self}text
! 	set propose $c.${self}propose
! 	$self setto [$t get 1.0 "end - 1 chars"]
  	after 1 "destroy $t"
  	if {[winfo exists .completion]} {$@action cancel}
  	focus $c
  }
  
--- 1901,1914 ----
  }
  
! def TextBox unedit {{accept 1}} {
  	if {!$@edit} {return}
  	set @edit 0
  	set c [$@canvas widget]
  	set t $c.${self}text
! 	if {$accept} {$self setto [$t get 1.0 "end - 1 chars"]}
  	after 1 "destroy $t"
  	if {[winfo exists .completion]} {$@action cancel}
  	focus $c
+ 	$self changed
  }
  





More information about the Pd-cvs mailing list