[PD-cvs] pd/src desire.tk,1.1.2.395,1.1.2.396
chunlee
chunlee at users.sourceforge.net
Wed Aug 23 04:08:07 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23440
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
ddrc editor now works with the new local tables
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.395
retrieving revision 1.1.2.396
diff -C2 -d -r1.1.2.395 -r1.1.2.396
*** desire.tk 23 Aug 2006 01:10:10 -0000 1.1.2.395
--- desire.tk 23 Aug 2006 02:08:04 -0000 1.1.2.396
***************
*** 646,649 ****
--- 646,654 ----
set key(Canvas:text_editor) "Ctrl+t"
set key(Canvas:font_bomb) ""
+ set key(Canvas:audio_on) "Ctrl+slash"
+ set key(Canvas:audio_off) "Ctrl+period"
+ set key(Canvas:load_meter) ""
+ set key(Canvas:latency_meter) ""
+ set key(Canvas:about) ""
set key(Client:new_file) "Ctrl+n"
***************
*** 1093,1096 ****
--- 1098,1105 ----
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
***************
*** 1518,1522 ****
set butts [[ButtonBar new $self] widget]
# turn buttonbar on/off
! if {$bar(buttonbar)} {
if {[catch {pack $butts -side top -fill x -expand no}]} {
global errorInfo
--- 1527,1531 ----
set butts [[ButtonBar new $self] widget]
# turn buttonbar on/off
! if {[$self look buttonbar]} {
if {[catch {pack $butts -side top -fill x -expand no}]} {
global errorInfo
***************
*** 1526,1530 ****
set @statusbar [StatusBar new $self]
# turn statusbar on/off
! if {$bar(statusbar)} {pack [$@statusbar widget] -side bottom -fill x}
pack [scrollbar $win.xscroll -command "$c xview" -orient horizontal] -side bottom -fill x
pack [scrollbar $win.yscroll -command "$c yview" ] -side right -fill y
--- 1535,1539 ----
set @statusbar [StatusBar new $self]
# turn statusbar on/off
! if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
pack [scrollbar $win.xscroll -command "$c xview" -orient horizontal] -side bottom -fill x
pack [scrollbar $win.yscroll -command "$c yview" ] -side right -fill y
***************
*** 1627,1631 ****
set c .$self.c
$c [list $axis]view scroll $diff units
! if {$crosshair(hairstate) && $@editmode} {
# this should be changed so that we don't need to recompute x,y here.
set c .$self.c
--- 1636,1640 ----
set c .$self.c
$c [list $axis]view scroll $diff units
! if {[$self look hairstate] && $@editmode} {
# this should be changed so that we don't need to recompute x,y here.
set c .$self.c
***************
*** 2141,2145 ****
set canvas(current) $self
set c .$self.c
! if {$crosshair(hairstate) && $@editmode} {$self show_crosshair $x $y $target} else {$self hide_crosshair}
if {$tooltip(visible)} {
if {[expr [distance $tooltip(curpos) [list $x $y]] > 10]} {
--- 2150,2154 ----
set canvas(current) $self
set c .$self.c
! if {[$self look hairstate] && $@editmode} {$self show_crosshair $x $y $target} else {$self hide_crosshair}
if {$tooltip(visible)} {
if {[expr [distance $tooltip(curpos) [list $x $y]] > 10]} {
***************
*** 4946,4950 ****
class_new Dialog {Thing}
! def* Dialog add {w args} {
set no_max_label 0
foreach row $args {
--- 4955,4959 ----
class_new Dialog {Thing}
! def Dialog add {w args} {
set no_max_label 0
foreach row $args {
***************
*** 4955,4959 ****
set label "[say $name]: "
set k [lsearch $options -choices]
! puts " name: $name | type: $type | option: $options | k: $k"
if {$k>=0} {
set choices [lindex $options [expr $k+1]]
--- 4964,4968 ----
set label "[say $name]: "
set k [lsearch $options -choices]
! #puts " name: $name | type: $type | option: $options | k: $k"
if {$k>=0} {
set choices [lindex $options [expr $k+1]]
***************
*** 4961,4965 ****
}
#set v $@$name
! set v $_($self:$name) ;# bug in objtcl
switch -- $type {
side {
--- 4970,4974 ----
}
#set v $@$name
! #set v $_($self:$name) ;# bug in objtcl
switch -- $type {
side {
***************
*** 4978,4982 ****
--- 4987,4993 ----
}
color {
+ set v $_($self:$name) ;# bug in objtcl
frame $f
+ puts " f::: $f"
label $f.label -text $label
set text_color [complement $v]
***************
*** 4990,4993 ****
--- 5001,5005 ----
}
choice {
+ set v $_($self:$name) ;# bug in objtcl
frame $f
label $f.label -text $label
***************
*** 5034,5037 ****
--- 5046,5050 ----
#balloon $f.label $name
foreach item $name {
+ set v $_($self:$item) ;# bug in objtcl
set item_lower [string tolower $item]
#eval "entry $f.$item_lower -textvariable $_($self:$item) -width 15"
***************
*** 5043,5046 ****
--- 5056,5060 ----
}
folders {
+ set v $_($self:$name) ;# bug in objtcl
set no_max_label 1
frame $f
***************
*** 5073,5076 ****
--- 5087,5091 ----
}
libraries {
+ set v $_($self:$name) ;# bug in objtcl
set no_max_label 1
frame $f
***************
*** 5512,5515 ****
--- 5527,5531 ----
}
def* ServerPrefsDialog init {} {
+ puts " clsee:: $@_class"
global pdrc_options
$self init_reverse_hash
***************
*** 5544,5548 ****
#################### ClientPrefsDialog
! set ddrc_options {
section section_color
subsection canvas_color
--- 5560,5564 ----
#################### ClientPrefsDialog
! set ddrc_options2 {
section section_color
subsection canvas_color
***************
*** 5611,5614 ****
--- 5627,5698 ----
}
+ set ddrc_options {
+ section Client section_color
+ subsection Client canvas_color
+ color Canvas bgedit
+ color Canvas bgrun
+ subsection Client object_color
+ color View bg
+ color View fg
+ color View frame1
+ color View frame2
+ color View frame3
+ color Comment bg
+ color Comment fg
+ color Comment frame1
+ color Comment frame2
+ color Comment frame3
+ color View selectframe
+ subsection Client wire_color
+ color Wire fg
+ color Wire fg2
+ color FutureWire dash
+ subsection Client others_color
+ color View inletfg
+ color View outletfg
+ color SelRect rect
+ section Client keys
+ subsection Client put
+ key Canvas Object
+ key Canvas Message
+ key Canvas Number
+ key Canvas Symbol
+ key Canvas Comment
+ key Canvas Bang
+ key Canvas Toggle
+ key Canvas Number2
+ key Canvas {Vslider Hslider}
+ key Canvas {Vradio Hradio}
+ key Canvas Canvas
+ key Canvas Array
+ subsection Client edit
+ key Canvas {cut copy}
+ key Canvas {undo redo}
+ key Canvas paste
+ key Canvas select_all
+ key Canvas {reload redraw}
+ key Canvas editmodeswitch
+ 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}
+ key Canvas {audio_on audio_off}
+ key Client {audio_settings midi_settings}
+ key Client test_audio_and_midi
+ key Canvas {load_meter latency_meter}
+ key Canvas about
+ section Client others
+ crosshair Canvas hairstate
+ crosshair Canvas hairsnap
+ bar Canvas buttonbar
+ bar Canvas statusbar
+ }
+
+
class_new ClientPrefsDialog {PagedDialog}
def ClientPrefsDialog apply {} {$self write}
***************
*** 5648,5658 ****
}
}
-
def* ClientPrefsDialog write {} {
global ddrc_options ddrc_options_h cmdline look accels key crosshair
set fd [open $cmdline(ddrcfilename) w]
set check_key {}
#puts "fd ===== $fd"
! foreach {type name} $ddrc_options {
switch $type {
color {
--- 5732,5797 ----
}
}
def* ClientPrefsDialog write {} {
global ddrc_options ddrc_options_h cmdline look accels key crosshair
+ #set fd [open $cmdline(ddrcfilename) w]
+ set check_key {}
+ set color {}
+ foreach {type class name} $ddrc_options {
+ switch $type {
+ color {
+ set str [string tolower $class$name]
+ set str2 ${str}path
+ puts " str2 ::: $str2"
+ set new_color [$@$str2 cget -background]
+ set l [list $name $new_color]
+ lappend color [list $class $l]
+ puts "$color"
+ #set look($name) $new_color
+ #set var ${name}path
+ #set new_color [$@$var cget -background]
+ #set look($name) $new_color
+ #puts $fd "$type $name $new_color"
+ }
+ key {
+ foreach item $name {
+ set var ${item}path
+ set new_key [$@$var get]
+ set old_key $key($item)
+ if {$key($item) != $new_key} {
+ if {[dict exists $accels $old_key]} {
+ set cmd [dict get $accels $old_key]
+ set accels [dict remove $accels $old_key]
+ dict set accels $new_key $cmd
+ #puts "$new_key ::: $cmd"
+ }
+ }
+ if {[dict exists $check_key $new_key] && $new_key != ""} {
+ error "$new_key already assigned"
+ #dict set check_key $new_key key($item)
+ } else {dict set check_key $new_key key($item)}
+ set key($item) $new_key
+ puts $fd "$type $item $new_key"
+ }
+
+ }
+ crosshair {
+ set crosshair($name) $_($self:$name)
+ #puts $fd "$type $name $crosshair($name)"
+ }
+ bar {
+ set bar($name) $_($self:$name)
+ #puts $fd "$type $name $bar($name)"
+ }
+ }
+ }
+ close $fd
+ }
+
+ def* ClientPrefsDialog write2 {} {
+ global ddrc_options ddrc_options_h cmdline look accels key crosshair
set fd [open $cmdline(ddrcfilename) w]
set check_key {}
#puts "fd ===== $fd"
! foreach {type class name} $ddrc_options {
switch $type {
color {
***************
*** 5696,5702 ****
--- 5835,5843 ----
close $fd
}
+
def* ClientPrefsDialog reset {} {
}
def ClientPrefsDialog init {} {
+ puts " class:: $@_class"
global ddrc_options look key crosshair bar
$self read
***************
*** 5706,5710 ****
set subsection 0
! foreach {type names} $ddrc_options {
set label ""
if {[llength $names] > 1} {
--- 5847,5851 ----
set subsection 0
! foreach {type class names} $ddrc_options {
set label ""
if {[llength $names] > 1} {
***************
*** 5716,5720 ****
}
! foreach {type names} $ddrc_options {
set name [lindex [split $names |] 0]
switch $type { void { set type toggle }}
--- 5857,5861 ----
}
! foreach {type class names} $ddrc_options {
set name [lindex [split $names |] 0]
switch $type { void { set type toggle }}
***************
*** 5737,5766 ****
choice {$self add $which_section [list [lindex $name 0] choice]}
color {
! set var ${name}path
#this stores the path to the widget on the gui editor.
! set @$var $which_section.$name.color
! set @$name $look($name)
! $self add $which_section [list [lindex $name 0] color]
}
key {
foreach item $name {
! set var ${item}path
! set @$item $key($item)
! set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item]
}
! $self add $which_section [list $name $type]
}
crosshair {
! set var ${name}path
#this stores the path to the widget on the gui editor.
! set @$var $which_section.$name.color
! set @$name $crosshair($name)
! $self add $which_section [list [lindex $name 0] toggle]
}
bar {
! set var ${name}path
! set @$var $which_section.$name.color
! set @$name $bar($name)
! $self add $which_section [list [lindex $name 0] toggle]
}
default {
--- 5878,5930 ----
choice {$self add $which_section [list [lindex $name 0] choice]}
color {
! set str [string tolower $class$name]
! set str2 ${str}path
! #puts " var $var"
#this stores the path to the widget on the gui editor.
! set @$str2 $which_section.$str.color
! puts " str2::: $@$str2"
! #set @$name $look($name)
! #set @$name $look($class:$name)
! set @$str $look($class:$name)
! puts "$str :::: $look($class:$name)"
! #$self add $which_section [list [lindex $name 0] color]
! $self add $which_section [list $str color]
}
key {
+ set l {}
foreach item $name {
! set str [string tolower $class$item]
! set str2 ${str}path
! #set var ${item}path
! #set @$item $key($item)
! set @$str $key($class:$item)
! #puts " @$str /\/\ $key($class:$item)"
! #set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item]
! set @$str2 $which_section.[string tolower [lindex $str 0]].[string tolower $item]
! lappend l $str
}
! #$self add $which_section [list $name $type]
! $self add $which_section [list $l $type]
}
crosshair {
! set str [string tolower $class$name]
! set str2 ${str}path
! #set var ${name}path
! set @$str2 $which_section.$name.color
#this stores the path to the widget on the gui editor.
! #set @$var $which_section.$name.color
! #set @$name $crosshair($name)
! set @$str $look($class:$name)
! $self add $which_section [list [lindex $str 0] toggle]
}
bar {
! set str [string tolower $class$name]
! set str2 ${str}path
! #set var ${name}path
! #set @$var $which_section.$name.color
! set @$str2 $which_section.$name.color
! #set @$name $bar($name)
! set @$str $look($class:$name)
! $self add $which_section [list [lindex $str 0] toggle]
}
default {
More information about the Pd-cvs
mailing list