Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17649/pd/src
Modified Files: m_sched.c s_audio.c u_main.tk Log Message: 0.41-10 test 10 - many patches, plus work on callback scheduling
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** s_audio.c 18 Aug 2007 23:58:28 -0000 1.14 --- s_audio.c 28 Dec 2007 03:28:31 -0000 1.15 *************** *** 732,736 ****
if (newcallback < 0) ! newcallback = 0; if (audio_callback == newcallback) sys_close_audio(); --- 732,736 ----
if (newcallback < 0) ! newcallback = 0; if (audio_callback == newcallback) sys_close_audio();
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** u_main.tk 18 Aug 2007 23:32:44 -0000 1.28 --- u_main.tk 28 Dec 2007 03:28:31 -0000 1.29 *************** *** 418,487 **** ################## help browser and support functions ######################### proc menu_doc_browser {dir} { ! global .mbar ! if {![file isdirectory $dir]} { ! puts stderr "menu_doc_browser non-directory $dir\n" ! } ! if { [winfo exists .help_browser.frame] } { ! raise .help_browser ! } else { ! toplevel .help_browser -menu .mbar ! wm title .help_browser "Pd Documentation Browser" ! frame .help_browser.frame ! pack .help_browser.frame -side top -fill both ! doc_make_listbox .help_browser.frame $dir 0 } }
proc doc_make_listbox {base dir count} { ! # check for [file readable]? ! #if { [info tclversion] >= 8.5 } { ! # requires Tcl 8.5 but probably deals with special chars better ! # destroy {expand}[lrange [winfo children $base] [expr {2 * $count}] end] ! #} else { ! if { [catch { eval destroy [lrange [winfo children $base] \ ! [expr { 2 * $count }] end] } \ ! errorMessage] } { ! puts stderr "doc_make_listbox: error listing $dir\n" ! } ! #} ! # exportselection 0 looks good, but selection gets easily out-of-sync ! set current_listbox [listbox "[set b "$base.listbox$count"]-list" -yscrollcommand \ ! [list "$b-scroll" set] -height 20 -exportselection 0] ! pack $current_listbox [scrollbar "$b-scroll" -command [list $current_listbox yview]] \ ! -side left -expand 1 -fill y -anchor w ! foreach item [concat [lsort -dictionary [glob -directory $dir -nocomplain -types {d} -- *]] \ ! [lsort -dictionary [glob -directory $dir -nocomplain -types {f} -- *]]] { ! $current_listbox insert end "[file tail $item][expr {[file isdirectory $item] ? {/} : {}}]" ! } ! bind $current_listbox <Button-1> [list doc_navigate $dir $count %W %x %y] ! bind $current_listbox <Double-Button-1> [list doc_double_button $dir $count %W %x %y] }
proc doc_navigate {dir count width x y} { ! if {[set newdir [$width get [$width index "@$x,$y"]]] eq {}} { ! return ! } ! set dir_to_open [file join $dir $newdir] ! if {[file isdirectory $dir_to_open]} { ! doc_make_listbox [winfo parent $width] $dir_to_open [incr count] ! } }
proc doc_double_button {dir count width x y} { ! global pd_guidir ! if {[set newdir [$width get [$width index "@$x,$y"]]] eq {}} { ! return ! } ! set dir_to_open [file join $dir $newdir] ! if {[file isdirectory $dir_to_open]} { ! doc_navigate $dir $count $width $x $y ! } else { ! regsub -- $pd_guidir [file dirname $dir_to_open] "" subdir ! set file [file tail $dir_to_open] ! if { [catch {menu_doc_open $subdir $file} fid] } { ! puts stderr "Could not open $pd_guidir/$subdir/$file\n" ! } ! return; ! } }
--- 418,487 ---- ################## help browser and support functions ######################### proc menu_doc_browser {dir} { ! global .mbar ! if {![file isdirectory $dir]} { ! puts stderr "menu_doc_browser non-directory $dir\n" ! } ! if { [winfo exists .help_browser.frame] } { ! raise .help_browser ! } else { ! toplevel .help_browser -menu .mbar ! wm title .help_browser "Pd Documentation Browser" ! frame .help_browser.frame ! pack .help_browser.frame -side top -fill both ! doc_make_listbox .help_browser.frame $dir 0 } }
proc doc_make_listbox {base dir count} { ! # check for [file readable]? ! #if { [info tclversion] >= 8.5 } { ! # requires Tcl 8.5 but probably deals with special chars better ! # destroy {expand}[lrange [winfo children $base] [expr {2 * $count}] end] ! #} else { ! if { [catch { eval destroy [lrange [winfo children $base] \ ! [expr { 2 * $count }] end] } \ ! errorMessage] } { ! puts stderr "doc_make_listbox: error listing $dir\n" ! } ! #} ! # exportselection 0 looks good, but selection gets easily out-of-sync ! set current_listbox [listbox "[set b "$base.listbox$count"]-list" -yscrollcommand \ ! [list "$b-scroll" set] -height 20 -exportselection 0] ! pack $current_listbox [scrollbar "$b-scroll" -command [list $current_listbox yview]] \ ! -side left -expand 1 -fill y -anchor w ! foreach item [concat [lsort -dictionary [glob -directory $dir -nocomplain -types {d} -- *]] \ ! [lsort -dictionary [glob -directory $dir -nocomplain -types {f} -- *]]] { ! $current_listbox insert end "[file tail $item][expr {[file isdirectory $item] ? {/} : {}}]" ! } ! bind $current_listbox <Button-1> [list doc_navigate $dir $count %W %x %y] ! bind $current_listbox <Double-Button-1> [list doc_double_button $dir $count %W %x %y] }
proc doc_navigate {dir count width x y} { ! if {[set newdir [$width get [$width index "@$x,$y"]]] eq {}} { ! return ! } ! set dir_to_open [file join $dir $newdir] ! if {[file isdirectory $dir_to_open]} { ! doc_make_listbox [winfo parent $width] $dir_to_open [incr count] ! } }
proc doc_double_button {dir count width x y} { ! global pd_guidir ! if {[set newdir [$width get [$width index "@$x,$y"]]] eq {}} { ! return ! } ! set dir_to_open [file join $dir $newdir] ! if {[file isdirectory $dir_to_open]} { ! doc_navigate $dir $count $width $x $y ! } else { ! regsub -- $pd_guidir [file dirname $dir_to_open] "" subdir ! set file [file tail $dir_to_open] ! if { [catch {menu_doc_open $subdir $file} fid] } { ! puts stderr "Could not open $pd_guidir/$subdir/$file\n" ! } ! return; ! } }
*************** *** 3282,3296 **** set height0 [lindex [font metrics $font] 5] set fontlist [concat $fontlist $i [font measure $font x] \ ! [lindex [font metrics $font] 5]] }
set tclpatch [info patchlevel] if {$tclpatch == "8.3.0" || \ ! $tclpatch == "8.3.1" || \ ! $tclpatch == "8.3.2" || \ ! $tclpatch == "8.3.3" } { ! set oldtclversion 1 } else { ! set oldtclversion 0 } pd [concat pd init [pdtk_enquote [pwd]] $oldtclversion $fontlist ;]; --- 3282,3296 ---- set height0 [lindex [font metrics $font] 5] set fontlist [concat $fontlist $i [font measure $font x] \ ! [lindex [font metrics $font] 5]] }
set tclpatch [info patchlevel] if {$tclpatch == "8.3.0" || \ ! $tclpatch == "8.3.1" || \ ! $tclpatch == "8.3.2" || \ ! $tclpatch == "8.3.3" } { ! set oldtclversion 1 } else { ! set oldtclversion 0 } pd [concat pd init [pdtk_enquote [pwd]] $oldtclversion $fontlist ;];
Index: m_sched.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_sched.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** m_sched.c 18 Aug 2007 23:32:44 -0000 1.10 --- m_sched.c 28 Dec 2007 03:28:31 -0000 1.11 *************** *** 535,539 **** Sleep(1000); #else ! sleep(1); #endif if (sys_idlehook) --- 535,539 ---- Sleep(1000); #else ! sleep(1); #endif if (sys_idlehook)