Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20809
Modified Files: Tag: desiredata desire.tk Log Message: -console and -lang as command options overwrites .ddrc
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.94 retrieving revision 1.1.2.600.2.95 diff -C2 -d -r1.1.2.600.2.94 -r1.1.2.600.2.95 *** desire.tk 15 Dec 2006 15:59:38 -0000 1.1.2.600.2.94 --- desire.tk 15 Dec 2006 17:12:50 -0000 1.1.2.600.2.95 *************** *** 520,523 **** --- 520,558 ---- }
+ #-----------------------------------------------------------------------------------# + set accels {} + proc read_ddrc {{filename ""}} { + global cmdline look key accels + if {$filename == ""} { + set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"] + } else { + set fd [open $filename] + } + set contents [read $fd] + close $fd + foreach {category category_data} $contents { + foreach {class class_data} $category_data { + foreach {var val} $class_data {set ${category}($class:$var) $val} + } + } + foreach k [array names key] { + if {[llength $key($k)]} { + if {![dict exists $accels $key($k)]} { + dict set accels $key($k) $k + } else { + dict lappend accels $key($k) $k + } + } + } + } + + if {[file exists "defaults.ddrc"]} { + read_ddrc "defaults.ddrc" + } else { + read_ddrc [file join [file dirname [file dirname $argh0]] "lib/pd/bin/defaults.ddrc"] + } + read_ddrc + #-----------------------------------------------------------------------------------# + set cmdline(gdb) 0 set cmdline(gdbconsole) 1 *************** *** 606,613 **** set zoom(canned) [list 25 33 50 75 100 125 150 200 250 300 400] set scale_amount 1.1 - #-----------------------------------------------------------------------------------# - - set accels {} - ################## set up main window #########################
--- 641,644 ---- *************** *** 1034,1069 ****
#-----------------------------------------------------------------------------------# - proc read_ddrc {{filename ""}} { - global cmdline look key accels - if {$filename == ""} { - set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"] - } else { - set fd [open $filename] - } - set contents [read $fd] - close $fd - foreach {category category_data} $contents { - foreach {class class_data} $category_data { - foreach {var val} $class_data {set ${category}($class:$var) $val} - } - } - foreach k [array names key] { - if {[llength $key($k)]} { - if {![dict exists $accels $key($k)]} { - dict set accels $key($k) $k - } else { - dict lappend accels $key($k) $k - } - } - } - } - - if {[file exists "defaults.ddrc"]} { - read_ddrc "defaults.ddrc" - } else { - read_ddrc [file join [file dirname [file dirname $argh0]] "lib/pd/bin/defaults.ddrc"] - } - read_ddrc - #-----------------------------------------------------------------------------------# set pd_apilist "{ALSA 1}" set pd_apilist2 "default" --- 1065,1068 ---- *************** *** 6919,6924 **** color { set str [string tolower $class$name] ! set new_color $@$str ! set look($class:$name) $new_color } key { --- 6918,6922 ---- color { set str [string tolower $class$name] ! set look($class:$name) $@$str } key { *************** *** 6988,6992 **** set which_self $subself } - alias {} choice { if {$name == "lang"} { --- 6986,6989 ---- *************** *** 6995,7004 **** set ops $langoptions } ! $self add $which_section [list $name choice -choices $ops] } color { set str [string tolower $class$name] set @$str $look($class:$name) ! $self add $which_section [list $str color] } key { --- 6992,7001 ---- set ops $langoptions } ! $self add $which_section [list $name $type -choices $ops] } color { set str [string tolower $class$name] set @$str $look($class:$name) ! $self add $which_section [list $str $type] } key { *************** *** 7010,7014 **** toggle { set @$name $look($class:$name) ! $self add $which_section [list $name toggle] } font { --- 7007,7011 ---- toggle { set @$name $look($class:$name) ! $self add $which_section [list $name $type] } font { *************** *** 7016,7020 **** } default { ! if {$names == "console"} {set @$name $look(Client:console)} $self add $which_section [list $name $type] } --- 7013,7017 ---- } default { ! if {$name == "console"} {set @$name $look(Client:console)} $self add $which_section [list $name $type] }