From fe27153cb911f4756f930f41cac56f1e756b08a7 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 20 Apr 2009 16:53:13 +0000 Subject: created object to control whether you can quit Pd using the GUI or not svn path=/trunk/externals/hcs/; revision=11066 --- noquit-help.pd | 19 +++++++++++++++++++ noquit.pd | 30 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 noquit-help.pd create mode 100644 noquit.pd diff --git a/noquit-help.pd b/noquit-help.pd new file mode 100644 index 0000000..1e06868 --- /dev/null +++ b/noquit-help.pd @@ -0,0 +1,19 @@ +#N canvas 154 41 431 325 10; +#X obj 134 232 noquit; +#X obj 134 127 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 151 151 bang; +#X msg 167 175 reset; +#X msg 178 198 quit; +#X text 188 152 disable quitting; +#X text 209 173 re-enable quitting; +#X text 158 126 enable/disable quitting; +#X text 34 58 disable quitting for installations \, performances \, +etc.; +#X obj 9 7 cnv 15 400 30 empty empty noquit 20 16 0 14 -261682 -66577 +0; +#X text 219 197 quit now; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; diff --git a/noquit.pd b/noquit.pd new file mode 100644 index 0000000..9af72ec --- /dev/null +++ b/noquit.pd @@ -0,0 +1,30 @@ +#N canvas 343 307 534 352 10; +#X obj 124 283 sys_gui; +#X obj 85 49 inlet; +#X obj 86 75 route bang float; +#X text 38 12 this disables/enables the menu_quit proc in the GUI to +prevent quitting; +#X obj 132 98 select 0; +#X obj 191 165 bang; +#X obj 123 165 bang; +#X obj 284 121 print ERROR: no method for; +#X msg 192 229 proc menu_quit "" menu_really_quit; +#X msg 123 190 proc menu_quit "" [list pdtk_post "- noquit enabled +-"]; +#X obj 191 98 route reset quit; +#X obj 237 165 send pd; +#X msg 237 142 verifyquit; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 2 1 4 0; +#X connect 2 2 10 0; +#X connect 4 0 5 0; +#X connect 4 1 6 0; +#X connect 5 0 8 0; +#X connect 6 0 9 0; +#X connect 8 0 0 0; +#X connect 9 0 0 0; +#X connect 10 0 5 0; +#X connect 10 1 12 0; +#X connect 10 2 7 0; +#X connect 12 0 11 0; -- cgit v1.2.1