[PD-cvs] pd/src desire.tk,1.1.2.141,1.1.2.142

chunlee chunlee at users.sourceforge.net
Fri Feb 10 17:03:45 CET 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
ctrl+e to switch between edit and run mode works now. the checkbox of 
"Edit Mode" widget in the edit menu will also follow the changes.



Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.141
retrieving revision 1.1.2.142
diff -C2 -d -r1.1.2.141 -r1.1.2.142
*** desire.tk	16 Dec 2005 19:26:44 -0000	1.1.2.141
--- desire.tk	10 Feb 2006 16:03:41 -0000	1.1.2.142
***************
*** 929,935 ****
  def canvas editmode {} {return $@editmode}
  def canvas editmode= {mode} {
!     global look
!     .$self.m.edit entryconfigure [say edit_mode] -indicatoron 1
      set @editmode $mode
      catch {.$self.bbar.edit configure -image icon_mode_$mode}
      .$self.c configure -background [if $@editmode {concat $look(canvasbgedit)} {concat $look(canvasbgrun)}]
--- 929,936 ----
  def canvas editmode {} {return $@editmode}
  def canvas editmode= {mode} {
!     global look edit_toggle
      set @editmode $mode
+     #sets the edit_toggle so the edit mode checkbox will follow if key binding is used
+     set edit_toggle $@editmode
      catch {.$self.bbar.edit configure -image icon_mode_$mode}
      .$self.c configure -background [if $@editmode {concat $look(canvasbgedit)} {concat $look(canvasbgrun)}]
***************
*** 1146,1154 ****
  
      $m.edit add checkbutton -label [say edit_mode] \
! 	-selectcolor grey85 -command "menu_editmode $name" \
! 	-accelerator [accel_munge "Ctrl+e"] -indicatoron 1
!     # if {!$editable} {$m.edit entryconfigure "Edit mode" -huh??}
!     # it's not -indicatoron for checking a box. it should be always on.
! 
      $m.edit   configure -postcommand "$self fix_edit_menu"
      $m.window configure -postcommand "menu_fixwindowmenu"
--- 1147,1157 ----
  
      $m.edit add checkbutton -label [say edit_mode] \
!     	-selectcolor grey0 -command "menu_editmode $name" \
!     	-accelerator [accel_munge "Ctrl+e"] -indicatoron 1 \
! 	-variable edit_toggle -onvalue 1 -offvalue 0
!     #binds the state of the checkbox to global variable edit_toggle
!     
!     dict append @accels "Ctrl+e" "menu_editmode $name"
!     
      $m.edit   configure -postcommand "$self fix_edit_menu"
      $m.window configure -postcommand "menu_fixwindowmenu"
***************
*** 1164,1169 ****
  
  proc menu_editmode {name} {
!     global _
!     puts "name: $name"
      pd $name editmode 0
  }
--- 1167,1171 ----
  
  proc menu_editmode {name} {
!     global _ edit_toggle
      pd $name editmode 0
  }
***************
*** 1841,1845 ****
      if {$key == "KP_Delete"} {set key 127; set keynum 127}
      if {$iso != ""} {scan $iso %c key}
!     puts "focus = $@focus"
      if {$key == 8} {
  	if {[llength $@selection] > 0} {$self delete_selection}
--- 1843,1847 ----
      if {$key == "KP_Delete"} {set key 127; set keynum 127}
      if {$iso != ""} {scan $iso %c key}
!     #puts "focus = $@focus"
      if {$key == 8} {
  	if {[llength $@selection] > 0} {$self delete_selection}





More information about the Pd-cvs mailing list