[PD-cvs] pd/src desire.tk,1.1.2.418,1.1.2.419
chunlee
chunlee at users.sourceforge.net
Tue Aug 29 13:58:59 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18466
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
tab keyboard traversal for dialog window
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.418
retrieving revision 1.1.2.419
diff -C2 -d -r1.1.2.418 -r1.1.2.419
*** desire.tk 29 Aug 2006 00:07:17 -0000 1.1.2.418
--- desire.tk 29 Aug 2006 11:58:56 -0000 1.1.2.419
***************
*** 1062,1101 ****
read_ddrc
#-----------------------------------------------------------------------------------#
- proc read_ddrc2 {} {
- set fd [open "~/.ddrc2" "RDONLY CREAT"]
- puts "fd: $fd"
- set contents {}
- #foreach line [split [read $fd] "\n"] {
- # if {[string index $line 0] != "#"} {lappend contents [string trimleft $line]}
- #}
- set contents [read $fd]
- close $fd
- #set contents [concat [join $contents " "]] ;# concat casts to list type (faster)
-
- foreach {section value} $contents {
- puts "$section"
- foreach {class value} $value {
- puts " $class"
- foreach {var value} $value {
- puts " $var :: $value"
- }
- }
- }
- #for {set i 0} {$i < [llength $contents]} {incr i 2} {
- # set conf [lindex $contents $i]
- # puts "$conf"
- # for {set n 0} {$n < [llength [lindex $contents [expr $i+1]]]} {incr n 2} {
- # set class [lindex [lindex $contents [expr $i+1]] $n]
- # puts " $class"
- # for {set v 0} {$v < [llength [lindex [lindex $contents [expr $i+1]] [expr $n+1]]]} {incr v 2} {
- # set var [lindex [lindex [lindex [lindex $contents [expr $i+1]] [expr $n+1]]] $v]
- # set val [lindex [lindex [lindex [lindex $contents [expr $i+1]] [expr $n+1]]] [expr $v+1]]
- # puts " $var : $val"
- # }
- # }
- #}
- }
- #read_ddrc2
- #-----------------------------------------------------------------------------------#
set pd_apilist "{ALSA 1}"
--- 1062,1065 ----
***************
*** 5312,5334 ****
def Dialog init {args} {
! super
! set f .$self
! set @max_label 0
! toplevel $f
! frame $f.buttonsep -height 2 -borderwidth 1 -relief sunken
! frame $f.buttonframe
! set i 0
! foreach a $args {
! if {[llength $args]<=1 || $i>0} {
! pack [label $f.buttonframe.$i -width 1] -side left -fill x -expand 1
}
! pack [button $f.buttonframe.$a -text [say $a] -command "$self $a"] -side left
! incr i
! }
! pack $f.buttonframe -side bottom -fill x -expand 1 -pady 2m
! pack $f.buttonsep -side bottom -fill x
! wm protocol $f WM_DELETE_WINDOW "$self cancel"
}
def Dialog dropmenu_open {frame} {
set x [winfo rootx $frame.butt]
--- 5276,5310 ----
def Dialog init {args} {
! super
! set f .$self
! set @max_label 0
! toplevel $f
! frame $f.buttonsep -height 2 -borderwidth 1 -relief sunken
! frame $f.buttonframe
! set i 0
! foreach a $args {
! if {[llength $args]<=1 || $i>0} {
! pack [label $f.buttonframe.$i -width 1] -side left -fill x -expand 1
! }
! pack [button $f.buttonframe.$a -text [say $a] -command "$self $a"] -side left
! bind $f.buttonframe.$a <Return> "$self $a"
! incr i
}
! pack $f.buttonframe -side bottom -fill x -expand 1 -pady 2m
! pack $f.buttonsep -side bottom -fill x
! wm protocol $f WM_DELETE_WINDOW "$self cancel"
! bind .$self <Tab> "$self traversal %K %W forward"
! bind .$self <Control-Tab> "$self traversal %K %W back"
}
+ def Dialog traversal {k w direction} {
+ #puts "$k $w $direction"
+ switch $direction {
+ forward {focus [tk_focusNext $w]}
+ back {focus [tk_focusPrev $w]}
+ }
+ }
+
+
def Dialog dropmenu_open {frame} {
set x [winfo rootx $frame.butt]
***************
*** 5398,5405 ****
def PagedDialog add_section {section text} {
! set f .$self.1
! frame $f.main.$section
! pack [button $f.bar.$section -text $text \
! -command [list $self page_select $section]] -side left -pady {4 4}
}
--- 5374,5382 ----
def PagedDialog add_section {section text} {
! set f .$self.1
! frame $f.main.$section
! pack [button $f.bar.$section -text $text \
! -command [list $self page_select $section]] -side left -pady {4 4}
! bind $f.bar.$section <Return> "$self page_select $section"
}
***************
*** 5476,5483 ****
def SubPagedDialog add_section {section text} {
! set f .$self
! frame $f.main.$section
! pack [button $f.bar.$section -text $text \
! -command [list $self page_select $section]] -side left -pady {4 4}
}
--- 5453,5461 ----
def SubPagedDialog add_section {section text} {
! set f .$self
! frame $f.main.$section
! pack [button $f.bar.$section -text $text \
! -command [list $self page_select $section]] -side left -pady {4 4}
! bind $f.bar.$section <Return> "$self page_select $section"
}
***************
*** 6035,6038 ****
--- 6013,6017 ----
$self page_select 1
}
+
############ font bomb ###########
More information about the Pd-cvs
mailing list