Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16214
Modified Files: Tag: devel_0_39 desire.tk Log Message: some tidy up
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.404 retrieving revision 1.1.2.405 diff -C2 -d -r1.1.2.404 -r1.1.2.405 *** desire.tk 24 Aug 2006 17:14:00 -0000 1.1.2.404 --- desire.tk 25 Aug 2006 13:46:32 -0000 1.1.2.405 *************** *** 507,589 **** default {error huh??? unknown lang (locale)} } - #-----------------------------------------------------------------------------------# ! #set key(Object) "Ctrl+1" ! #set key(Message) "Ctrl+2" ! #set key(Number) "Ctrl+3" ! #set key(Symbol) "Ctrl+4" ! #set key(Comment) "Ctrl+5" ! #set key(Bang) "Alt+b" ! #set key(Toggle) "Alt+t" ! #set key(Number2) "Alt+n" ! #set key(Vslider) "Alt+v" ! #set key(Hslider) "Alt+h" ! #set key(Vradio) "Alt+d" ! #set key(Hradio) "Alt+i" ! #set key(VU) "Alt+u" ! #set key(dropper) "Alt+x" ! #set key(Canvas) "Alt+c" ! #set key(Graph) "" ! #set key(Array) "" ! #set key(parentwindow) "" ! #set key(Pdwindow) "" ! #set key(new_file) "Ctrl+n" ! #set key(open_file) "Ctrl+o" ! #set key(pdrc_editor) "Ctrl+p" ! #set key(ddrc_editor) "Ctrl+l" ! #set key(send_message) "Ctrl+m" ! #set key(paths) "" ! #set key(quit) "Ctrl+q" ! #set key(find) "Ctrl+f" ! #set key(find_again) "Ctrl+g" ! #set key(find_last_error) "" ! #set key(audio_on) "Ctrl+slash" ! #set key(audio_off) "Ctrl+period" ! #set key(audio_settings) "" ! #set key(midi_settings) "" ! #set key(test_audio_and_midi) "" ! #set key(load_meter) "" ! #set key(latency_meter) "" ! #set key(about) "" ! #set key(class_browser) "" ! #set key(quit) "Ctrl+q" ! #set key(close) "Ctrl+w" ! #set key(save) "Ctrl+s" ! #set key(save_as) "Ctrl+S" ! #set key(cut) "Ctrl+x" ! #set key(copy) "Ctrl+c" ! #set key(print) "Ctrl+p" ! #set key(undo) "Ctrl+z" ! #set key(redo) "Ctrl+Z" ! #set key(paste) "Ctrl+v" ! #set key(duplicate) "Ctrl+d" ! #set key(select_all) "Ctrl+a" ! #set key(text_editor) "Ctrl+t" ! #set key(font_bomb) "" ! #set key(tidy_up) "" ! #set key(reload) "Ctrl+r" ! #set key(redraw) "" ! #set key(crosshair) "" ! #set key(editmodeswitch) "Ctrl+e" ! #set key(popup_properties) "" ! #set key(popup_help) "" ! #set key(popup_open) "" ! #set key(client_class_tree) "Ctrl+grave" ! #set key(key_nav_up) "Ctrl+up" ! #set key(key_nav_down) "Ctrl+down" ! #set key(key_nav_right) "Ctrl+right" ! #set key(key_nav_left) "Ctrl+left" ! #set key(key_nav_up_shift) "Ctrl+UP" ! #set key(key_nav_down_shift) "Ctrl+DOWN" ! #set key(key_nav_right_shift) "Ctrl+RIGHT" ! #set key(key_nav_left_shift) "Ctrl+LEFT" ! #set key(key_nav_ioselect) "Ctrl+tab" ! #set key(incr_zoom) "Ctrl+equal" ! #set key(decr_zoom) "Ctrl+minus" ! ##set accels {} ! ##foreach k [array names key] {dict set accels $key($k) $k}
! set key(Client:Canvas) "Alt+c"
set key(Canvas:Object) "Ctrl+1" set key(Canvas:Message) "Ctrl+2" --- 507,561 ---- default {error huh??? unknown lang (locale)} } #-----------------------------------------------------------------------------------# ! set font(size) 12 ! set font(str2) "-*-courier-medium--normal--%d-*" ! set font(str) [format -*-courier-medium--normal--%d-* $font(size)] ! set font(width) [font measure $font(str) W] ! set font(height) [font metrics $font(str) -linespace] ! set font(pady) 3 ! set font(padx) 5 ! #-----------------------------------------------------------------------------------# ! set look(extrapix) [switch $OS { ! osx {concat 2} ! default {concat 1}}]
! set look(View:tooltip) 1 ! set look(View:iowidth) 7 ! set look(View:minobjwidth) 21 ! set look(View:iopos) 0 ! set look(View:inletfg) #ff0000 ! set look(View:outletfg) #ff0000 ! set look(View:selectframe) #0080ff ! set look(View:fg) #000000 ! set look(View:bg) #ffffff ! set look(View:frame1) #99cccc ! set look(View:frame2) #668888 ! set look(View:frame3) #000000 ! set look(Comment:fg) #000000 ! set look(Comment:bg) #cccccc ! set look(Comment:frame1) #ffffff ! set look(Comment:frame2) #888888 ! set look(Comment:frame3) #cccccc ! set look(Canvas:bgrun) #ffffff ! set look(Canvas:bgedit) #dddddd ! set look(Canvas:crosshair) #ff14ff ! set look(Canvas:buttonbar) 1 ! set look(Canvas:statusbar) 1 ! set look(Canvas:hairstate) 1 ! set look(Canvas:hairsnap) 1 ! set look(SelRect:rect) #ff12ff ! set look(Wire:fg) #888888 ! set look(Wire:fg2) #ee0000 ! set look(Wire:thick) 1 ! set look(FutureWire:dash) #ee0012 ! set look(Slider:bg) #ccebff ! set look(Completion:showcomp) 10 ! set look(Completion:fg) #000000 ! set look(Completion:bg) #ffffff ! set look(Completion:selectbg) #000000 ! set look(Completion:selectfg) #ffffff
+ set scale(canned) [list 25 33 50 75 100 125 150 200 250 300 400] + #-----------------------------------------------------------------------------------# set key(Canvas:Object) "Ctrl+1" set key(Canvas:Message) "Ctrl+2" *************** *** 674,677 **** --- 646,650 ---- set key(Client:font_bomb) "" set key(Client:client_class_tree) "Ctrl+grave" + set key(Client:Canvas) "Alt+c"
set accels {} *************** *** 1037,1155 **** }
- #-----------------------------------------------------------------------------------# - set font(size) 12 - set font(str2) "-*-courier-medium--normal--%d-*" - set font(str) [format -*-courier-medium--normal--%d-* $font(size)] - set font(width) [font measure $font(str) W] - set font(height) [font metrics $font(str) -linespace] - set font(pady) 3 - set font(padx) 5 - #-----------------------------------------------------------------------------------# - set look(iowidth) 7 - set look(iopos) 0 - set look(inletfg) #ff0000 - set look(outletfg) #ff0000 - set look(objectfg) #000000 - set look(objectbg) #ffffff - set look(objectframe1) #99cccc - set look(objectframe2) #668888 - set look(objectframe3) #000000 - set look(selectframe) #0080ff - set look(commentfg) #000000 - set look(commentbg) #cccccc - set look(commentframe1) #ffffff - set look(commentframe2) #888888 - set look(commentframe3) #cccccc - set look(canvasbgrun) #ffffff - set look(canvasbgedit) #dddddd - set look(selrect) #ff12ff - set look(wirefg) #888888 - set look(wirefg2) #ee0000 - set look(wirethick) 1 - set look(wiredash) #ee0012 - set look(sliderbg) #ccebff - #set look(sliderbg) #ffeedd - set bar(buttonbar) 1 - set bar(statusbar) 1 - set look(showcomp) 10 - set look(tooltip) 1 - - set look(extrapix) [switch $OS { - osx {concat 2} - default {concat 1}}] - set look(minobjwidth) 21 - - set look(View:tooltip) 1 - set look(View:iowidth) 7 - set look(View:minobjwidth) 21 - set look(View:iopos) 0 - set look(View:inletfg) #ff0000 - set look(View:outletfg) #ff0000 - set look(View:selectframe) #0080ff - set look(View:fg) #000000 - set look(View:bg) #ffffff - set look(View:frame1) #99cccc - set look(View:frame2) #668888 - set look(View:frame3) #000000 - set look(Comment:fg) #000000 - set look(Comment:bg) #cccccc - set look(Comment:frame1) #ffffff - set look(Comment:frame2) #888888 - set look(Comment:frame3) #cccccc - set look(Canvas:bgrun) #ffffff - set look(Canvas:bgedit) #dddddd - set look(Canvas:crosshair) #ff14ff - set look(Canvas:buttonbar) 1 - set look(Canvas:statusbar) 1 - set look(Canvas:hairstate) 1 - set look(Canvas:hairsnap) 1 - set look(SelRect:rect) #ff12ff - set look(Wire:fg) #888888 - set look(Wire:fg2) #ee0000 - set look(Wire:thick) 1 - set look(FutureWire:dash) #ee0012 - set look(Slider:bg) #ccebff - set look(Completion:showcomp) 10 - set look(Completion:fg) #000000 - set look(Completion:bg) #ffffff - set look(Completion:selectbg) #000000 - set look(Completion:selectfg) #ffffff - - - - set scale(canned) [list 25 33 50 75 100 125 150 200 250 300 400] - set crosshair(hairstate) 1 - set crosshair(hairsnap) 1
#-----------------------------------------------------------------------------------# proc read_ddrc {} { ! global look crosshair bar ! set file [open "~/.ddrc" "RDONLY CREAT"] ! set dd_config [read $file] ! close $file ! foreach line [split $dd_config "\n"] { ! if {[regexp {^#} $line comment]} {continue} ;# skip comments ! foreach {word1 word2 word3} $line { ! #set word1 [string replace $word1 0 0] ! switch $word1 { ! color { ! set look($word2) $word3 ! #puts "look($word2) $word3" ! } ! crosshair { ! set crosshair($word2) $word3 ! } ! bar { ! set bar($word2) $word3 ! } ! font { ! #puts "settings for font" ! } ! default { ! #puts "settings for something" ! } ! } } } } read_ddrc --- 1010,1038 ---- }
#-----------------------------------------------------------------------------------# proc read_ddrc {} { ! global ddrc_options cmdline look key ! set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"] ! set contents [read $fd] ! close $fd ! ! foreach category_pair $contents { ! #puts "reading category ---> [lindex $category 0]" ! set category [lindex $category_pair 0] ! foreach class_pair [lindex $category_pair 1] { ! #puts " reading class ---> [lindex $class 0]" ! set class [lindex $class_pair 0] ! foreach var_pair [lindex $class_pair 1] { ! set var [lindex $var_pair 0] ! set val [lindex $var_pair 1] ! #puts "$category ($class:$var) ::: $val" ! set ${category}($class:$var) $val ! } } } + + + #if {[regexp {^#} $line comment]} {continue} ;# skip comments } read_ddrc *************** *** 1440,1444 **** global crosshair set @editmode [expr !$@editmode] ! if {$crosshair(hairstate) && !$@editmode} {$self hide_crosshair} pd .$self editmode $@editmode } --- 1323,1327 ---- global crosshair set @editmode [expr !$@editmode] ! if {[$self look hairstate] && !$@editmode} {$self hide_crosshair} pd .$self editmode $@editmode } *************** *** 1523,1527 **** def Canvas init_window {} { global bar - puts " --- butt:: $bar(buttonbar) status::: $bar(statusbar)" set win .$self set c .$self.c --- 1406,1409 ---- *************** *** 4597,4601 **** set vy2 [expr ($y1+($y2-$y1)*$vy2)/$@scale] mset {type id detail} $target ! if {$crosshair(hairsnap)} { switch -regexp -- $type { ^object|outlet|inlet$ { --- 4479,4483 ---- set vy2 [expr ($y1+($y2-$y1)*$vy2)/$@scale] mset {type id detail} $target ! if {[$self look hairsnap]} { switch -regexp -- $type { ^object|outlet|inlet$ { *************** *** 4634,4638 **** set vy2 [expr ($y1+($y2-$y1)*$vy2)/$@scale] mset {type id detail} $target ! if {$crosshair(hairsnap)} { switch -regexp -- $type { ^object|outlet|inlet$ { --- 4516,4520 ---- set vy2 [expr ($y1+($y2-$y1)*$vy2)/$@scale] mset {type id detail} $target ! if {[$self look hairsnap])} { switch -regexp -- $type { ^object|outlet|inlet$ { *************** *** 5578,5649 ****
#################### ClientPrefsDialog - - set ddrc_options2 { - section section_color - subsection canvas_color - color canvasbgedit - color canvasbgrun - subsection object_color - color objectbg - color objectfg - color objectframe1 - color objectframe2 - color objectframe3 - color commentbg - color commentfg - color commentframe1 - color commentframe2 - color commentframe3 - color selectframe - subsection wire_color - color wirefg - color wirefg2 - color wiredash - subsection others_color - color inletfg - color outletfg - color selrect - section keys - subsection put - key Object - key Message - key Number - key Symbol - key Comment - key Bang - key Toggle - key Number2 - key {Vslider Hslider} - key {Vradio Hradio} - key Canvas - key Array - subsection edit - key {cut copy} - key {undo redo} - key paste - key select_all - key {reload redraw} - key editmodeswitch - subsection general - key Pdwindow - key new_file - key open_file - key {save save_as} - key {pdrc_editor ddrc_editor} - key paths - key {close quit} - key {find find_again} - key {audio_on audio_off} - key {audio_settings midi_settings} - key test_audio_and_midi - key {load_meter latency_meter} - key about - section others - crosshair hairstate - crosshair hairsnap - bar buttonbar - bar statusbar - } - set ddrc_options { section Client section_color --- 5460,5463 ---- *************** *** 5694,5702 **** subsection Client general key Canvas Pdwindow ! key Canvas new_file ! key Canvas open_file key Canvas {save save_as} key Client {pdrc_editor ddrc_editor} - key Client paths key Canvas {close quit} key Canvas {find find_again} --- 5508,5514 ---- subsection Client general key Canvas Pdwindow ! key Canvas {new_file open_file} key Canvas {save save_as} key Client {pdrc_editor ddrc_editor} key Canvas {close quit} key Canvas {find find_again} *************** *** 5808,5811 **** --- 5620,5625 ---- if {[info exists $str]} { lappend tmp2 [list $y [set [set str]]] + #lappend tmp2 $y + #lappend tmp2 [set [set str]] } } *************** *** 5934,5942 **** set label "" if {[llength $names] > 1} { ! foreach name $names {append label " [say $name]"} } else { ! set label [say $names] } ! if {[string length $label] > $@max_label} {set @max_label [expr [string length $label]+20]} } --- 5748,5757 ---- set label "" if {[llength $names] > 1} { ! foreach name $names {set str [string tolower $class$name]; append label " [say $str]"} } else { ! set str [string tolower $class$names] ! set label [say $str] } ! if {[string length $label] > $@max_label} {set @max_label [expr [string length $label]+20]; puts "$label"} }