From 89a330f7157ae073eede077a157704a0c0f0828e Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 28 Apr 2009 22:55:39 +0000 Subject: added outlet to bang when quit is selected in quit-disabled-mode; switched to using Tcl's rename to handle the function renaming svn path=/trunk/externals/hcs/; revision=11194 --- noquit-help.pd | 16 ++++++++++----- noquit.pd | 63 +++++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 28 deletions(-) diff --git a/noquit-help.pd b/noquit-help.pd index 1e06868..1955bca 100644 --- a/noquit-help.pd +++ b/noquit-help.pd @@ -1,5 +1,5 @@ -#N canvas 154 41 431 325 10; -#X obj 134 232 noquit; +#N canvas 299 22 431 325 10; +#X obj 134 242 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; @@ -8,12 +8,18 @@ #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 text 34 58 disable quitting for installations \, performances \, +fun \, etc.; +#X obj 134 270 bng 35 250 50 0 empty empty bang_on_quit 38 17 0 12 +-261234 -1 -1; +#X text 229 217 quit now; +#X msg 178 218 quitnow; +#X text 229 197 quit in the normal way; +#X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 0 0; +#X connect 12 0 0 0; diff --git a/noquit.pd b/noquit.pd index 9af72ec..c805fe9 100644 --- a/noquit.pd +++ b/noquit.pd @@ -1,30 +1,47 @@ -#N canvas 343 307 534 352 10; -#X obj 124 283 sys_gui; +#N canvas 377 277 497 454 10; #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 obj 191 145 bang; +#X obj 332 121 print ERROR: no method for; +#X obj 276 173 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 msg 115 221 set semicolon [format %c 59]; +#X obj 124 390 receive #noquit; +#X obj 124 421 outlet; +#X msg 16 200 proc menu_quit "" [list pd "#noquit bang $semicolon"] +; +#X obj 16 175 trigger bang bang; +#X msg 191 339 rename old_menu_quit menu_quit; +#X obj 191 297 trigger bang bang; +#X msg 131 241 rename menu_quit old_menu_quit; +#X msg 290 318 rename menu_quit ""; +#X obj 191 98 route reset quit quitnow; +#X msg 312 142 quit; +#X obj 124 363 hcs/sys_gui; +#X connect 0 0 1 0; +#X connect 1 0 12 0; +#X connect 1 1 3 0; +#X connect 1 2 17 0; +#X connect 3 0 4 0; +#X connect 3 1 12 0; +#X connect 4 0 14 0; +#X connect 7 0 6 0; +#X connect 8 0 19 0; +#X connect 9 0 10 0; +#X connect 11 0 19 0; #X connect 12 0 11 0; +#X connect 12 1 8 0; +#X connect 12 1 15 0; +#X connect 13 0 19 0; +#X connect 14 0 13 0; +#X connect 14 1 16 0; +#X connect 15 0 19 0; +#X connect 16 0 19 0; +#X connect 17 0 4 0; +#X connect 17 1 7 0; +#X connect 17 2 18 0; +#X connect 17 3 5 0; +#X connect 18 0 6 0; -- cgit v1.2.1