Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11322
Modified Files: Tag: desiredata desire.tk Log Message: added -savemode
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.349 retrieving revision 1.1.2.600.2.350 diff -C2 -d -r1.1.2.600.2.349 -r1.1.2.600.2.350 *** desire.tk 12 Aug 2007 06:00:48 -0000 1.1.2.600.2.349 --- desire.tk 12 Aug 2007 07:48:27 -0000 1.1.2.600.2.350 *************** *** 586,589 **** --- 586,599 ---- }
+ proc modeclick {k mode event} { + set s "" + if {$mode&1} {append s Shift-} + if {$mode&4} {append s Control-} + if {$mode&8} {append s Alt-} + if {[regexp {[0-9]} $k]} {set k $event-$k} + return $s$k + } + + # there are two palettes of 30 colours used in Pd # when placed in a 3*10 grid, the difference is that *************** *** 684,688 **** 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) } --- 694,698 ---- read_client_prefs_from [file join [file dirname [file dirname $::argh0]] "lib/pd/bin/defaults.ddrc"] } ! if {[file exists $::cmdline(ddrcfilename)] && ![info exists ::cmdline(savemode)]} { read_client_prefs_from $::cmdline(ddrcfilename) } *************** *** 711,715 **** -manualgdb run gdb in the terminal -valgrind run pd server through valgrind ! -novalgrind ... or don't" }
--- 721,726 ---- -manualgdb run gdb in the terminal -valgrind run pd server through valgrind ! -novalgrind ... or don't ! -savemode run desiredata with all default settings" }
*************** *** 725,728 **** --- 736,740 ---- ^-valgrind$ {set cmdline(valgrind) 1} ^-novalgrind$ {set cmdline(valgrind) 0} + ^-savemode$ {set cmdline(savemode) 1} ^(-h|-help|--help)$ {cmdline_help; exit 1} ^- {puts "ERROR: command line argument: unknown $o"} *************** *** 763,766 **** --- 775,780 ---- }
+ if {[info exists ::cmdline(savemode)]} {read_client_prefs_from "defaults.ddrc"} + #-----------------------------------------------------------------------------------#
*************** *** 5032,5037 **** switch $event { key {set name [modekey $k $mode]; set fudge 1} ! click {set name ButtonPress-$k; set fudge 1} ! unclick {set name ButtonRelease-$k; set fudge 1} bang { after $delay [list $self macro_schedule $@macro_delay] $obj --- 5046,5051 ---- switch $event { key {set name [modekey $k $mode]; set fudge 1} ! click {set name [modeclick $k $mode ButtonPress]; set fudge 1} ! unclick {set name [modeclick $k $mode ButtonRelease]; set fudge 1} bang { after $delay [list $self macro_schedule $@macro_delay] $obj *************** *** 5044,5048 **** if {$fudge} {event generate $w <Motion> -x $x -y $y} event generate $w <$name> -x $x -y $y ! if {$event=="KeyPress"} {event generate $w <KeyRelease-$k> -x $x -y $y} set @macro_q [lreplace $@macro_q 0 0] after $delay [list $self macro_schedule $@macro_delay] $obj --- 5058,5062 ---- if {$fudge} {event generate $w <Motion> -x $x -y $y} event generate $w <$name> -x $x -y $y ! if {$event=="key"} {event generate $w <KeyRelease-$k> -x $x -y $y} set @macro_q [lreplace $@macro_q 0 0] after $delay [list $self macro_schedule $@macro_delay] $obj