[PD-cvs] pd/src desire.tk,1.1.2.458,1.1.2.459

Mathieu Bouchard matju at users.sourceforge.net
Wed Sep 6 01:01:10 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
fixed [bng] bug. merged make_window and init_window. removed some calls to update_size.


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.458
retrieving revision 1.1.2.459
diff -C2 -d -r1.1.2.458 -r1.1.2.459
*** desire.tk	5 Sep 2006 16:36:37 -0000	1.1.2.458
--- desire.tk	5 Sep 2006 23:01:06 -0000	1.1.2.459
***************
*** 1228,1235 ****
      set @editmode $mode
  #    catch {.$self.bbar.edit configure -image icon_mode_$mode}
!     if {$mode} {
! 	.$self.bbar.edit configure -image icon_mode_edit
!     } else {
! 	.$self.bbar.edit configure -image icon_mode_run
      }
      if {[$self look hairstate] && !$@editmode} {$@crosshair erase}
--- 1228,1234 ----
      set @editmode $mode
  #    catch {.$self.bbar.edit configure -image icon_mode_$mode}
!     if {[$self window]} {
!       if {$mode} {set im icon_mode_edit} else {set im icon_mode_run}
!       [$self window].bbar.edit configure -image $im
      }
      if {[$self look hairstate] && !$@editmode} {$@crosshair erase}
***************
*** 1273,1285 ****
      set @wires {}
      set @wires_pair {} ;# stores wires in the format of {0 1 1 0} id {1 1 2 0} id
!     if {$@mapped} { $self make_window}
!     #set @wire_hilite {}
      set @history $history
-     #$self update_title
      $self subscribe $manager
      $self changed
      #$self canvas= $self ;#!@#$ EEVIL
-     #not sure if init should be calling pd, but it fixes the editmode bug for now -chun
-     #pd .$self editmode $@editmode
      set @coords 0
      set @jump 0
--- 1272,1280 ----
      set @wires {}
      set @wires_pair {} ;# stores wires in the format of {0 1 1 0} id {1 1 2 0} id
!     if {$@mapped} {$self init_window} ;#!@#$ @mapped can't possibly be 1 at this point
      set @history $history
      $self subscribe $manager
      $self changed
      #$self canvas= $self ;#!@#$ EEVIL
      set @coords 0
      set @jump 0
***************
*** 1292,1298 ****
      set @keynav_tab_sel "wire"
      set @copy_count 0
!     #set @crosshair [Crosshair new $self]
!     #set @active [Active new $self]
!     #$self editmode= 0
  }
  
--- 1287,1291 ----
      set @keynav_tab_sel "wire"
      set @copy_count 0
!     $self editmode= 0
  }
  
***************
*** 1371,1385 ****
  
  
- def Canvas make_window {} {
-     $self init_window
-     $self new_menubar
-     $self new_binds
-     $self update_title
-     set @crosshair [Crosshair new $self]
-     set @active [Active new $self]
-     $self editmode= 0
- 
- }
- 
  def Canvas getscroll {} {}
  
--- 1364,1367 ----
***************
*** 1410,1413 ****
--- 1392,1400 ----
      wm protocol $win WM_DELETE_WINDOW "$self close"
      focus $c
+     $self new_menubar
+     $self new_binds
+     $self update_title
+     set @crosshair [Crosshair new $self]
+     set @active [Active new $self]
  }
  
***************
*** 1655,1666 ****
  }
  
! def TextBox text= {text} {set @text $text; $self update_size}
  def TextBox text {} {return $text}
  
  def TextBox draw {} {
      global font
!     #$self update_size
!     # "TEXT" is the text label while "text" is the the input text field tk widget
!     #super
      mset {x1 y1} [$self xy]
      if {$@edit} {
--- 1642,1652 ----
  }
  
! def TextBox text= {text} {set @text $text}
  def TextBox text {} {return $text}
  
  def TextBox draw {} {
      global font
!     # "TEXT" is the text label while "text" is the the input text field tk widget.
!     # the text should be drawn before, so that update_size works at the right time.
      mset {x1 y1} [$self xy]
      if {$@edit} {
***************
*** 1668,1673 ****
  	$t configure -width [string length [$t get 0.0 end]]
      } {
- 	#$self item TEXT text [l+ {2 2} [list $x1 $y1]] \
- 	#	-font $font(str) -text $@text -fill [$self look fg] -anchor nw
  	$self item TEXT text [l+ {2 2} [list $x1 $y1]] \
  		-font [$self look fontstring] -text $@text -fill [$self look fg] -anchor nw
--- 1654,1657 ----
***************
*** 1723,1727 ****
  def TextBox after_key {widget} {
  	$widget configure -state normal
- 	$self update_size
  	$self changed
  }
--- 1707,1710 ----
***************
*** 2494,2498 ****
  			if {!$@mapped} {
  			set @mapped 1
! 			$self make_window
  			$self redraw
  			return
--- 2477,2481 ----
  			if {!$@mapped} {
  			set @mapped 1
! 			$self init_window
  			$self redraw
  			return
***************
*** 2510,2514 ****
  	
  	if {$f&8} {$self popup $id [winfo pointerx $c] [winfo pointery $c]; return}
! 	if {!$@editmode} {if {[llength $id]} {$id click $x $y $f $target}; return}
  	if {[llength $@obj_in_edit]} {$@obj_in_edit unedit; set @obj_in_edit {}}
  	set in_selection [expr [lsearch $@selection $id]>=0]
--- 2493,2503 ----
  	
  	if {$f&8} {$self popup $id [winfo pointerx $c] [winfo pointery $c]; return}
! 	if {!$@editmode} {
! 		if {[llength $id]} {
! 			puts "target = $target"
! 			$id click $x $y $f $target
! 		}
! 		return
! 	}
  	if {[llength $@obj_in_edit]} {$@obj_in_edit unedit; set @obj_in_edit {}}
  	set in_selection [expr [lsearch $@selection $id]>=0]
***************
*** 4200,4204 ****
  def Bang init {mess} {
  	super $mess
- 	set @w 15
  	set @flash 0
  	set @count 0
--- 4189,4192 ----





More information about the Pd-cvs mailing list