Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21080
Modified Files: Tag: devel_0_39 desire.tk Log Message: $pd_tk replaced by $OS (and using names instead of numbers)
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.46 retrieving revision 1.1.2.47 diff -C2 -d -r1.1.2.46 -r1.1.2.47 *** desire.tk 13 Sep 2005 19:42:38 -0000 1.1.2.46 --- desire.tk 13 Sep 2005 20:00:50 -0000 1.1.2.47 *************** *** 25,30 **** }
! #rename unknown _original_unknown ! proc unknownBLEH {args} { global _ if {[catch { --- 25,30 ---- }
! rename unknown _original_unknown ! proc unknown {args} { global _ if {[catch { *************** *** 64,68 ****
#-----------------------------------------------------------------------------------# ! set pd_nt 0
#option add *background #ffffff --- 64,68 ----
#-----------------------------------------------------------------------------------# ! set OS $tcl_platform(platform)
#option add *background #ffffff *************** *** 132,139 **** }
! # Tearoff is set to true by default: ! set pd_tearoff 1 ! ! if {$pd_nt == 1} { global pd_guidir pd_tearoff set pd_gui2 [string range $argv0 0 [expr [string last \ $argv0] - 1]] --- 132,137 ---- }
! switch $OS { ! win32 { global pd_guidir pd_tearoff set pd_gui2 [string range $argv0 0 [expr [string last \ $argv0] - 1]] *************** *** 142,148 **** load $pd_guidir/bin/pdtcl set pd_tearoff 1 ! } ! ! if {$pd_nt == 2} { global pd_guidir pd_tearoff set pd_gui2 [string range $argv0 0 [expr [string last / $argv0] - 1]] --- 140,145 ---- load $pd_guidir/bin/pdtcl set pd_tearoff 1 ! } ! osx { global pd_guidir pd_tearoff set pd_gui2 [string range $argv0 0 [expr [string last / $argv0] - 1]] *************** *** 150,153 **** --- 147,152 ---- load $pd_guidir/bin/pdtcl set pd_tearoff 0 + } + default {set pd_tearoff 1} }
*************** *** 155,159 **** # (which is normally defined at startup in pd under linux...)
! if {$pd_nt == 0} { if {! [info exists pd_guidir]} { global pd_guidir --- 154,159 ---- # (which is normally defined at startup in pd under linux...)
! switch $OS { ! unix { if {! [info exists pd_guidir]} { global pd_guidir *************** *** 161,164 **** --- 161,165 ---- set pd_guidir . } + } }
*************** *** 269,277 **** bind . <Control-Key> {pd_ctrlkey %W %K 0} bind . <Control-Shift-Key> {pd_ctrlkey %W %K 1} ! if {$pd_nt == 2} { bind . <Mod1-Key> {canvas_ctrlkey %W %K 0} bind . <Mod1-Shift-Key> {canvas_ctrlkey %W %K 1} } - wm title . "DesireData" . configure -menu .mbar --- 270,279 ---- bind . <Control-Key> {pd_ctrlkey %W %K 0} bind . <Control-Shift-Key> {pd_ctrlkey %W %K 1} ! switch $OS { ! osx { bind . <Mod1-Key> {canvas_ctrlkey %W %K 0} bind . <Mod1-Shift-Key> {canvas_ctrlkey %W %K 1} + } } wm title . "DesireData" . configure -menu .mbar *************** *** 414,419 **** # Odd little function to make better Mac accelerators proc accel_munge {acc} { ! global pd_nt ! if {$pd_nt == 2} { set tmp [string toupper [string map {Ctrl Meta} $acc] end] if [string is upper [string index $acc end]] { --- 416,422 ---- # Odd little function to make better Mac accelerators proc accel_munge {acc} { ! global OS ! switch $OS { ! osx { set tmp [string toupper [string map {Ctrl Meta} $acc] end] if [string is upper [string index $acc end]] { *************** *** 422,427 **** return $tmp } ! } else { ! return $acc } } --- 425,430 ---- return $tmp } ! } ! default {return $acc} } } *************** *** 700,705 **** set mouse(b1down) 0
- #set pd_nt 0 - #-----------------------------------------------------------------------------------# set look(iowidth) 7 --- 703,706 ---- *************** *** 816,822 **** }
! if {$pd_nt != 2} { lappend canvasmenu(media) {{Audio settings...} {pd pd audio-properties ;} {}} lappend canvasmenu(media) {{MIDI settings...} {pd pd midi-properties ;} {}} }
--- 817,826 ---- }
! switch $OS { ! osx {} ! default { lappend canvasmenu(media) {{Audio settings...} {pd pd audio-properties ;} {}} lappend canvasmenu(media) {{MIDI settings...} {pd pd midi-properties ;} {}} + } }
*************** *** 907,911 ****
proc canvas_new_menubar {name editable} { ! global pd_opendir pd_tearoff pd_nt cmdline canvasmenu _ menu $name.m menu $name.m.file -tearoff $pd_tearoff --- 911,915 ----
proc canvas_new_menubar {name editable} { ! global pd_opendir pd_tearoff OS cmdline canvasmenu _ menu $name.m menu $name.m.file -tearoff $pd_tearoff *************** *** 959,963 **** proc canvas_new {name width height geometry editable} { #puts "canvas_new::: $name $width $height $geometry $editable" ! global pd_opendir pd_tearoff pd_nt cmdline canvasmenu _ # my code begins --chun set _(focus) $name.c --- 963,967 ---- proc canvas_new {name width height geometry editable} { #puts "canvas_new::: $name $width $height $geometry $editable" ! global pd_opendir pd_tearoff OS cmdline canvasmenu _ # my code begins --chun set _(focus) $name.c *************** *** 1004,1014 **** bind $c <Alt-Control-Button> {canvas_click %W %x %y %b 6} bind $c <Alt-Control-Shift-Button> {canvas_click %W %x %y %b 7} ! global pd_nt ! if {$pd_nt == 2} { bind $c <Button-2> {canvas_click %W %x %y %b 8} bind $c <Control-Button> {canvas_click %W %x %y %b 8} ! } else { bind $c <Button-3> {canvas_click %W %x %y %b 8} bind $c <Control-Button> {canvas_click %W %x %y %b 2} } # change mac to right-click, not middle click -atl 2002.09.02 --- 1008,1021 ---- bind $c <Alt-Control-Button> {canvas_click %W %x %y %b 6} bind $c <Alt-Control-Shift-Button> {canvas_click %W %x %y %b 7} ! global OS ! switch $OS { ! osx { bind $c <Button-2> {canvas_click %W %x %y %b 8} bind $c <Control-Button> {canvas_click %W %x %y %b 8} ! } ! default { bind $c <Button-3> {canvas_click %W %x %y %b 8} bind $c <Control-Button> {canvas_click %W %x %y %b 2} + } } # change mac to right-click, not middle click -atl 2002.09.02 *************** *** 1017,1027 **** bind $c <Control-Shift-Key> {canvas_ctrlkey %W %K 1} bind $c <Alt-Key> {canvas_altkey %W %K %A} ! if {$pd_nt == 0} { bind $c <Mod1-Key> {canvas_altkey %W %K %A} bind $c <Mod4-Key> {canvas_altkey %W %K %A} ! } ! if {$pd_nt == 2} { bind $c <Mod1-Key> {canvas_ctrlkey %W %K 0} bind $c <Mod1-Shift-Key> {canvas_ctrlkey %W %K 1} } bind $c <Key> {canvas_key %W %x %y %K %A 0} --- 1024,1036 ---- bind $c <Control-Shift-Key> {canvas_ctrlkey %W %K 1} bind $c <Alt-Key> {canvas_altkey %W %K %A} ! switch $OS { ! unix { bind $c <Mod1-Key> {canvas_altkey %W %K %A} bind $c <Mod4-Key> {canvas_altkey %W %K %A} ! } ! osx { bind $c <Mod1-Key> {canvas_ctrlkey %W %K 0} bind $c <Mod1-Shift-Key> {canvas_ctrlkey %W %K 1} + } } bind $c <Key> {canvas_key %W %x %y %K %A 0} *************** *** 1036,1041 **** bind $c <Motion> "+statusbar_update $name %x %y"
! global pd_nt ! switch $pd_nt { 0 { bind $c <Button-4> "pdtk_canvas_scroll $name.c y -1" bind $c <Button-5> "pdtk_canvas_scroll $name.c y +1" --- 1045,1050 ---- bind $c <Motion> "+statusbar_update $name %x %y"
! global OS ! switch $OS { unix { bind $c <Button-4> "pdtk_canvas_scroll $name.c y -1" bind $c <Button-5> "pdtk_canvas_scroll $name.c y +1" *************** *** 1245,1250 ****
#-----------------------------------------------------------------------------------# ! switch $pd_nt { ! 2 { set look(extrapix) 2 } default { set look(extrapix) 1 } } --- 1254,1259 ----
#-----------------------------------------------------------------------------------# ! switch $OS { ! osx { set look(extrapix) 2 } default { set look(extrapix) 1 } } *************** *** 1315,1325 ****
#-----------------------------------------------------------------------------------# - proc test {canvas x y mods state} { - #puts "test::: $canvas $x $y $mods $state" - #canvas_motion2 $canvas $x $y $mods $state - #statusbar_update [canvastosym $canvas] $x $y - } - - #-----------------------------------------------------------------------------------# def text create {canvas font_size text} { #puts "text_create:: $self $canvas $font_size" --- 1324,1327 ---- *************** *** 1348,1352 **** $t insert 1.0 $text #bind $t <Motion> {canvas_motion %W %x %y 0 %s} - #bind $t <Motion> {test %W %x %y 0 %s} #$name.c #puts "___ $t ___" --- 1350,1353 ---- *************** *** 1778,1782 **** #puts "canvas_click2::: $canvas $x $y $b $f"
! global _ wire_from rightclick_object pd_nt select_area mouse font look set self [canvastosym $canvas] set cx [$canvas canvasx $x] --- 1779,1783 ---- #puts "canvas_click2::: $canvas $x $y $b $f"
! global _ wire_from rightclick_object OS select_area mouse font look set self [canvastosym $canvas] set cx [$canvas canvasx $x] *************** *** 1923,1928 **** set _($self:action) rect $canvas create line $cx $cy $cx $cy $cx $cy $cx $cy $cx $cy -tags selrect ! global pd_nt ! switch $pd_nt { 2 {} default { $canvas itemconfigure selrect -dash {3 3 3 3}}} } } --- 1924,1929 ---- set _($self:action) rect $canvas create line $cx $cy $cx $cy $cx $cy $cx $cy $cx $cy -tags selrect ! global OS ! switch $OS { osx {} default { $canvas itemconfigure selrect -dash {3 3 3 3}}} } } *************** *** 2219,2231 **** #puts "canvas_key::: $canvas $x $y $key $iso $shift"
! global pd_nt global _ set self [canvastosym $canvas] #hide_canvas_tooltip $canvas ! if {$pd_nt == 2} { switch -- $key { BackSpace {set key 8; set keynum 8} Delete {set key 8; set keynum 8} } } if {$key == "KP_Delete"} {set key 127; set keynum 127} --- 2220,2234 ---- #puts "canvas_key::: $canvas $x $y $key $iso $shift"
! global OS global _ set self [canvastosym $canvas] #hide_canvas_tooltip $canvas ! switch $OS { ! osx { switch -- $key { BackSpace {set key 8; set keynum 8} Delete {set key 8; set keynum 8} } + } } if {$key == "KP_Delete"} {set key 127; set keynum 127} *************** *** 3129,3133 ****
proc make_console {} { ! global cmdline pd_nt set errMsg "" catch { --- 3132,3136 ----
proc make_console {} { ! global cmdline set errMsg "" catch { *************** *** 3136,3151 **** text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set" scrollbar .log.2 -command ".log.1 yview" ! global tcl_version tk_version pd_myversion tcl_platform pd_nt ! #.log.1 insert end "$pd_myversion" ! .log.1 insert end "DesireData 0.39.A\n" ! .log.1 insert end "Tcl $tcl_version, Tk $tk_version, pd_nt=$pd_nt\n" ! #foreach k [array names tcl_platform] { ! # .log.1 insert end "tcl_platform($k) = $tcl_platform($k)\n" ! #} pack .log.1 -side left -fill both -expand yes pack .log.2 -side left -fill y -expand no pack .log -fill both -expand yes .log.2 set 0.0 1.0 ! switch $pd_nt { 2 { bind .log.1 <MouseWheel> { .log.1 yview scroll [expr -2-abs(%D)/%D] units --- 3139,3153 ---- text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set" scrollbar .log.2 -command ".log.1 yview" ! global tcl_version tk_version pd_myversion tcl_platform OS ! .log.1 insert end "DesireData 0.39.A" ! .log.1 insert end "Tcl $tcl_version, Tk $tk_version\n" ! foreach k [array names tcl_platform] { ! .log.1 insert end "tcl_platform($k) = $tcl_platform($k)\n" ! } pack .log.1 -side left -fill both -expand yes pack .log.2 -side left -fill y -expand no pack .log -fill both -expand yes .log.2 set 0.0 1.0 ! switch $OS { osx { bind .log.1 <MouseWheel> { .log.1 yview scroll [expr -2-abs(%D)/%D] units