[PD-cvs] SF.net SVN: pure-data:[10500] branches/pd-devel/0.41.4/src

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Sat Jan 10 18:02:36 CET 2009


Revision: 10500
          http://pure-data.svn.sourceforge.net/pure-data/?rev=10500&view=rev
Author:   eighthave
Date:     2009-01-10 17:02:36 +0000 (Sat, 10 Jan 2009)

Log Message:
-----------
- if Tcl < 8.4.14, then create the preferences on the .apple menu on 8.4.14 or
  later, it is created automatically and tied to ::tk::mac::ShowPreferences

Modified Paths:
--------------
    branches/pd-devel/0.41.4/src/pd.tk
    branches/pd-devel/0.41.4/src/pd_menucommands.tcl
    branches/pd-devel/0.41.4/src/pd_menus.tcl
    branches/pd-devel/0.41.4/src/wheredoesthisgo.tcl

Modified: branches/pd-devel/0.41.4/src/pd.tk
===================================================================
--- branches/pd-devel/0.41.4/src/pd.tk	2009-01-10 05:47:05 UTC (rev 10499)
+++ branches/pd-devel/0.41.4/src/pd.tk	2009-01-10 17:02:36 UTC (rev 10500)
@@ -121,10 +121,9 @@
 
 	# the popup menu for the canvas
     menu $name.popup -tearoff false
-    $name.popup add command -label "Properties" -command {popup_action $name 0}
-    $name.popup add command -label "Open"       -command {popup_action $name 1}
-    $name.popup add command -label "Help"       -command {popup_action $name 2}
-
+    $name.popup add command -label "Properties" -command "popup_action $name 0"
+    $name.popup add command -label "Open"       -command "popup_action $name 1"
+    $name.popup add command -label "Help"       -command "popup_action $name 2"
 }
 
 # ------------------------------------------------------------------------------

Modified: branches/pd-devel/0.41.4/src/pd_menucommands.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/pd_menucommands.tcl	2009-01-10 05:47:05 UTC (rev 10499)
+++ branches/pd-devel/0.41.4/src/pd_menucommands.tcl	2009-01-10 17:02:36 UTC (rev 10500)
@@ -8,6 +8,7 @@
     variable untitled_directory [pwd]
 
 	namespace export menu_*
+
 }
 
 # ------------------------------------------------------------------------------

Modified: branches/pd-devel/0.41.4/src/pd_menus.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/pd_menus.tcl	2009-01-10 05:47:05 UTC (rev 10499)
+++ branches/pd-devel/0.41.4/src/pd_menus.tcl	2009-01-10 17:02:36 UTC (rev 10500)
@@ -289,11 +289,16 @@
 proc ::pd_menus::make_apple_menu {rootmenu} {
 	puts stderr CREATE_APPLE_MENU
 	# TODO this should open a Pd patch called about.pd
-	menu .menubar.apple
-	.menubar.apple add command -label [say "About Pd"] -command \
-		"menu_doc_open doc/1.manual 1.introduction.txt" 
-    .menubar add cascade -label "Apple" -menu .menubar.apple
-	# TODO WTF?!? the preferences menu never shows up!
+	menu $rootmenu.apple
+	$rootmenu.apple add command -label [say "About Pd"] \
+		-command "menu_doc_open doc/1.manual 1.introduction.txt" 
+    $rootmenu add cascade -label "Apple" -menu $rootmenu.apple
+	# starting in 8.4.14, this is created automatically
+	if {[regsub -- {[0-9]\.[0-9]\.([0-9][0-9]*)} [info patchlevel] {\1}] < 14} {
+		$rootmenu.apple add separator
+		$rootmenu.apple add command -label [say "Preferences..."] \
+			-command "menu_preferences" -accelerator "Cmd+,"
+	}
 }
 
 # for Windows only

Modified: branches/pd-devel/0.41.4/src/wheredoesthisgo.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/wheredoesthisgo.tcl	2009-01-10 05:47:05 UTC (rev 10499)
+++ branches/pd-devel/0.41.4/src/wheredoesthisgo.tcl	2009-01-10 17:02:36 UTC (rev 10500)
@@ -21,7 +21,18 @@
 }
 
 
+set pd_opendir [pwd]
+proc open_file {filename} {
+    global pd_opendir
+    set directory [string range $filename 0 [expr [string last / $filename] - 1]]
+    set pd_opendir $directory
+    set basename [string range $filename [expr [string last / $filename] + 1] end]
+    if {[string last .pd $filename] >= 0} {
+        pd "pd open [pdtk_enquote $basename] [pdtk_enquote $directory] ;"
+    }
+}
 
+
 # ------------------------------------------------------------------------------
 # kludges to avoid changing C code
 


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