Adapted feedback to longer utterrances
[sgc2.git] / praat_module / adaptPraat.patch
blob74ff0d7b19215b053700dfa07cf4a321a9bddf09
1 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/stat/praat_Stat.cpp demo_praat_sources/stat/praat_Stat.cpp
2 --- praat_sources/stat/praat_Stat.cpp 2011-10-01 13:32:45.000000000 +0200
3 +++ demo_praat_sources/stat/praat_Stat.cpp 2011-11-18 08:55:32.000000000 +0100
4 @@ -424,7 +424,9 @@ DO
5 END2 }
7 DIRECT2 (Table_edit) {
8 +#ifndef DEMOAPP
9 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot edit a Table from batch.");
10 +#endif
11 LOOP {
12 iam (Table);
13 autoTableEditor editor = TableEditor_create (ID_AND_FULL_NAME, me);
14 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat_script.cpp demo_praat_sources/sys/praat_script.cpp
15 --- praat_sources/sys/praat_script.cpp 2011-09-02 13:53:33.000000000 +0200
16 +++ demo_praat_sources/sys/praat_script.cpp 2011-10-28 07:54:25.000000000 +0200
17 @@ -575,6 +575,7 @@ void praat_executeScriptFromText (wchar
18 autoInterpreter interpreter = Interpreter_create (NULL, NULL);
19 Interpreter_run (interpreter.peek(), text);
20 } catch (MelderError) {
21 + exit (0);
22 Melder_throw (L"Script not completed.");
25 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/Graphics_text.cpp demo_praat_sources/sys/Graphics_text.cpp
26 --- praat_sources/sys/Graphics_text.cpp 2011-09-29 12:27:01.000000000 +0200
27 +++ demo_praat_sources/sys/Graphics_text.cpp 2011-10-27 09:14:57.000000000 +0200
28 @@ -146,7 +146,7 @@ static HFONT loadFont (GraphicsScreen me
29 ipaInited = TRUE;
30 if (! charisAvailable && ! doulosAvailable) {
31 /* BUG: The next warning may cause reentry of drawing (on window exposure) and lead to crash. Some code must be non-reentrant !! */
32 - Melder_warning (L"The phonetic font is not available.\nSeveral characters will not look correct.\nSee www.praat.org");
33 + //Melder_warning (L"The phonetic font is not available.\nSeveral characters will not look correct.\nSee www.praat.org");
34 } else {
35 ipaAvailable = true;
37 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat.cpp demo_praat_sources/sys/praat.cpp
38 --- praat_sources/sys/praat.cpp 2014-04-22 11:09:57.000000000 +0200
39 +++ demo_praat_sources/sys/praat.cpp 2014-04-22 11:53:58.000000000 +0200
40 @@ -1268,6 +1268,12 @@ void praat_init (const char *title, unsi
42 GuiWindow raam = NULL;
43 if (Melder_batch) {
44 + #if defined (DEMOAPP) && gtk
45 + char objectWindowTitle [100];
46 + Machine_initLookAndFeel (argc, argv);
47 + sprintf (objectWindowTitle, "%s Objects", praatP.title);
48 + GuiWindow_create (0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, 0, 0, Melder_peekUtf8ToWcs (objectWindowTitle), gui_cb_quit, NULL, 0);
49 + #endif
50 #if defined (UNIX) || defined (macintosh) || defined (_WIN32) && defined (CONSOLE_APPLICATION)
51 MelderString_empty (& theCurrentPraatApplication -> batchName);
52 for (unsigned int i = iarg_batchName; i < argc; i ++) {
53 @@ -1314,9 +1320,11 @@ void praat_init (const char *title, unsi
54 #if motif
55 GuiApp_setApplicationShell (theCurrentPraatApplication -> topShell -> d_xmShell);
56 #endif
57 +#ifndef DEMOAPP
58 trace ("before objects window shows locale %s", setlocale (LC_ALL, NULL));
59 raam -> f_show ();
60 trace ("after objects window shows locale %s", setlocale (LC_ALL, NULL));
61 +#endif
63 Thing_recognizeClassesByName (classCollection, classStrings, classManPages, classSortedSetOfString, NULL);
64 if (Melder_batch) {
65 @@ -1326,6 +1334,9 @@ void praat_init (const char *title, unsi
66 trace ("adding fixed buttons without GUI");
67 praat_addFixedButtons (NULL);
68 } else {
69 + #ifdef DEMOAPP
70 + Melder_backgrounding = true;
71 + #endif
73 #ifdef macintosh
74 #if ! useCarbon
75 @@ -1353,7 +1364,9 @@ void praat_init (const char *title, unsi
76 trace ("creating the dynamic menu in the Objects window");
77 praat_actions_createDynamicMenu (raam);
78 trace ("showing the Objects window");
79 +#ifndef DEMOAPP
80 raam -> f_show ();
81 +#endif
82 //Melder_fatal ("stop");
83 #if defined (UNIX) && ! defined (NO_GRAPHICS)
84 try {
85 @@ -1382,7 +1395,12 @@ void praat_init (const char *title, unsi
87 trace ("creating the Picture window");
88 trace ("before picture window shows: locale is %s", setlocale (LC_ALL, NULL));
89 - if (! praatP.dontUsePictureWindow) praat_picture_init ();
90 + #ifdef DEMOAPP
91 + praat_picture_init ();
92 + praat_dontUsePictureWindow ();
93 + #else
94 + if (! praatP.dontUsePictureWindow) praat_picture_init ();
95 + #endif
96 trace ("after picture window shows: locale is %s", setlocale (LC_ALL, NULL));
99 @@ -1651,6 +1669,14 @@ void praat_run (void) {
100 s ++;
103 + else if (thePraatStandAloneScriptText != NULL) {
104 + try {
105 + praat_executeScriptFromText (thePraatStandAloneScriptText);
106 + praat_exit (0);
107 + } catch (MelderError) {
108 + Melder_flushError (NULL);
110 + };
111 #endif
112 for (;;) {
113 XEvent event;
114 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat_picture.cpp demo_praat_sources/sys/praat_picture.cpp
115 --- praat_sources/sys/praat_picture.cpp 2012-09-27 09:10:50.000000000 +0200
116 +++ demo_praat_sources/sys/praat_picture.cpp 2012-10-15 13:47:43.000000000 +0200
117 @@ -1478,8 +1478,10 @@ void praat_picture_open (void) {
118 #elif cocoa
119 dialog -> f_show ();
120 #elif motif
121 +#ifndef DEMOAPP
122 XtMapWidget (dialog -> d_xmShell);
123 XMapRaised (XtDisplay (dialog -> d_xmShell), XtWindow (dialog -> d_xmShell));
124 +#endif
125 #endif
126 Picture_unhighlight (praat_picture);
128 @@ -1767,7 +1769,9 @@ void praat_picture_init (void) {
129 width = height = resolution * 12;
130 scrollWindow = GuiScrolledWindow_createShown (dialog, margin, 0, Machine_getMenuBarHeight () + margin, 0, 1, 1, 0);
131 drawingArea = GuiDrawingArea_createShown (scrollWindow, width, height, NULL, NULL, NULL, NULL, NULL, 0);
132 +#ifndef DEMOAPP
133 dialog -> f_show ();
134 +#endif
137 // TODO: Paul: deze moet VOOR de update functies anders krijgen die void_me 0x0
138 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/fon/praat_TextGrid_init.cpp demo_praat_sources/fon/praat_TextGrid_init.cpp
139 --- praat_sources/fon/praat_TextGrid_init.cpp 2011-09-12 10:17:12.000000000 +0200
140 +++ demo_praat_sources/fon/praat_TextGrid_init.cpp 2011-09-12 10:59:25.000000000 +0200
141 @@ -825,7 +825,9 @@ static void cb_TextGridEditor_publicatio
144 DIRECT2 (TextGrid_edit) {
145 +#ifndef DEMOAPP
146 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
147 +#endif
148 Sound sound = NULL;
149 LOOP {
150 if (CLASS == classSound) sound = (Sound) OBJECT; // may stay NULL
151 @@ -856,7 +858,9 @@ DIRECT (TextGrid_edit)
152 END2 }
154 DIRECT2 (TextGrid_LongSound_edit) {
155 +#ifndef DEMOAPP
156 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
157 +#endif
158 LongSound longSound = NULL;
159 int ilongSound = 0;
160 LOOP {
161 @@ -872,7 +876,9 @@ DIRECT (TextGrid_LongSound_edit)
162 END2 }
164 DIRECT2 (TextGrid_SpellingChecker_edit) {
165 +#ifndef DEMOAPP
166 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
167 +#endif
168 SpellingChecker spellingChecker = NULL;
169 int ispellingChecker = 0;
170 Sound sound = NULL;
171 @@ -889,7 +895,9 @@ DIRECT (TextGrid_SpellingChecker_edit)
172 END2 }
174 DIRECT2 (TextGrid_LongSound_SpellingChecker_edit) {
175 +#ifndef DEMOAPP
176 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
177 +#endif
178 LongSound longSound = NULL;
179 SpellingChecker spellingChecker = NULL;
180 int ilongSound = 0, ispellingChecker = 0;
181 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/fon/praat_Sound_init.cpp demo_praat_sources/fon/praat_Sound_init.cpp
182 --- praat_sources/fon/praat_Sound_init.cpp 2012-10-11 10:39:47.000000000 +0200
183 +++ demo_praat_sources/fon/praat_Sound_init.cpp 2012-10-18 15:09:22.000000000 +0200
184 @@ -172,7 +172,9 @@ DO
185 END2 }
187 DIRECT2 (LongSound_view) {
188 +#ifndef DEMOAPP
189 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a LongSound from batch.");
190 +#endif
191 LOOP {
192 iam (LongSound);
193 autoSoundEditor editor = SoundEditor_create (ID_AND_FULL_NAME, me);
194 @@ -718,7 +720,9 @@ static void cb_SoundEditor_publication (
197 DIRECT2 (Sound_edit) {
198 +#ifndef DEMOAPP
199 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a Sound from batch.");
200 +#endif
201 LOOP {
202 iam (Sound);
203 autoSoundEditor editor = SoundEditor_create (ID_AND_FULL_NAME, me);
204 @@ -1397,8 +1401,10 @@ static void cb_SoundRecorder_publication
205 praat_updateSelection ();
207 static void do_Sound_record (int numberOfChannels) {
208 +#ifndef DEMOAPP
209 if (theCurrentPraatApplication -> batch)
210 Melder_throw ("Cannot record a Sound from batch.");
211 +#endif
212 if (theSoundRecorder) {
213 if (numberOfChannels == thePreviousNumberOfChannels) {
214 theSoundRecorder -> raise ();
215 @@ -1448,10 +1454,21 @@ FORM (Sound_recordFixedTime, L"Record So
216 POSITIVE (L"Duration (seconds)", L"1.0")
219 +#if defined (_WIN32) && defined (DEMOAPP)
220 + UINT numberOfDevices = waveInGetNumDevs (), i;
221 + if(numberOfDevices > 0) {
222 +#endif
223 autoSound me = Sound_recordFixedTime (GET_INTEGER (L"Input source"),
224 GET_REAL (L"Gain"), GET_REAL (L"Balance"),
225 wcstod (GET_STRING (L"Sampling frequency"), NULL), GET_REAL (L"Duration"));
226 praat_new (me.transfer(), L"untitled");
227 +#if defined (_WIN32) && defined (DEMOAPP)
228 + } else {
229 + // Create an empty sound if no input is available
230 + autoSound me = Sound_createSimple (1, GET_REAL (L"Duration"), wcstod (GET_STRING (L"Sampling frequency"), NULL));
231 + praat_new (me.transfer(), L"untitled");
232 + };
233 +#endif
234 END2 }
236 FORM (Sound_resample, L"Sound: Resample", L"Sound: Resample...") {
237 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/Ui.cpp demo_praat_sources/sys/Ui.cpp
238 --- praat_sources/sys/Ui.cpp 2014-01-27 09:02:44.000000000 +0100
239 +++ demo_praat_sources/sys/Ui.cpp 2014-03-27 12:22:58.000000000 +0100
240 @@ -758,12 +758,16 @@ void UiForm_finish (I) {
241 iam (UiForm);
242 if (! my d_dialogParent && ! my isPauseForm) return;
244 + int numberOfContinueButtons = my numberOfContinueButtons;
245 int size = my numberOfFields;
246 int dialogHeight = 0, x = Gui_LEFT_DIALOG_SPACING, y;
247 int textFieldHeight = Gui_TEXTFIELD_HEIGHT;
248 - int dialogWidth = 520, dialogCentre = dialogWidth / 2, fieldX = dialogCentre + Gui_LABEL_SPACING / 2;
249 + int dialogWidth = REVERT_BUTTON_WIDTH + STOP_BUTTON_WIDTH + 2*Gui_LABEL_SPACING + numberOfContinueButtons*(STANDARDS_BUTTON_WIDTH + Gui_LABEL_SPACING), dialogCentre = dialogWidth / 2, fieldX = dialogCentre + Gui_LABEL_SPACING / 2;
250 int labelWidth = fieldX - Gui_LABEL_SPACING - x, fieldWidth = labelWidth, halfFieldWidth = fieldWidth / 2 - 6;
252 + /* Ensure that the dialogs are wide enough */
253 + if (dialogWidth<520) dialogWidth = 520;
255 GuiForm form;
258 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/UiPause.cpp demo_praat_sources/sys/UiPause.cpp
259 --- praat_sources/sys/UiPause.cpp 2012-09-27 09:10:50.000000000 +0200
260 +++ demo_praat_sources/sys/UiPause.cpp 2012-09-27 13:25:18.000000000 +0200
261 @@ -159,6 +159,7 @@ int UiPause_end (int numberOfContinueBut
262 {// scope
263 autoMelderSaveDefaultDir saveDir;
264 thePauseForm_clicked = 0;
265 + if(wcsnequ(continueText1, L"DESTROY WINDOW ", 15))thePauseForm_clicked = 1;
266 Melder_assert (theEventLoopDepth == 0);
267 theEventLoopDepth ++;
268 try {
269 @@ -182,24 +183,28 @@ int UiPause_end (int numberOfContinueBut
270 [pool release];
271 } while (! thePauseForm_clicked);
272 #elif motif
273 + if(wcsnequ(continueText1, L"DESTROY WINDOW ", 15) == 0){
274 do {
275 XEvent event;
276 GuiNextEvent (& event);
277 XtDispatchEvent (& event);
278 } while (! thePauseForm_clicked);
279 + };
280 #endif
281 } catch (MelderError) {
282 Melder_flushError ("An error made it to the outer level in a pause window; should not occur! Please write to paul.boersma@uva.nl");
284 theEventLoopDepth --;
286 + if(wcsnequ(continueText1, L"DESTROY WINDOW ", 15))forget(thePauseForm);
287 if (wasBackgrounding) praat_background ();
288 /* BUG: should also restore praatP. editor. */
289 thePauseForm = NULL; // undangle
290 thePauseFormRadio = NULL; // undangle
291 if (thePauseForm_clicked == -1) {
292 - Interpreter_stop (interpreter);
293 - Melder_throw ("You interrupted the script.");
294 + thePauseForm_clicked = cancelContinueButton;
295 + //Interpreter_stop (interpreter);
296 + //Melder_throw ("You interrupted the script.");
297 //Melder_flushError (NULL);
298 //Melder_clearError ();
299 } else {
300 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/makefiles/makefile.defs.linux.alsa demo_praat_sources/makefiles/makefile.defs.linux.alsa
301 --- praat_sources/makefiles/makefile.defs.linux.alsa 2011-09-12 10:17:12.000000000 +0200
302 +++ demo_praat_sources/makefiles/makefile.defs.linux.alsa 2011-09-12 13:28:59.000000000 +0200
303 @@ -7,7 +7,7 @@ CC = gcc -std=gnu99
305 CXX = g++ -std=c++0x
307 -CFLAGS = -DUNIX -Dlinux -DALSA `pkg-config --cflags gtk+-2.0` -Werror=missing-prototypes -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -pthread
308 +CFLAGS = -DUNIX -Dlinux -DALSA `pkg-config --cflags gtk+-2.0` -Werror=missing-prototypes -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -DDEMOAPP -O1 -g1 -pthread
310 CXXFLAGS = $(CFLAGS) -Wshadow
312 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/makefiles/makefile.defs.mingw32 demo_praat_sources/makefiles/makefile.defs.mingw32
313 --- praat_sources/makefiles/makefile.defs.mingw32 2011-09-19 12:26:39.000000000 +0200
314 +++ demo_praat_sources/makefiles/makefile.defs.mingw32 2011-09-19 15:33:55.000000000 +0200
315 @@ -7,7 +7,7 @@ CC = /mingw32/bin/gcc -std=gnu99 -isyste
317 CXX = /mingw32/bin/g++ -std=c++0x -isystem /mingw32/include/c++/4.7.0 -isystem /mingw32/include -Wshadow
319 -CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -Dmain=wingwmain -O1 -pthread
320 +CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -Dmain=wingwmain -O1 -pthread -DDEMOAPP
322 CXXFLAGS = $(CFLAGS)
324 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/makefiles/makefile.defs.mingw64 demo_praat_sources/makefiles/makefile.defs.mingw64--- praat_sources/makefiles/makefile.defs.mingw32 2011-09-19 12:26:39.000000000 +0200
325 --- praat_sources/makefiles/makefile.defs.mingw64 2011-09-19 12:26:39.000000000 +0200
326 +++ demo_praat_sources/makefiles/makefile.defs.mingw64 2011-09-19 15:33:37.000000000 +0200
327 @@ -7,7 +7,7 @@ CC = /mingw64/bin/gcc -std=gnu99 -isyste
329 CXX = /mingw64/bin/g++ -std=c++0x -isystem /mingw64/include/c++/4.7.0 -isystem /mingw64/include -Wshadow -m64
331 -CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -Dmain=wingwmain -O1 -pthread
332 +CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -Dmain=wingwmain -O1 -pthread -DDEMOAPP
334 CXXFLAGS = $(CFLAGS)
336 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/dwtools/Intensity_extensions.cpp demo_praat_sources/dwtools/Intensity_extensions.cpp
337 --- praat_sources/dwtools/Intensity_extensions.cpp 2011-09-20 11:40:46.000000000 +0200
338 +++ demo_praat_sources/dwtools/Intensity_extensions.cpp 2011-09-28 11:45:46.000000000 +0200
339 @@ -67,8 +67,8 @@ TextGrid Intensity_to_TextGrid_detectSil
340 Vector_getMinimumAndX (me, 0, 0, 1, NUM_PEAK_INTERPOLATE_PARABOLIC, &intensity_min_db, &xOfMinimum);
341 double intensity_dbRange = intensity_max_db - intensity_min_db;
343 - if (intensity_dbRange < 10) Melder_warning (L"The loudest and softest part in your sound only differ by ",
344 - Melder_double (intensity_dbRange), L" dB.");
345 + /*if (intensity_dbRange < 10) Melder_warning (L"The loudest and softest part in your sound only differ by ",
346 + Melder_double (intensity_dbRange), L" dB.");*/
348 double intensityThreshold = intensity_max_db - fabs (silenceThreshold_dB);
350 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat_objectMenus.cpp demo_praat_sources/sys/praat_objectMenus.cpp
351 --- praat_sources/sys/praat_objectMenus.cpp 2012-02-22 13:04:43.000000000 +0100
352 +++ demo_praat_sources/sys/praat_objectMenus.cpp 2012-02-22 13:48:24.000000000 +0100
353 @@ -492,8 +492,10 @@ FORM (SearchManual, L"Search manual", L"
354 TEXTFIELD (L"query", L"")
357 + #ifndef DEMOAPP
358 if (theCurrentPraatApplication -> batch)
359 Melder_throw (L"Cannot view a manual from batch.");
360 + #endif
361 Manual manPage = Manual_create (L"Intro", theCurrentPraatApplication -> manPages, false);
362 Manual_search (manPage, GET_STRING (L"query"));
364 @@ -504,8 +506,10 @@ FORM (GoToManualPage, L"Go to manual pag
365 LIST (L"Page", numberOfPages, pages, 1)}
368 + #ifndef DEMOAPP
369 if (theCurrentPraatApplication -> batch)
370 Melder_throw (L"Cannot view a manual from batch.");
371 + #endif
372 Manual manPage = Manual_create (L"Intro", theCurrentPraatApplication -> manPages, false);
373 HyperPage_goToPage_i (manPage, GET_INTEGER (L"Page"));
375 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/GuiMenu.cpp demo_praat_sources/sys/GuiMenu.cpp
376 --- praat_sources/sys/GuiMenu.cpp 2012-09-27 09:10:50.000000000 +0200
377 +++ demo_praat_sources/sys/GuiMenu.cpp 2012-10-25 09:55:23.000000000 +0200
378 @@ -367,7 +367,9 @@ GuiMenu GuiMenu_createInWindow (GuiWindo
381 #elif motif
382 + #if not ( defined( DEMOAPP ) && defined( macintosh ) )
383 if (window == NULL) {
384 + #endif
385 my d_xmMenuTitle = XmCreateCascadeButton (theGuiTopMenuBar, Melder_peekWcsToUtf8 (title), NULL, 0);
386 if (wcsequ (title, L"Help"))
387 XtVaSetValues (theGuiTopMenuBar, XmNmenuHelpWidget, my d_xmMenuTitle, NULL);
388 @@ -376,6 +378,7 @@ GuiMenu GuiMenu_createInWindow (GuiWindo
389 XtSetSensitive (my d_xmMenuTitle, False);
390 XtVaSetValues (my d_xmMenuTitle, XmNsubMenuId, my d_widget, NULL);
391 XtManageChild (my d_xmMenuTitle);
392 + #if not ( defined( DEMOAPP ) && defined( macintosh ) )
393 } else {
394 my d_xmMenuTitle = XmCreateCascadeButton (window -> d_xmMenuBar, Melder_peekWcsToUtf8 (title), NULL, 0);
395 if (wcsequ (title, L"Help"))
396 @@ -386,6 +389,7 @@ GuiMenu GuiMenu_createInWindow (GuiWindo
397 XtVaSetValues (my d_xmMenuTitle, XmNsubMenuId, my d_widget, NULL);
398 XtManageChild (my d_xmMenuTitle);
400 + #endif
401 _GuiObject_setUserData (my d_widget, me);
402 #endif
404 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/DemoEditor.cpp demo_praat_sources/sys/DemoEditor.cpp
405 --- praat_sources/sys/DemoEditor.cpp 2014-05-09 08:59:02.000000000 +0200
406 +++ demo_praat_sources/sys/DemoEditor.cpp 2014-05-16 10:30:28.000000000 +0200
407 @@ -248,6 +248,7 @@ void Demo_waitForInput (Interpreter inte
408 if (theDemoEditor -> userWantsToClose) {
409 Interpreter_stop (interpreter);
410 forget (theDemoEditor);
411 + exit (0);
412 Melder_throw ("You interrupted the script.");