Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23728
Modified Files: Tag: desiredata desire.tk Log Message: cleanup; fix for def ServerPreferences apply.
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.212 retrieving revision 1.1.2.600.2.213 diff -C2 -d -r1.1.2.600.2.212 -r1.1.2.600.2.213 *** desire.tk 10 Jul 2007 16:55:40 -0000 1.1.2.600.2.212 --- desire.tk 10 Jul 2007 23:32:26 -0000 1.1.2.600.2.213 *************** *** 792,795 **** --- 792,796 ---- regexp {\d\d\d\d/\d\d/\d\d} $::cvsid version regsub -all "/" $version "." version + set ::pd_version_client $version post "DesireData client version $version with Tcl %s and Tk %s" $::tcl_patchLevel $::tk_patchLevel } *************** *** 1819,1825 **** }
! def Canvas find_last_error {} { ! netsend [list pd finderror] ! }
def Canvas bind {eventtype selector args} { --- 1820,1824 ---- }
! def Canvas find_last_error {} {netsend [list pd finderror]}
def Canvas bind {eventtype selector args} { *************** *** 2069,2099 **** def Canvas new_menubar {} { set name .$self - global pd_opendir cmdline key accels set m $name.m menu $m #removed Paths after send_message foreach x {file edit find view put window help} {menu $m.$x -tearoff $::pd_tearoff} ! $self populate_menu file { ! new_file open_file {} ! send_message {} ! close save save_as print {} ! quit} ! $self populate_menu edit { ! undo redo {} ! cut copy paste duplicate select_all subpatcherize {} ! text_editor tidy_up {}} ! $self populate_menu find { ! find find_again find_last_error} ! $self populate_menu view { ! reload redraw} ! $self populate_menu put { ! Object Message Number Symbol Comment {} ! bng tgl nbx vsl hsl vradio hradio vu dropper cnv {} ! Graph Array} $self populate_menu window {{}} ! $m.edit add checkbutton -label [say edit_mode] \ ! -selectcolor grey0 -command "$self editmode 0" \ ! -accelerator [accel_munge "Ctrl+e"] -indicatoron 1 \ ! -variable @editmode -onvalue 1 -offvalue 0 $m.edit configure -postcommand "$self fix_edit_menu" $m.window configure -postcommand "$self fix_window_menu" --- 2068,2083 ---- def Canvas new_menubar {} { set name .$self set m $name.m menu $m #removed Paths after send_message foreach x {file edit find view put window help} {menu $m.$x -tearoff $::pd_tearoff} ! $self populate_menu file {new_file open_file {} send_message {} close save save_as print {} quit} ! $self populate_menu edit {undo redo {} cut copy paste duplicate select_all subpatcherize {} text_editor tidy_up {}} ! $self populate_menu find {find find_again find_last_error} ! $self populate_menu view {reload redraw} ! $self populate_menu put {Object Message Number Symbol Comment {} bng tgl nbx vsl hsl vradio hradio vu dropper cnv {} Graph Array} $self populate_menu window {{}} ! $m.edit add checkbutton -label [say edit_mode] -selectcolor grey0 -command "$self editmode 0" \ ! -accelerator [accel_munge "Ctrl+e"] -indicatoron 1 -variable @editmode -onvalue 1 -offvalue 0 $m.edit configure -postcommand "$self fix_edit_menu" $m.window configure -postcommand "$self fix_window_menu" *************** *** 2617,2625 ****
def View position= {xy1} {mset [list @x1 @y1] $xy1; $self changed x1 y1} ! ! def View set_orig_xy {x y} { ! set @orig_x $x ! set @orig_y $y ! }
def Canvas motion_wrap {x y f} { --- 2601,2605 ----
def View position= {xy1} {mset [list @x1 @y1] $xy1; $self changed x1 y1} ! def View set_orig_xy {x y} {set @orig_x $x; set @orig_y $y}
def Canvas motion_wrap {x y f} { *************** *** 2627,2632 **** set x [expr [$c canvasx $x]/$@zoom] set y [expr [$c canvasy $y]/$@zoom] ! set target [$self identify_target $x $y $f] ! $self motion $x $y $f $target } def Canvas click_wrap {x y b f} { --- 2607,2611 ---- set x [expr [$c canvasx $x]/$@zoom] set y [expr [$c canvasy $y]/$@zoom] ! $self motion $x $y $f [$self identify_target $x $y $f] } def Canvas click_wrap {x y b f} { *************** *** 2635,2640 **** set y [expr [$c canvasy $y]/$@zoom] set f [expr 1<<($b+7)|$f] ! set target [$self identify_target $x $y $f] ! $self click $x $y $f $target } def Canvas unclick_wrap {x y b f} { --- 2614,2618 ---- set y [expr [$c canvasy $y]/$@zoom] set f [expr 1<<($b+7)|$f] ! $self click $x $y $f [$self identify_target $x $y $f] } def Canvas unclick_wrap {x y b f} { *************** *** 2643,2648 **** set y [expr [$c canvasy $y]/$@zoom] set f [expr 1<<($b+7)|$f] ! set target [$self identify_target $x $y $f] ! $self unclick $x $y $f $target } def Canvas key_wrap {x y key iso shift} { --- 2621,2625 ---- set y [expr [$c canvasy $y]/$@zoom] set f [expr 1<<($b+7)|$f] ! $self unclick $x $y $f [$self identify_target $x $y $f] } def Canvas key_wrap {x y key iso shift} { *************** *** 5827,5831 **** set fill [color_* [$self look bg] $colour] set x3 [expr $x1+$t+2]; set y3 [expr $y1+$t+2] ! set x4 [expr $x2-$t-2]; set y4 [expr $y2-$t-2] if {$@on} { set fill [parse_color $@fcol] --- 5804,5808 ---- set fill [color_* [$self look bg] $colour] set x3 [expr $x1+$t+2]; set y3 [expr $y1+$t+2] ! set x4 [expr $x2-$t-2]; set y4 [expr $y2-$t-2] if {$@on} { set fill [parse_color $@fcol] *************** *** 5982,5986 ****
def Array draw {} { - global font $self draw_name mset {x_off y_off} [$@canvas xy] --- 5959,5962 ---- *************** *** 6034,6053 ****
def Array click {x y f target} { ! if {[winfo exists [$@canvas widget]]} { ! $@canvas focus= $self ! } else { ! set canvas [$@canvas canvas] ! $canvas focus= $self ! } set @draw 1 } def Array unclick {x y f target} { ! if {[winfo exists [$@canvas widget]]} { ! $@canvas focus= "" ! } else { ! set canvas [$@canvas canvas] ! $canvas focus= "" ! } ! set @draw 0 } --- 6010,6020 ----
def Array click {x y f target} { ! if {[winfo exists [$@canvas widget]]} {set canvas $@canvas} else {set canvas [$@canvas canvas]} ! $canvas focus= $self set @draw 1 } def Array unclick {x y f target} { ! if {[winfo exists [$@canvas widget]]} {set canvas $@canvas} else {set canvas [$@canvas canvas]} ! $canvas focus= "" set @draw 0 } *************** *** 6091,6095 ****
def Listener init {serf name command} { - global look set @hist {} set @histi 0 --- 6058,6061 ---- *************** *** 6101,6106 **** pack [frame $serf.1.1] -side bottom pack [button $serf.1.1.expander -image icon_plus -command "$self toggle_expand"] -side left ! pack [label $serf.1.1.label -width 11 -text "$name: " -font $look(View:font)] -side left ! pack [entry $serf.entry -width 40 -font $look(View:font)] -side left -fill x -expand yes pack $serf -fill x -expand no bind $serf.entry <Up> "$self up" --- 6067,6072 ---- pack [frame $serf.1.1] -side bottom pack [button $serf.1.1.expander -image icon_plus -command "$self toggle_expand"] -side left ! pack [label $serf.1.1.label -width 11 -text "$name: " -font $::look(View:font)] -side left ! pack [entry $serf.entry -width 40 -font $::look(View:font)] -side left -fill x -expand yes pack $serf -fill x -expand no bind $serf.entry <Up> "$self up" *************** *** 6193,6203 **** if {$tk} { set dir $cmdline(icons) ! foreach icon {mode_edit mode_run pd} { ! image create photo icon_$icon -file $dir/$icon.gif ! } ! foreach b $butt { ! mset {icon name cmd} $b ! image create photo icon_$icon -file $dir/$icon.gif ! } }
--- 6159,6164 ---- if {$tk} { set dir $cmdline(icons) ! foreach icon {mode_edit mode_run pd} {image create photo icon_$icon -file $dir/$icon.gif} ! foreach b $butt {mset {icon name cmd} $b; image create photo icon_$icon -file $dir/$icon.gif} }
*************** *** 6205,6214 ****
def ButtonBar init {canvas} { - global butt set @canvas $canvas set bb .$@canvas.bbar frame $bb pack [button $bb.edit -image icon_mode_edit -border 1 -command "$@canvas editmodeswitch"] -side left ! foreach e $butt { mset {icon name cmd} $e pack [button $bb._$name -image icon_$icon -border 1 -command "$@canvas new_object $cmd"] -side left --- 6166,6174 ----
def ButtonBar init {canvas} { set @canvas $canvas set bb .$@canvas.bbar frame $bb pack [button $bb.edit -image icon_mode_edit -border 1 -command "$@canvas editmodeswitch"] -side left ! foreach e $::butt { mset {icon name cmd} $e pack [button $bb._$name -image icon_$icon -border 1 -command "$@canvas new_object $cmd"] -side left *************** *** 6268,6272 **** set x2 [expr $x1+$width-14] set y2 [expr $height+$y1-14] - set h1 [list $x1 $y $x2 $y] set v1 [list $x $y1 $x $y2] --- 6228,6231 ---- *************** *** 6367,6371 **** bind $@textbox <Control-Return> "$@textself key_input %W %x %y 10 %A 0" bind $@textbox <Return> "$@textself unedit" ! bind $@textbox <Tab> "$@textself key_input %W %x %y %K %A 0" focus $@textbox; $self delete } --- 6326,6330 ---- bind $@textbox <Control-Return> "$@textself key_input %W %x %y 10 %A 0" bind $@textbox <Return> "$@textself unedit" ! bind $@textbox <Tab> "$@textself key_input %W %x %y %K %A 0" focus $@textbox; $self delete } *************** *** 6394,6398 **** } } ! set none " no matches " if {![$@listbox size]} {$@listbox insert 0 $none; set @width [string length $none]} $@listbox selection set 0 0 --- 6353,6357 ---- } } ! set none [say no_matches] if {![$@listbox size]} {$@listbox insert 0 $none; set @width [string length $none]} $@listbox selection set 0 0 *************** *** 6405,6411 ****
def Browser fill_box {s} { - global class_list super $s ! .$self.title configure -text [format [say how_many_object_classes] [$@listbox size] [llength $class_list]] }
--- 6364,6369 ----
def Browser fill_box {s} { super $s ! .$self.title configure -text [format [say how_many_object_classes] [$@listbox size] [llength $::class_list]] }
*************** *** 7112,7119 **** }
! def Dialog ok {} { ! if {$self == "pdrc"} {$self write} else {$self apply} ! $self cancel ! } def Dialog cancel {} {if {[info exists @nbs]} {foreach x $@nbs {$x delete}}; $self delete} def Dialog close {} {$self delete} --- 7070,7074 ---- }
! def Dialog ok {} {$self apply; $self cancel} def Dialog cancel {} {if {[info exists @nbs]} {foreach x $@nbs {$x delete}}; $self delete} def Dialog close {} {$self delete} *************** *** 7151,7155 **** }
- def Dialog dropmenu_open {frame} { set x [winfo rootx $frame.butt] --- 7106,7109 ---- *************** *** 7280,7283 **** --- 7234,7238 ---- #pd pd audio-dialog $audio_props netsend [list "pd" "audio-dialog" $audio_props] + $self write }
*************** *** 7383,7390 ****
def ServerPrefsDialog write {} { ! global pdrc_options pdrc_options_h cmdline ! set fd [open $cmdline(rcfilename) w] #set fd stdout; puts "WOULD SAVE:" ! foreach {type names} $pdrc_options { set name [lindex [split [lindex $names 0] "|"] 0] if {[info exists _($self:$name)]} {set v $_($self:$name)} ;# bug in objective.tcl ? --- 7338,7344 ----
def ServerPrefsDialog write {} { ! set fd [open $::cmdline(rcfilename) w] #set fd stdout; puts "WOULD SAVE:" ! foreach {type names} $::pdrc_options { set name [lindex [split [lindex $names 0] "|"] 0] if {[info exists _($self:$name)]} {set v $_($self:$name)} ;# bug in objective.tcl ? *************** *** 7592,7598 ****
def ClientPrefsDialog write {} { ! global cmdline look key $self get_val ! set fd [open $cmdline(ddrcfilename) w] foreach category {look key} { set class_list {} --- 7546,7552 ----
def ClientPrefsDialog write {} { ! global look key $self get_val ! set fd [open $::cmdline(ddrcfilename) w] foreach category {look key} { set class_list {} *************** *** 7815,7822 **** super close wm title .$self "About DesireData" ! pack [label .$self.title -text $::pd_version -font {helvetica 24}] -side top ! pack [label .$self.date -text "released on 2006.12.??"] -side top ! pack [text .$self.text -yscrollcommand ".$self.scroll set" -width 72 ! ] -side left -fill both -expand yes pack [scrollbar .$self.scroll -command ".$self.text yview"] -side right -fill y -expand yes #12345678901234567890123456789012345678901234567890123456789012345678901 <- 72 chars --- 7769,7774 ---- super close wm title .$self "About DesireData" ! pack [label .$self.title -text $::pd_version -font {helvetica 18}] -side top ! pack [text .$self.text -yscrollcommand ".$self.scroll set" -width 72 -height 36] -side left -fill both -expand yes pack [scrollbar .$self.scroll -command ".$self.text yview"] -side right -fill y -expand yes #12345678901234567890123456789012345678901234567890123456789012345678901 <- 72 chars *************** *** 7855,7860 **** The Pd mailing list archive at http://lists.puredata.info/pipermail/pd-list/
! (insert here: link to "reference documentation for Pd", that is, ! chapter 1)"
# this looks bad on OSX, iirc --- 7807,7811 ---- The Pd mailing list archive at http://lists.puredata.info/pipermail/pd-list/
! (insert here: link to "reference documentation for Pd", that is, chapter 1)"
# this looks bad on OSX, iirc