[PD-cvs] SF.net SVN: pure-data: [9722] branches/pd-extended/v0-40/pd/src/u_main.tk

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Fri Apr 25 01:52:36 CEST 2008


Revision: 9722
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9722&view=rev
Author:   eighthave
Date:     2008-04-24 16:52:36 -0700 (Thu, 24 Apr 2008)

Log Message:
-----------
If you are currently viewing a help patch, the "Pdpedia" menu item on the help
menu take you to the pdpedia page of the object from that help patch.
Currently, it sends you to the English page, but language detection could be added.

Modified Paths:
--------------
    branches/pd-extended/v0-40/pd/src/u_main.tk

Modified: branches/pd-extended/v0-40/pd/src/u_main.tk
===================================================================
--- branches/pd-extended/v0-40/pd/src/u_main.tk	2008-04-23 03:55:00 UTC (rev 9721)
+++ branches/pd-extended/v0-40/pd/src/u_main.tk	2008-04-24 23:52:36 UTC (rev 9722)
@@ -539,6 +539,17 @@
     }
 }
 
+proc menu_openpdpedia {} {
+	set top_window [lindex [wm stackorder .] end]
+	set window_title [wm title $top_window]
+	set helpfile [regsub {(.*)-help.*} $window_title {\1}]
+	if {[string compare $helpfile $window_title]} {
+		menu_openhtml "http://wiki.puredata.info/en/$helpfile"
+	} else {
+		menu_openhtml "http://wiki.puredata.info/"
+	}
+}
+
 proc menu_doc_open {subdir basename} {
     global pd_guidir
     
@@ -701,7 +712,7 @@
     $mbar.help add command -label {puredata.info} \
         -command {menu_openhtml http://puredata.info} 
     $mbar.help add command -label {Pdpedia} \
-        -command {menu_openhtml http://pdpedia.org} 
+        -command {menu_openpdpedia} 
     $mbar.help add command -label {FAQ} \
         -command {menu_openhtml http://puredata.info/docs/faq} 
     $mbar.help add separator
@@ -2328,9 +2339,9 @@
 
 proc popup_action {name action} {
     global popup_xpix popup_ypix
-    set cmd [concat $name done-popup $action $popup_xpix $popup_ypix \;]
-    #    puts stderr $cmd
-    pd $cmd
+	set cmd [concat $name done-popup $action $popup_xpix $popup_ypix \;]
+	#    puts stderr $cmd
+	pd $cmd
 }
 
 proc pdtk_canvas_popup {name xpix ypix canprop canopen} {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list