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