Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28723
Modified Files: Tag: desiredata desire.tk Log Message: back to reading defaults.ddrc from whereever AND THEN try to get a ~/.ddrc - this is important for upgrading ~/.ddrc smoothly
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.243 retrieving revision 1.1.2.600.2.244 diff -C2 -d -r1.1.2.600.2.243 -r1.1.2.600.2.244 *** desire.tk 17 Jul 2007 19:14:24 -0000 1.1.2.600.2.243 --- desire.tk 18 Jul 2007 15:57:44 -0000 1.1.2.600.2.244 *************** *** 582,598 **** #-----------------------------------------------------------------------------------# set accels {} ! proc read_ddrc {} { global cmdline look key accels set ::accels {} ! if {[file exists $cmdline(ddrcfilename)]} { ! set fd [open $cmdline(ddrcfilename) "RDONLY"] ! puts "reading from $cmdline(ddrcfilename)" ! } elseif {[file exists "defaults.ddrc"]} { ! set fd [open "defaults.ddrc" "RDONLY"] ! puts "reading from ./defaults.ddrc" ! } else { ! set fd [open [file join [file dirname [file dirname $::argh0]] "lib/pd/bin/defaults.ddrc"] "RDONLY"] ! puts "reading from [file join [file dirname [file dirname $::argh0]] "lib/pd/bin/defaults.ddrc"]" ! } set contents [read $fd] close $fd --- 582,590 ---- #-----------------------------------------------------------------------------------# set accels {} ! proc read_client_prefs_from {filename} { global cmdline look key accels set ::accels {} ! puts "reading from $filename" ! set fd [open $filename] set contents [read $fd] close $fd *************** *** 603,607 **** } foreach k [array names key] { ! if {[llength $key($k)]} { if {![dict exists $accels $key($k)]} { dict set accels $key($k) $k --- 595,599 ---- } foreach k [array names key] { ! if {[llength $key($k)]} { if {![dict exists $accels $key($k)]} { dict set accels $key($k) $k *************** *** 609,616 **** dict lappend accels $key($k) $k } ! } } } read_ddrc #-----------------------------------------------------------------------------------#
--- 601,619 ---- dict lappend accels $key($k) $k } ! } ! } ! } ! proc read_ddrc {} { ;# load defaults then load .ddrc ! if {[file exists "defaults.ddrc"]} { ! read_client_prefs_from "defaults.ddrc" ! } else { ! read_client_prefs_from [file join [file dirname [file dirname $::argh0]] "lib/pd/bin/defaults.ddrc"] ! } ! if {[file exists $::cmdline(ddrcfilename)]} { ! read_client_prefs_from $::cmdline(ddrcfilename) } } read_ddrc + #-----------------------------------------------------------------------------------#