Revision: 10553 http://pure-data.svn.sourceforge.net/pure-data/?rev=10553&view=rev Author: eighthave Date: 2009-01-14 15:32:47 +0000 (Wed, 14 Jan 2009)
Log Message: ----------- added menu_raise_pdwindow proc and put platform-specific procs at the end
Modified Paths: -------------- branches/pd-devel/0.41.4/src/pd_menucommands.tcl
Modified: branches/pd-devel/0.41.4/src/pd_menucommands.tcl =================================================================== --- branches/pd-devel/0.41.4/src/pd_menucommands.tcl 2009-01-14 14:36:28 UTC (rev 10552) +++ branches/pd-devel/0.41.4/src/pd_menucommands.tcl 2009-01-14 15:32:47 UTC (rev 10553) @@ -12,22 +12,6 @@ }
# ------------------------------------------------------------------------------ -# Mac OS X specific functions - -proc ::pd_menucommands::menu_bringalltofront {} { - #use [winfo children .] here to get windows that are minimized - foreach item [winfo children .] { - #get all toplevel windows, exclude menubar windows - if { [string equal [winfo toplevel $item] $item] && [catch {$item cget -tearoff}]} { - wm deiconify $item - } - } - #be sure to deiconify ., since the above command only gets the child toplevels - wm deiconify . -} - - -# ------------------------------------------------------------------------------ # functions called from File menu
proc ::pd_menucommands::menu_new {} { @@ -109,7 +93,6 @@ # ------------------------------------------------------------------------------ # window management functions
- proc ::pd_menucommands::menu_minimize {} { set windowlist [wm stackorder .] if {$windowlist != {}} { @@ -122,3 +105,28 @@ wm state $mytoplevel zoomed }
+proc menu_raise_pdwindow {} { + set pd_window . + set top_window [lindex [wm stackorder $pd_window] end] + if {$pd_window eq $top_window} { + lower $pd_window + } else { + wm deiconify $pd_window + raise $pd_window + } +} + +# ------------------------------------------------------------------------------ +# Mac OS X specific functions + +proc ::pd_menucommands::menu_bringalltofront {} { + #use [winfo children .] here to get windows that are minimized + foreach item [winfo children .] { + #get all toplevel windows, exclude menubar windows + if { [string equal [winfo toplevel $item] $item] && [catch {$item cget -tearoff}]} { + wm deiconify $item + } + } + #be sure to deiconify ., since the above command only gets the child toplevels + wm deiconify . +}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.