diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-11-30 21:18:47 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-11-30 21:18:47 +0000 |
commit | e58f6b3236f51c06e53c407a46d41f5e898c3b3c (patch) | |
tree | 0f591563a53ca78869729ec022f76de692306885 /pdwindow_popup_mode-plugin.tcl |
added the simple plugins from the pd-gui-rewrite/0.43/startup branchsvn2git-root
svn path=/trunk/scripts/guiplugins/simple_examples/; revision=14540
Diffstat (limited to 'pdwindow_popup_mode-plugin.tcl')
-rw-r--r-- | pdwindow_popup_mode-plugin.tcl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pdwindow_popup_mode-plugin.tcl b/pdwindow_popup_mode-plugin.tcl new file mode 100644 index 0000000..fd1c296 --- /dev/null +++ b/pdwindow_popup_mode-plugin.tcl @@ -0,0 +1,19 @@ +# create an option for a mode where the Pd window pops up whenever anything is +# printed to the text box in the Pd window + +set ::pdwindow::popupmode 0 +rename pdtk_post pdtk_post_original +proc pdtk_post {message} { + if {$::pdwindow::popupmode} { + wm deiconify .pdwindow + raise .pdwindow + } + pdtk_post_original $message +} + +set mymenu .menubar.window +set inserthere [$mymenu index [_ "Parent Window"]] +$mymenu insert $inserthere separator +$mymenu insert $inserthere check -label [_ " Popup mode"] -variable ::pdwindow::popupmode + + |