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

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Sun May 18 22:18:19 CEST 2008


Revision: 9852
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9852&view=rev
Author:   eighthave
Date:     2008-05-18 13:18:18 -0700 (Sun, 18 May 2008)

Log Message:
-----------
on Mac OS X, enabled the Window->Zoom menu item and added standard 'Minimize' and 'Zoom' items to the 'Window' menu

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-05-18 19:40:02 UTC (rev 9851)
+++ branches/pd-extended/v0-40/pd/src/u_main.tk	2008-05-18 20:18:18 UTC (rev 9852)
@@ -384,8 +384,14 @@
 set menu_windowlist {} 
 
 proc pdtk_fixwindowmenu {} {
-    global menu_windowlist
+    global menu_windowlist pd_nt
     .mbar.windows delete 0 end
+	if {$pd_nt == 2} {
+		.mbar.windows add command -label {Minimize} -command {menu_minimize .} \
+			-accelerator [accel_munge "Ctrl+m"]
+		.mbar.windows add command -label {Zoom} -command {menu_zoom .}
+		.mbar.windows add separator
+	}
     .mbar.windows add command -label {parent window} -state disabled
     .mbar.windows add command -label {Pd window} -command menu_raise_console \
 		-accelerator [accel_munge "Ctrl+r"] -state disabled
@@ -488,6 +494,10 @@
 	}
 }
 
+proc menu_zoom {window} {
+	wm state $window zoomed
+}
+
 proc menu_raisenextwindow {} {
 	raise [lindex [wm stackorder .] 1]
 }
@@ -1051,14 +1061,17 @@
 }
 
 proc menu_fixwindowmenu {name} {
-    global menu_windowlist
-    global pd_tearoff
+    global menu_windowlist pd_tearoff pd_nt
     $name.m.windows add command
-    if $pd_tearoff {
-        $name.m.windows delete 4 end
-    } else {
-        $name.m.windows delete 3 end
-    }
+	if {$pd_nt == 2} {
+		$name.m.windows delete 6 end
+	} else {
+		if $pd_tearoff {
+			$name.m.windows delete 4 end
+		} else {
+			$name.m.windows delete 3 end
+		}
+	}
     foreach i $menu_windowlist {
         $name.m.windows add command -label [lindex $i 0] \
             -command [concat menu_domenuwindow [lindex $i 1]]
@@ -1399,6 +1412,12 @@
     menu $name.m.windows -postcommand [concat menu_fixwindowmenu $name] \
         -tearoff $pd_tearoff
 
+	if {$pd_nt == 2} {
+		$name.m.windows add command -label {Minimize} \
+			-command "menu_minimize $name" -accelerator [accel_munge "Ctrl+m"]
+		$name.m.windows add command -label {Zoom} -command "menu_zoom $name"
+		$name.m.windows add separator
+	}
     $name.m.windows add command -label {parent window}\
         -command [concat menu_windowparent $name] 
     $name.m.windows add command -label {Pd window} -command menu_raise_console \


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