[PD-cvs] pd/src desire.tk,1.1.2.600.2.24,1.1.2.600.2.25

Mathieu Bouchard matju at users.sourceforge.net
Wed Dec 6 03:41:09 CET 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18159

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
added Help->Documentation back in


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.24
retrieving revision 1.1.2.600.2.25
diff -C2 -d -r1.1.2.600.2.24 -r1.1.2.600.2.25
*** desire.tk	6 Dec 2006 00:02:21 -0000	1.1.2.600.2.24
--- desire.tk	6 Dec 2006 02:41:05 -0000	1.1.2.600.2.25
***************
*** 231,237 ****
  
  # you pass the 2nd argument if and only if the message creates an object (or pretends to).
! # this happens with those methods of #X (canvases):
! #   obj, msg, floatatom, symbolatom, text, pop, connect, text_setto.
! # #N doesn't count and instead #X restore counts and #X pop counts.
  proc netsend {message {callback nonesuch}} {
  	global serial replyset sock
--- 231,237 ----
  
  # you pass the 2nd argument if and only if the message creates an object (or pretends to).
! # this happens with #N canvas, and those methods of #X:
! #   obj, msg, floatatom, symbolatom, text, connect, text_setto, array.
! # this does NOT happen with #X coords/restore/pop.
  proc netsend {message {callback nonesuch}} {
  	global serial replyset sock
***************
*** 554,559 ****
    source $langfile
  } else {
!   source [file join [file dirname $argh0] ../lib/pd/bin/$langfile]
! 
  }
  
--- 554,558 ----
    source $langfile
  } else {
!   source [file join [file dirname [file dirname $argh0]] lib/pd/bin/$langfile]
  }
  
***************
*** 688,698 ****
      frame .controls.switches
      foreach {w x y z} {
! 	audiobutton audio  ctrls_audio_on {pd pd dsp    $ctrls_audio_on}
! 	meterbutton meters ctrls_meter_on {pd pd meters $ctrls_meter_on}
      } {
  	pack [checkbutton .controls.switches.$w -text [say $x] \
  		-variable $y -anchor w -command $z] -side left
      }
!     pack [button .controls.switches.dio -text [say io_errors] -command {pd pd audiostatus} -padx 5]
      pack .controls.switches -side right
      frame .debug
--- 687,697 ----
      frame .controls.switches
      foreach {w x y z} {
! 	audiobutton audio  ctrls_audio_on {netsend "pd dsp    $ctrls_audio_on"}
! 	meterbutton meters ctrls_meter_on {netsend "pd meters $ctrls_meter_on"}
      } {
  	pack [checkbutton .controls.switches.$w -text [say $x] \
  		-variable $y -anchor w -command $z] -side left
      }
!     pack [button .controls.switches.dio -text [say io_errors] -command {netsend "pd audiostatus"} -padx 5]
      pack .controls.switches -side right
      frame .debug
***************
*** 838,842 ****
  }
  
! proc pdtk_watchdog {} {pd pd ping; after 2000 {pdtk_watchdog}}
  
  proc accel_munge {acc} {
--- 837,841 ----
  }
  
! proc pdtk_watchdog {} {netsend "pd ping"; after 2000 {pdtk_watchdog}}
  
  proc accel_munge {acc} {
***************
*** 896,900 ****
      set basename [string range $filename [expr $i+1] end]
      if {[string last .pd $filename] >= 0} {
!         pd pd open [enquote $basename] [enquote $folder]
      }
  }
--- 895,899 ----
      set basename [string range $filename [expr $i+1] end]
      if {[string last .pd $filename] >= 0} {
!         netsend "pd open [enquote $basename] [enquote $folder]"
      }
  }
***************
*** 912,916 ****
  def Client quit {} {
      set answer [tk_messageBox -message "Do you really wish to quit?" -type yesno -icon question]
!     switch -- $answer {yes {pd pd quit; exit}}
  }
  
--- 911,915 ----
  def Client quit {} {
      set answer [tk_messageBox -message "Do you really wish to quit?" -type yesno -icon question]
!     switch -- $answer {yes {netsend "pd quit"; exit}}
  }
  
***************
*** 942,946 ****
      $self populate_menu find {find find_again find_last_error}
      $self populate_menu help {
! 	about class_browser client_class_tree clipboard_view history_view do_what_i_mean {}
  	test_audio_and_midi load_meter latency_meter}
  }
--- 941,945 ----
      $self populate_menu find {find find_again find_last_error}
      $self populate_menu help {
! 	about documentation class_browser client_class_tree clipboard_view history_view do_what_i_mean {}
  	test_audio_and_midi load_meter latency_meter}
  }
***************
*** 1045,1049 ****
  	read_ddrc "defaults.ddrc"
  } else {
! 	read_ddrc [file join [file dirname $argh0] "../lib/pd/bin/defaults.ddrc"]
  }
  read_ddrc
--- 1044,1048 ----
  	read_ddrc "defaults.ddrc"
  } else {
! 	read_ddrc [file join [file dirname [file dirname $argh0]] "lib/pd/bin/defaults.ddrc"]
  }
  read_ddrc
***************
*** 1358,1370 ****
  }
  
! def Canvas     new_file {} {global main; $main  new_file}
! def Canvas    open_file {} {global main; $main open_file}
! def Canvas send_message {} {global main; $main send_message}
! def Canvas        paths {} {global main; $main paths}
! def Client          paths {} {pd pd start-path-dialog}
  def Client test_audio_and_midi {} {menu_doc_open doc/7.stuff/tools testtone.pd  }
  def Client          load_meter {} {menu_doc_open doc/7.stuff/tools load-meter.pd}
  def Client       latency_meter {} {menu_doc_open doc/7.stuff/tools latency.pd   }
- def Client  menu_documentation {} {pd menu_documentation}
  def Client about {} {AboutDialog new}
  def Client class_browser {} {Browser new_as browser browser 0 0 ""}
--- 1357,1382 ----
  }
  
! def Client documentation {} {
!     set filename [tk_getOpenFile -defaultextension .pd \
!         -filetypes { {{documentation} {.pd .txt .htm}} } -initialdir $::docdir]
!     if {$filename != ""} {
!         if {[string first .txt $filename] >= 0} {
!             menu_opentext $filename
!         } elseif {[string first .htm $filename] >= 0} {
!             menu_openhtml $filename
!         } else {
!             set help_directory [string range $filename 0 [expr [string last / $filename]-1]]
!             set basename       [string range $filename   [expr [string last / $filename]+1] end]
!             netsend "pd open [pdtk_enquote $basename] [pdtk_enquote $help_directory]"
!         }
!     }
! }
! 
! def Canvas     new_file {} {$::main  new_file}
! def Canvas    open_file {} {$::main open_file}
! def Canvas send_message {} {$::main send_message}
  def Client test_audio_and_midi {} {menu_doc_open doc/7.stuff/tools testtone.pd  }
  def Client          load_meter {} {menu_doc_open doc/7.stuff/tools load-meter.pd}
  def Client       latency_meter {} {menu_doc_open doc/7.stuff/tools latency.pd   }
  def Client about {} {AboutDialog new}
  def Client class_browser {} {Browser new_as browser browser 0 0 ""}
***************
*** 1378,1384 ****
  set pd_guidir ${pd_prefix}/lib/pd
  set doc_number 1
  
  proc menu_opentext {filename} {
!     global doc_number pd_guidir pd_myversion
      set w [format ".help%d" $doc_number]
      toplevel $w
--- 1390,1402 ----
  set pd_guidir ${pd_prefix}/lib/pd
  set doc_number 1
+ set updir [file dirname [file dirname $argh0]]
+ if {[file exists $updir/lib/pd/doc]} {
+ 	set docdir $updir/lib/pd/doc
+ } else {
+ 	set docdir $updir/doc
+ }
  
  proc menu_opentext {filename} {
!     global doc_number pd_myversion
      set w [format ".help%d" $doc_number]
      toplevel $w
***************
*** 1395,1399 ****
      while {![eof $f]} {
      	set bigstring [read $f 1000]
! 	regsub -all PD_BASEDIR $bigstring $pd_guidir bigstring
      	regsub -all PD_VERSION $bigstring $pd_myversion bigstring
      	$w.1.text insert end $bigstring
--- 1413,1417 ----
      while {![eof $f]} {
      	set bigstring [read $f 1000]
! 	regsub -all PD_BASEDIR $bigstring $::pd_guidir bigstring
      	regsub -all PD_VERSION $bigstring $pd_myversion bigstring
      	$w.1.text insert end $bigstring
***************
*** 1406,1411 ****
  
  proc menu_doc_open {subdir basename} {
!     global pd_guidir
!     set dirname $pd_guidir/$subdir
      if {[string first .txt $basename] >= 0} {
      	return [menu_opentext $dirname/$basename]
--- 1424,1428 ----
  
  proc menu_doc_open {subdir basename} {
!     set dirname $::pd_guidir/$subdir
      if {[string first .txt $basename] >= 0} {
      	return [menu_opentext $dirname/$basename]





More information about the Pd-cvs mailing list