Deactivated noise suppression
[sgc2.git] / praat_module / adaptPraat.patch
blobcf3234afe6f98a516e9091ea2a1c7b0a58b8b015
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 @@ -587,6 +587,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 @@ -1529,9 +1547,9 @@ void praat_run (void) {
100 Melder_assert ((double) dummy == 40000.0);
101 Melder_assert ((double) (int16_t) dummy == -25536.0);
103 - { uint32_t dummy = 0xffffffff;
104 - Melder_assert (wcsequ (Melder_integer (dummy), L"4294967295"));
106 +// { uint32_t dummy = 0xffffffff;
107 +// Melder_assert (wcsequ (Melder_integer (dummy), L"4294967295"));
108 +// }
110 if (sizeof (off_t) < 8)
111 Melder_fatal ("sizeof(off_t) is less than 8. Compile Praat with -D_FILE_OFFSET_BITS=64.");
112 @@ -1666,6 +1684,14 @@ void praat_run (void) {
113 s ++;
116 + else if (thePraatStandAloneScriptText != NULL) {
117 + try {
118 + praat_executeScriptFromText (thePraatStandAloneScriptText);
119 + praat_exit (0);
120 + } catch (MelderError) {
121 + Melder_flushError (NULL);
123 + };
124 #endif
125 for (;;) {
126 XEvent event;
127 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat_picture.cpp demo_praat_sources/sys/praat_picture.cpp
128 --- praat_sources/sys/praat_picture.cpp 2012-09-27 09:10:50.000000000 +0200
129 +++ demo_praat_sources/sys/praat_picture.cpp 2012-10-15 13:47:43.000000000 +0200
130 @@ -1478,8 +1478,10 @@ void praat_picture_open (void) {
131 #elif cocoa
132 dialog -> f_show ();
133 #elif motif
134 +#ifndef DEMOAPP
135 XtMapWidget (dialog -> d_xmShell);
136 XMapRaised (XtDisplay (dialog -> d_xmShell), XtWindow (dialog -> d_xmShell));
137 +#endif
138 #endif
139 Picture_unhighlight (praat_picture);
141 @@ -1767,7 +1769,9 @@ void praat_picture_init (void) {
142 width = height = resolution * 12;
143 scrollWindow = GuiScrolledWindow_createShown (dialog, margin, 0, Machine_getMenuBarHeight () + margin, 0, 1, 1, 0);
144 drawingArea = GuiDrawingArea_createShown (scrollWindow, width, height, NULL, NULL, NULL, NULL, NULL, 0);
145 +#ifndef DEMOAPP
146 dialog -> f_show ();
147 +#endif
150 // TODO: Paul: deze moet VOOR de update functies anders krijgen die void_me 0x0
151 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/fon/praat_TextGrid_init.cpp demo_praat_sources/fon/praat_TextGrid_init.cpp
152 --- praat_sources/fon/praat_TextGrid_init.cpp 2011-09-12 10:17:12.000000000 +0200
153 +++ demo_praat_sources/fon/praat_TextGrid_init.cpp 2011-09-12 10:59:25.000000000 +0200
154 @@ -825,7 +825,9 @@ static void cb_TextGridEditor_publicatio
157 DIRECT2 (TextGrid_edit) {
158 +#ifndef DEMOAPP
159 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
160 +#endif
161 Sound sound = NULL;
162 LOOP {
163 if (CLASS == classSound) sound = (Sound) OBJECT; // may stay NULL
164 @@ -856,7 +858,9 @@ DIRECT (TextGrid_edit)
165 END2 }
167 DIRECT2 (TextGrid_LongSound_edit) {
168 +#ifndef DEMOAPP
169 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
170 +#endif
171 LongSound longSound = NULL;
172 int ilongSound = 0;
173 LOOP {
174 @@ -872,7 +876,9 @@ DIRECT (TextGrid_LongSound_edit)
175 END2 }
177 DIRECT2 (TextGrid_SpellingChecker_edit) {
178 +#ifndef DEMOAPP
179 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
180 +#endif
181 SpellingChecker spellingChecker = NULL;
182 int ispellingChecker = 0;
183 Sound sound = NULL;
184 @@ -889,7 +895,9 @@ DIRECT (TextGrid_SpellingChecker_edit)
185 END2 }
187 DIRECT2 (TextGrid_LongSound_SpellingChecker_edit) {
188 +#ifndef DEMOAPP
189 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a TextGrid from batch.");
190 +#endif
191 LongSound longSound = NULL;
192 SpellingChecker spellingChecker = NULL;
193 int ilongSound = 0, ispellingChecker = 0;
194 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/fon/praat_Sound_init.cpp demo_praat_sources/fon/praat_Sound_init.cpp
195 --- praat_sources/fon/praat_Sound_init.cpp 2012-10-11 10:39:47.000000000 +0200
196 +++ demo_praat_sources/fon/praat_Sound_init.cpp 2012-10-18 15:09:22.000000000 +0200
197 @@ -172,7 +172,9 @@ DO
198 END2 }
200 DIRECT2 (LongSound_view) {
201 +#ifndef DEMOAPP
202 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a LongSound from batch.");
203 +#endif
204 LOOP {
205 iam (LongSound);
206 autoSoundEditor editor = SoundEditor_create (ID_AND_FULL_NAME, me);
207 @@ -718,7 +720,9 @@ static void cb_SoundEditor_publication (
210 DIRECT2 (Sound_edit) {
211 +#ifndef DEMOAPP
212 if (theCurrentPraatApplication -> batch) Melder_throw ("Cannot view or edit a Sound from batch.");
213 +#endif
214 LOOP {
215 iam (Sound);
216 autoSoundEditor editor = SoundEditor_create (ID_AND_FULL_NAME, me);
217 @@ -1397,8 +1401,10 @@ static void cb_SoundRecorder_publication
218 praat_updateSelection ();
220 static void do_Sound_record (int numberOfChannels) {
221 +#ifndef DEMOAPP
222 if (theCurrentPraatApplication -> batch)
223 Melder_throw ("Cannot record a Sound from batch.");
224 +#endif
225 if (theSoundRecorder) {
226 if (numberOfChannels == thePreviousNumberOfChannels) {
227 theSoundRecorder -> raise ();
228 @@ -1448,10 +1454,21 @@ FORM (Sound_recordFixedTime, L"Record So
229 POSITIVE (L"Duration (seconds)", L"1.0")
232 +#if defined (_WIN32) && defined (DEMOAPP)
233 + UINT numberOfDevices = waveInGetNumDevs (), i;
234 + if(numberOfDevices > 0) {
235 +#endif
236 autoSound me = Sound_recordFixedTime (GET_INTEGER (L"Input source"),
237 GET_REAL (L"Gain"), GET_REAL (L"Balance"),
238 wcstod (GET_STRING (L"Sampling frequency"), NULL), GET_REAL (L"Duration"));
239 praat_new (me.transfer(), L"untitled");
240 +#if defined (_WIN32) && defined (DEMOAPP)
241 + } else {
242 + // Create an empty sound if no input is available
243 + autoSound me = Sound_createSimple (1, GET_REAL (L"Duration"), wcstod (GET_STRING (L"Sampling frequency"), NULL));
244 + praat_new (me.transfer(), L"untitled");
245 + };
246 +#endif
247 END2 }
249 FORM (Sound_resample, L"Sound: Resample", L"Sound: Resample...") {
250 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/Ui.cpp demo_praat_sources/sys/Ui.cpp
251 --- praat_sources/sys/Ui.cpp 2014-01-27 09:02:44.000000000 +0100
252 +++ demo_praat_sources/sys/Ui.cpp 2014-03-27 12:22:58.000000000 +0100
253 @@ -758,12 +758,16 @@ void UiForm_finish (I) {
254 iam (UiForm);
255 if (! my d_dialogParent && ! my isPauseForm) return;
257 + int numberOfContinueButtons = my numberOfContinueButtons;
258 int size = my numberOfFields;
259 int dialogHeight = 0, x = Gui_LEFT_DIALOG_SPACING, y;
260 int textFieldHeight = Gui_TEXTFIELD_HEIGHT;
261 - int dialogWidth = 520, dialogCentre = dialogWidth / 2, fieldX = dialogCentre + Gui_LABEL_SPACING / 2;
262 + 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;
263 int labelWidth = fieldX - Gui_LABEL_SPACING - x, fieldWidth = labelWidth, halfFieldWidth = fieldWidth / 2 - 6;
265 + /* Ensure that the dialogs are wide enough */
266 + if (dialogWidth<520) dialogWidth = 520;
268 GuiForm form;
271 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/UiPause.cpp demo_praat_sources/sys/UiPause.cpp
272 --- praat_sources/sys/UiPause.cpp 2012-09-27 09:10:50.000000000 +0200
273 +++ demo_praat_sources/sys/UiPause.cpp 2012-09-27 13:25:18.000000000 +0200
274 @@ -159,6 +159,7 @@ int UiPause_end (int numberOfContinueBut
275 {// scope
276 autoMelderSaveDefaultDir saveDir;
277 thePauseForm_clicked = 0;
278 + if(wcsnequ(continueText1, L"DESTROY WINDOW ", 15))thePauseForm_clicked = 1;
279 Melder_assert (theEventLoopDepth == 0);
280 theEventLoopDepth ++;
281 try {
282 @@ -182,24 +183,28 @@ int UiPause_end (int numberOfContinueBut
283 [pool release];
284 } while (! thePauseForm_clicked);
285 #elif motif
286 + if(wcsnequ(continueText1, L"DESTROY WINDOW ", 15) == 0){
287 do {
288 XEvent event;
289 GuiNextEvent (& event);
290 XtDispatchEvent (& event);
291 } while (! thePauseForm_clicked);
292 + };
293 #endif
294 } catch (MelderError) {
295 Melder_flushError ("An error made it to the outer level in a pause window; should not occur! Please write to paul.boersma@uva.nl");
297 theEventLoopDepth --;
299 + if(wcsnequ(continueText1, L"DESTROY WINDOW ", 15))forget(thePauseForm);
300 if (wasBackgrounding) praat_background ();
301 /* BUG: should also restore praatP. editor. */
302 thePauseForm = NULL; // undangle
303 thePauseFormRadio = NULL; // undangle
304 if (thePauseForm_clicked == -1) {
305 - Interpreter_stop (interpreter);
306 - Melder_throw ("You interrupted the script.");
307 + thePauseForm_clicked = cancelContinueButton;
308 + //Interpreter_stop (interpreter);
309 + //Melder_throw ("You interrupted the script.");
310 //Melder_flushError (NULL);
311 //Melder_clearError ();
312 } else {
313 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/makefiles/makefile.defs.linux.alsa demo_praat_sources/makefiles/makefile.defs.linux.alsa
314 --- praat_sources/makefiles/makefile.defs.linux.alsa 2011-09-12 10:17:12.000000000 +0200
315 +++ demo_praat_sources/makefiles/makefile.defs.linux.alsa 2011-09-12 13:28:59.000000000 +0200
316 @@ -7,7 +7,7 @@ CC = gcc -std=gnu99
318 CXX = g++ -std=c++0x
320 -CFLAGS = -DUNIX -Dlinux -DALSA -D_FILE_OFFSET_BITS=64 `pkg-config --cflags gtk+-2.0` -Werror=missing-prototypes -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -pthread
321 +CFLAGS = -DUNIX -Dlinux -DALSA -D_FILE_OFFSET_BITS=64 `pkg-config --cflags gtk+-2.0` -Werror=missing-prototypes -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -DDEMOAPP -O1 -g1 -pthread
323 CXXFLAGS = $(CFLAGS) -Wshadow
325 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/makefiles/makefile.defs.mingw32 demo_praat_sources/makefiles/makefile.defs.mingw32
326 --- praat_sources/makefiles/makefile.defs.mingw32 2011-09-19 12:26:39.000000000 +0200
327 +++ demo_praat_sources/makefiles/makefile.defs.mingw32 2011-09-19 15:33:55.000000000 +0200
328 @@ -7,7 +7,7 @@ CC = /mingw32/bin/gcc -std=gnu99 -isyste
330 CXX = /mingw32/bin/g++ -std=c++0x -isystem /mingw32/include/c++/4.7.0 -isystem /mingw32/include -Wshadow
332 -CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -D_FILE_OFFSET_BITS=64 -Dmain=wingwmain -O1 -pthread
333 +CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -D_FILE_OFFSET_BITS=64 -Dmain=wingwmain -O1 -pthread -DDEMOAPP
335 CXXFLAGS = $(CFLAGS)
337 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
338 --- praat_sources/makefiles/makefile.defs.mingw64 2011-09-19 12:26:39.000000000 +0200
339 +++ demo_praat_sources/makefiles/makefile.defs.mingw64 2011-09-19 15:33:37.000000000 +0200
340 @@ -7,7 +7,7 @@ CC = /mingw64/bin/gcc -std=gnu99 -isyste
342 CXX = /mingw64/bin/g++ -std=c++0x -isystem /mingw64/include/c++/4.7.0 -isystem /mingw64/include -Wshadow -m64
344 -CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -D_FILE_OFFSET_BITS=64 -Dmain=wingwmain -O1 -pthread
345 +CFLAGS = -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DUNICODE -D_FILE_OFFSET_BITS=64 -Dmain=wingwmain -O1 -pthread -DDEMOAPP
347 CXXFLAGS = $(CFLAGS)
349 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/dwtools/Intensity_extensions.cpp demo_praat_sources/dwtools/Intensity_extensions.cpp
350 --- praat_sources/dwtools/Intensity_extensions.cpp 2011-09-20 11:40:46.000000000 +0200
351 +++ demo_praat_sources/dwtools/Intensity_extensions.cpp 2011-09-28 11:45:46.000000000 +0200
352 @@ -67,8 +67,8 @@ TextGrid Intensity_to_TextGrid_detectSil
353 Vector_getMinimumAndX (me, 0, 0, 1, NUM_PEAK_INTERPOLATE_PARABOLIC, &intensity_min_db, &xOfMinimum);
354 double intensity_dbRange = intensity_max_db - intensity_min_db;
356 - if (intensity_dbRange < 10) Melder_warning (L"The loudest and softest part in your sound only differ by ",
357 - Melder_double (intensity_dbRange), L" dB.");
358 + /*if (intensity_dbRange < 10) Melder_warning (L"The loudest and softest part in your sound only differ by ",
359 + Melder_double (intensity_dbRange), L" dB.");*/
361 double intensityThreshold = intensity_max_db - fabs (silenceThreshold_dB);
363 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/praat_objectMenus.cpp demo_praat_sources/sys/praat_objectMenus.cpp
364 --- praat_sources/sys/praat_objectMenus.cpp 2012-02-22 13:04:43.000000000 +0100
365 +++ demo_praat_sources/sys/praat_objectMenus.cpp 2012-02-22 13:48:24.000000000 +0100
366 @@ -492,8 +492,10 @@ FORM (SearchManual, L"Search manual", L"
367 TEXTFIELD (L"query", L"")
370 + #ifndef DEMOAPP
371 if (theCurrentPraatApplication -> batch)
372 Melder_throw (L"Cannot view a manual from batch.");
373 + #endif
374 Manual manPage = Manual_create (L"Intro", theCurrentPraatApplication -> manPages, false);
375 Manual_search (manPage, GET_STRING (L"query"));
377 @@ -504,8 +506,10 @@ FORM (GoToManualPage, L"Go to manual pag
378 LIST (L"Page", numberOfPages, pages, 1)}
381 + #ifndef DEMOAPP
382 if (theCurrentPraatApplication -> batch)
383 Melder_throw (L"Cannot view a manual from batch.");
384 + #endif
385 Manual manPage = Manual_create (L"Intro", theCurrentPraatApplication -> manPages, false);
386 HyperPage_goToPage_i (manPage, GET_INTEGER (L"Page"));
388 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/GuiMenu.cpp demo_praat_sources/sys/GuiMenu.cpp
389 --- praat_sources/sys/GuiMenu.cpp 2012-09-27 09:10:50.000000000 +0200
390 +++ demo_praat_sources/sys/GuiMenu.cpp 2012-10-25 09:55:23.000000000 +0200
391 @@ -367,7 +367,9 @@ GuiMenu GuiMenu_createInWindow (GuiWindo
394 #elif motif
395 + #if not ( defined( DEMOAPP ) && defined( macintosh ) )
396 if (window == NULL) {
397 + #endif
398 my d_xmMenuTitle = XmCreateCascadeButton (theGuiTopMenuBar, Melder_peekWcsToUtf8 (title), NULL, 0);
399 if (wcsequ (title, L"Help"))
400 XtVaSetValues (theGuiTopMenuBar, XmNmenuHelpWidget, my d_xmMenuTitle, NULL);
401 @@ -376,6 +378,7 @@ GuiMenu GuiMenu_createInWindow (GuiWindo
402 XtSetSensitive (my d_xmMenuTitle, False);
403 XtVaSetValues (my d_xmMenuTitle, XmNsubMenuId, my d_widget, NULL);
404 XtManageChild (my d_xmMenuTitle);
405 + #if not ( defined( DEMOAPP ) && defined( macintosh ) )
406 } else {
407 my d_xmMenuTitle = XmCreateCascadeButton (window -> d_xmMenuBar, Melder_peekWcsToUtf8 (title), NULL, 0);
408 if (wcsequ (title, L"Help"))
409 @@ -386,6 +389,7 @@ GuiMenu GuiMenu_createInWindow (GuiWindo
410 XtVaSetValues (my d_xmMenuTitle, XmNsubMenuId, my d_widget, NULL);
411 XtManageChild (my d_xmMenuTitle);
413 + #endif
414 _GuiObject_setUserData (my d_widget, me);
415 #endif
417 diff -Naurp -x '*.[oah]' -x '.git*' -x praat praat_sources/sys/DemoEditor.cpp demo_praat_sources/sys/DemoEditor.cpp
418 --- praat_sources/sys/DemoEditor.cpp 2014-05-09 08:59:02.000000000 +0200
419 +++ demo_praat_sources/sys/DemoEditor.cpp 2014-05-16 10:30:28.000000000 +0200
420 @@ -248,6 +248,7 @@ void Demo_waitForInput (Interpreter inte
421 if (theDemoEditor -> userWantsToClose) {
422 Interpreter_stop (interpreter);
423 forget (theDemoEditor);
424 + exit (0);
425 Melder_throw ("You interrupted the script.");