[med-svn] [Git][med-team/praat][master] 3 commits: New upstream version 6.4.27+dfsg
Rafael Laboissière (@rafael)
gitlab at salsa.debian.org
Thu Feb 6 05:40:57 GMT 2025
Rafael Laboissière pushed to branch master at Debian Med / praat
Commits:
4af3a8b5 by Rafael Laboissière at 2025-02-02T04:58:58-03:00
New upstream version 6.4.27+dfsg
- - - - -
df12b0a7 by Rafael Laboissière at 2025-02-02T05:00:57-03:00
Update upstream source from tag 'upstream/6.4.27+dfsg'
Update to upstream version '6.4.27+dfsg'
with Debian dir 0ef44daa9d9a06149178414b54503e15f240629a
- - - - -
f876d24f by Rafael Laboissière at 2025-02-05T10:09:07-03:00
d/changelog: Add entry for release 6.4.27+dfsg-1
Gbp-Dch: Ignore
- - - - -
11 changed files:
- − GuiTrust.h
- debian/changelog
- fon/manual_commands.cpp
- fon/manual_whatsnew.cpp
- main/main_Praat.cpp
- main/main_Praat.h
- sys/DemoEditor.cpp
- sys/Graphics_text.cpp
- sys/GuiMenu.cpp
- sys/motifEmulator.cpp
- sys/praat_actions.cpp
Changes:
=====================================
GuiTrust.h deleted
=====================================
@@ -1,29 +0,0 @@
-#ifndef _UiTrust_h_
-#define _UiTrust_h_
-/* UiTrust.h
- *
- * Copyright (C) 2024 Paul Boersma
- *
- * This code is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This code is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this work. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "Ui.h"
-
-integer GuiTrust_get (GuiWindow optionalParent, Editor optionalTrustWindowOwningEditor,
- conststring32 message1, conststring32 message2, conststring32 message3, conststring32 message4, conststring32 message5,
- conststring32 option1, conststring32 option2, conststring32 option3, conststring32 option4, conststring32 option5,
- Interpreter interpreter);
-
-/* End of file UiPause.h */
-#endif
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+praat (6.4.27+dfsg-1) unstable; urgency=medium
+
+ * New upstream version 6.4.27+dfsg
+
+ -- Rafael Laboissière <rafael at debian.org> Sun, 02 Feb 2025 05:06:13 -0300
+
praat (6.4.26+dfsg-1) unstable; urgency=medium
* New upstream version 6.4.26+dfsg
=====================================
fon/manual_commands.cpp
=====================================
@@ -385,7 +385,7 @@ If you are user #Miep, your Praat preferences folder will be `C:\Users\Miep\Praa
and `C:\Users\Miep\AppData\Roaming\Praat` in Praat 7.xx.
To see what’s in there, open a File Explorer window, switch on `View` \-> `Show` \-> `Hidden items`,
-and `navigate to `Local Disk` \-> `Users` \-> your name \-> `AppData` \-> `Roaming` \-> `Praat`.
+and navigate to `Local Disk` \-> `Users` \-> %`your name` \-> `AppData` \-> `Roaming` \-> `Praat`.
Macintosh
=========
=====================================
fon/manual_whatsnew.cpp
=====================================
@@ -29,6 +29,10 @@ R"~~~(
Latest changes in Praat.
+##6.4.27# (27 January 2025)
+• Graphics text: better pipes and slashes.
+• Windows for ARM64 processors: removed a bug whereby dynamic menu deletion could crash after a sound was played in the Demo window.
+
##6.4.26# (8 January 2025)
• ##Rectangle text (maximal fit)...# is perhaps useful in general,
but will especially facilitate text and button drawing in Demo window.
=====================================
main/main_Praat.cpp
=====================================
@@ -37,6 +37,31 @@ static void logo (Graphics graphics) {
Graphics_setFontSize (graphics, 14.0);
Graphics_text (graphics, 0.5, 0.41, Melder_cat (U"version ", Melder_appVersionSTR(),
U" (", Melder_appMonthSTR(), U" ", Melder_appDay(), U", ", Melder_appYear(), U")"));
+ Graphics_setFontSize (graphics, 12.0);
+ constexpr bool isArm64 =
+ #if defined (__aarch64__) || defined (_M_ARM64_)
+ true;
+ #else
+ false;
+ #endif
+ const conststring32 builtFor =
+ #if defined (macintosh)
+ isArm64 ? U"ARM64 macOS" : U"Intel64 macOS";
+ #elif defined (_WIN32)
+ isArm64 ? U"ARM64 Windows" : sizeof (void *) == 4 ? U"Intel32 Windows" : U"Intel64 Windows";
+ #elif defined (__s390x__)
+ U"s390x Linux";
+ #elif defined (raspberrypi)
+ U"ARMV7 Raspberry Pi";
+ #elif defined (chrome)
+ isArm64 ? U"ARM64 Chromebook" : U"Intel64 Chromebook";
+ #elif defined (linux)
+ isArm64 ? U"ARM64 Linux" : U"Intel64 Linux";
+ #else
+ U"";
+ #error Unknown OS type.
+ #endif
+ Graphics_text (graphics, 0.5, 0.34, Melder_cat (U"built for ", builtFor));
Graphics_setColour (graphics, Melder_BLACK);
Graphics_setFont (graphics, kGraphics_font::HELVETICA);
Graphics_setFontSize (graphics, 10.0);
=====================================
main/main_Praat.h
=====================================
@@ -1,6 +1,6 @@
/* main_Praat.h
*
- * Copyright (C) 2024 Paul Boersma
+ * Copyright (C) 2024,2025 Paul Boersma
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,10 +25,10 @@
and `Info.plist Preprocessor Prefix File` to `main/main_Praat.h`.
*/
#define PRAAT_NAME Praat
-#define PRAAT_VERSION_STR 6.4.26
-#define PRAAT_VERSION_NUM 6426
+#define PRAAT_VERSION_STR 6.4.27
+#define PRAAT_VERSION_NUM 6427
#define PRAAT_YEAR 2025
#define PRAAT_MONTH 1
-#define PRAAT_DAY 8
+#define PRAAT_DAY 27
/* End of file main_Praat.h */
=====================================
sys/DemoEditor.cpp
=====================================
@@ -1,6 +1,6 @@
/* DemoEditor.cpp
*
- * Copyright (C) 2009-2024 Paul Boersma
+ * Copyright (C) 2009-2025 Paul Boersma
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -243,7 +243,7 @@ void Demo_waitForInput (Interpreter interpreter) {
gtk_main_iteration ();
} while (! theReferenceToTheOnlyDemoEditor -> clicked &&
! theReferenceToTheOnlyDemoEditor -> keyPressed &&
- ! theReferenceToTheOnlyDemoEditor -> userWantsToClose);
+ ! theReferenceToTheOnlyDemoEditor -> userWantsToClose);
#elif cocoa
do {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -261,7 +261,7 @@ void Demo_waitForInput (Interpreter interpreter) {
[pool release];
} while (! theReferenceToTheOnlyDemoEditor -> clicked &&
! theReferenceToTheOnlyDemoEditor -> keyPressed &&
- ! theReferenceToTheOnlyDemoEditor -> userWantsToClose);
+ ! theReferenceToTheOnlyDemoEditor -> userWantsToClose);
#elif defined (_WIN32)
do {
//Graphics_updateWs (theReferenceToTheOnlyDemoEditor -> graphics.get()); // make sure that even texts will be drawn
@@ -270,7 +270,7 @@ void Demo_waitForInput (Interpreter interpreter) {
XtDispatchEvent (& event);
} while (! theReferenceToTheOnlyDemoEditor -> clicked &&
! theReferenceToTheOnlyDemoEditor -> keyPressed &&
- ! theReferenceToTheOnlyDemoEditor -> userWantsToClose);
+ ! theReferenceToTheOnlyDemoEditor -> userWantsToClose);
#endif
} catch (MelderError) {
Melder_flushError (U"An error made it to the outer level in the Demo window; should not occur! Please write to paul.boersma at uva.nl");
=====================================
sys/Graphics_text.cpp
=====================================
@@ -1718,19 +1718,14 @@ static void parseTextIntoCellsLinesRuns (Graphics me, conststring32 txt /* catta
out -> style =
(wordLink || globalLink || verbatimLink) && my fontStyle != Graphics_CODE ? (thinLink ? 0 : Graphics_BOLD) :
((my fontStyle & Graphics_ITALIC) || charItalic || wordItalic || globalItalic ? Graphics_ITALIC : 0) +
- ((my fontStyle & Graphics_BOLD) || charBold || wordBold || globalBold ? Graphics_BOLD : 0);
+ ((my fontStyle & Graphics_BOLD) || charBold || wordBold || globalBold ? Graphics_BOLD : 0)
+ ;
out -> font.string = nullptr;
out -> font.integer_ = my fontStyle == Graphics_CODE || wordCode || globalCode || globalVerbatim || verbatimLink ||
- (kar == U'/' || kar == U'|') && my font != kGraphics_font::PALATINO ? (int) kGraphics_font::COURIER : (int) my font;
+ kar == U'/' && my font != kGraphics_font::PALATINO ? (int) kGraphics_font::COURIER : (int) my font;
out -> link = wordLink || globalLink || verbatimLink;
out -> baseline = charSuperscript || globalSuperscript ? 34 : charSubscript || globalSubscript ? -25 : 0;
out -> size = globalSmall || out -> baseline != 0 ? 80 : 100;
- if (kar == U'/' && my font != kGraphics_font::PALATINO) {
- out -> baseline -= out -> size / 12;
- out -> size += out -> size / 10;
- if (my screen)
- out -> font.integer_ = (int) kGraphics_font::PALATINO;
- }
out -> code = U'?'; // does this have any meaning?
Melder_assert (kar != U'\0');
if (my postScript) {
=====================================
sys/GuiMenu.cpp
=====================================
@@ -1,6 +1,6 @@
/* GuiMenu.cpp
*
- * Copyright (C) 1992-2005,2007-2024 Paul Boersma,
+ * Copyright (C) 1992-2005,2007-2025 Paul Boersma,
* 2008 Stefan de Konink, 2010 Franz Brausse, 2013 Tom Naughton
*
* This code is free software; you can redistribute it and/or modify
@@ -592,6 +592,14 @@ GuiMenu GuiMenu_createInForm (GuiForm form, int left, int right, int top, int bo
_GuiObject_setUserData (my d_widget, me.get());
_GuiObject_setUserData (my d_cascadeButton -> d_widget, me.get());
#elif motif
+ #define TRY_BARLESS 0
+ #if TRY_BARLESS
+ my d_cascadeButton -> d_widget = XmCreateCascadeButton (form -> d_widget, Melder_peek32to8 (neatTitle.string), nullptr, 0);
+ form -> v_positionInForm (my d_cascadeButton -> d_widget, left, right, top, bottom, form);
+ my d_widget = XmCreatePulldownMenu (form -> d_widget, Melder_peek32to8 (neatTitle.string), nullptr, 0);
+ XtVaSetValues (my d_cascadeButton -> d_widget, XmNsubMenuId, my d_widget, nullptr);
+ XtManageChild (my d_cascadeButton -> d_widget);
+ #else
my d_xmMenuBar = XmCreateMenuBar (form -> d_widget, "dynamicSubmenuBar", 0, 0);
form -> v_positionInForm (my d_xmMenuBar, left, right, top, bottom, form);
my d_cascadeButton -> d_widget = XmCreateCascadeButton (my d_xmMenuBar, Melder_peek32to8 (neatTitle.string), nullptr, 0);
@@ -600,6 +608,7 @@ GuiMenu GuiMenu_createInForm (GuiForm form, int left, int right, int top, int bo
XtVaSetValues (my d_cascadeButton -> d_widget, XmNsubMenuId, my d_widget, nullptr);
XtManageChild (my d_cascadeButton -> d_widget);
XtManageChild (my d_xmMenuBar);
+ #endif
if (flags & GuiMenu_INSENSITIVE)
XtSetSensitive (my d_cascadeButton -> d_widget, False);
_GuiObject_setUserData (my d_widget, me.get());
=====================================
sys/motifEmulator.cpp
=====================================
@@ -1,6 +1,6 @@
/* motifEmulator.cpp
*
- * Copyright (C) 1993-2024 Paul Boersma
+ * Copyright (C) 1993-2025 Paul Boersma
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,6 +37,7 @@ void Gui_setQuitApplicationCallback (int (*quitApplicationCallback) (void)) {
#endif // defined (macintosh)
#if defined (_WIN32)
+#define TRY_BARLESS 0
/* The Motif emulator for Windows. */
@@ -535,6 +536,8 @@ static void _GuiNativizeWidget (GuiObject me) {
my window = CreateWindowEx (0, Melder_peek32toW (theWindowClassName), L"rowColumn", WS_CHILD | WS_CLIPSIBLINGS,
my x, my y, my width, my height, my parent -> window, NULL, theGui.instance, NULL);
SetWindowLongPtr (my window, GWLP_USERDATA, (LONG_PTR) me);
+ //TRACE
+ trace (U"Created window ", Melder_pointer (my window), U" for original RowColumn ", Melder_pointer (me));
} break;
case xmListWidgetClass: Melder_fatal (U"Should be implemented in GuiList."); break;
case xmMenuBarWidgetClass: {
@@ -547,9 +550,15 @@ static void _GuiNativizeWidget (GuiObject me) {
my widgetClass = xmRowColumnWidgetClass; // !!!!!!!!!!!!!
my orientation = XmHORIZONTAL;
my rowColumnType = XmMENU_BAR;
- my window = CreateWindowEx (0, Melder_peek32toW (theWindowClassName), L"rowColumn", WS_CHILD,
- my x, my y, my width, my height, my parent -> window, NULL, theGui.instance, NULL);
- SetWindowLongPtr (my window, GWLP_USERDATA, (LONG_PTR) me);
+ #if TRY_BARLESS
+ my window = my parent -> window;
+ #else
+ my window = CreateWindowEx (0, Melder_peek32toW (theWindowClassName), L"rowColumn", WS_CHILD,
+ my x, my y, my width, my height, my parent -> window, NULL, theGui.instance, NULL);
+ SetWindowLongPtr (my window, GWLP_USERDATA, (LONG_PTR) me);
+ #endif
+ //TRACE
+ trace (U"Created window ", Melder_pointer (my window), U" for MenuBar-derived RowColumn ", Melder_pointer (me));
}
} break;
case xmPulldownMenuWidgetClass: {
@@ -679,6 +688,8 @@ static void _GuiNativizeWidget (GuiObject me) {
static GuiObject createWidget (int widgetClass, GuiObject parent, const char *name) {
GuiObject me = _Gui_initializeWidget (widgetClass, parent, Melder_peek8to32 (name));
_GuiNativizeWidget (me);
+ //TRACE
+ trace (U"Created widget ", Melder_pointer (me));
return me;
}
@@ -1400,6 +1411,8 @@ void XtRemoveTimeOut (XtIntervalId id) {
}
void XtDestroyWidget (GuiObject me) {
+ //TRACE
+ trace (U"Destroying widget ", Melder_pointer (me));
GuiObject subview = my firstChild;
/*
* Prevent subsequent messages.
@@ -1431,7 +1444,8 @@ void XtDestroyWidget (GuiObject me) {
_GuiWinLabel_destroy (me);
} break;
case xmCascadeButtonWidgetClass: {
- if (! my inMenu && ! MEMBER (my parent, MenuBar)) _GuiNativeControl_destroy (me);
+ if (! my inMenu && ! MEMBER (my parent, MenuBar))
+ _GuiNativeControl_destroy (me);
} break;
case xmScaleWidgetClass: {
_GuiWinScale_destroy (me);
@@ -1445,7 +1459,18 @@ void XtDestroyWidget (GuiObject me) {
case xmDrawingAreaWidgetClass: {
_GuiWinDrawingArea_destroy (me);
} break;
- case xmRowColumnWidgetClass:
+ case xmRowColumnWidgetClass: {
+ //TRACE
+ trace (U"Destroying window ", Melder_pointer (my window), U" for RowColumn ", Melder_pointer (me));
+ #if TRY_BARLESS
+ if (my rowColumnType == XmMENU_BAR)
+ ; // my window is my parent's window
+ else
+ DestroyWindow (my window);
+ #else
+ DestroyWindow (my window);
+ #endif
+ } break;
case xmFormWidgetClass:
case xmBulletinBoardWidgetClass: {
DestroyWindow (my window);
@@ -1569,9 +1594,12 @@ static void mapWidget (GuiObject me) {
case xmBulletinBoardWidgetClass:
case xmDrawingAreaWidgetClass:
case xmScrolledWindowWidgetClass:
- case xmFormWidgetClass:
- case xmRowColumnWidgetClass:
- ShowWindow (my window, SW_SHOW); break;
+ case xmFormWidgetClass: {
+ ShowWindow (my window, SW_SHOW);
+ } break;
+ case xmRowColumnWidgetClass: {
+ ShowWindow (my window, SW_SHOW);
+ } break;
case xmShellWidgetClass: {
ShowWindow (my window, theGui.commandShow);
if (my dialogStyle == XmDIALOG_FULL_APPLICATION_MODAL)
@@ -2799,7 +2827,7 @@ static LRESULT CALLBACK windowProc (HWND window, UINT message, WPARAM wParam, LP
case WM_APP: {
/*if (IsIconic (window)) ShowWindow (window, SW_RESTORE);
SetForegroundWindow (window);*/
- TRACE
+ //TRACE
trace (U"app message ", WM_APP);
return theUserMessageCallback ? theUserMessageCallback () : 1;
}
=====================================
sys/praat_actions.cpp
=====================================
@@ -219,10 +219,27 @@ static void deleteDynamicMenu () {
return;
static integer numberOfDeletions;
trace (U"deletion #", ++ numberOfDeletions);
+ #if motif
+ /*
+ Undangle the menu items. They can be destroyed by the removal of their pull-down menu.
+ */
+ for (integer i = 1; i <= theActions.size; i ++) {
+ Praat_Command action = theActions.at [i];
+ Melder_assert (action);
+ Melder_assert (Thing_isa (action, classPraat_Command));
+ if (action -> button) {
+ Melder_assert (action -> button -> classInfo != classGuiMenu);
+ if (action -> button -> classInfo == classGuiMenuItem)
+ action -> button = nullptr; // prevent destruction; the menu will take care of that
+ }
+ }
+ #endif
for (integer i = 1; i <= theActions.size; i ++) {
Praat_Command action = theActions.at [i];
+ Melder_assert (action);
+ Melder_assert (Thing_isa (action, classPraat_Command));
if (action -> button) {
- trace (U"trying to destroy action ", i, U" of ", theActions.size, U": ", action -> title.get());
+ trace (U"trying to destroy action ", i, U" of ", theActions.size, U", button ", Melder_pointer (action -> button), U": ", action -> title.get());
#if gtk || cocoa
if (action -> button -> d_parent == praat_form) {
trace (U"destroy a label or a push button or a cascade button");
@@ -232,12 +249,48 @@ static void deleteDynamicMenu () {
GuiObject_destroy (action -> button -> d_widget);
}
#elif motif
+ //trace ((int) * (char *) action -> button); // try to access the memory
+ Melder_assert (action -> button -> classInfo);
+ //trace (2);
+ if (action -> button -> classInfo == classGuiButton)
+ Melder_assert (action -> button -> d_widget);
+ //trace (3);
if (action -> button -> classInfo == classGuiButton && action -> button -> d_widget -> subMenuId) { // a cascade button (not a direct child of the form)?
- trace (U"destroy the xm menu bar; this also destroys the xm button and the xm menu");
- GuiObject_destroy (action -> button -> d_widget -> parent); // the Motif parent, i.e. not d_parent -> d_widget !
+ #define TRY_BARLESS 0
+ #if TRY_BARLESS
+ GuiObject_destroy (action -> button -> d_widget);
+ GuiObject_destroy (action -> button -> d_widget -> subMenuId);
+ #else
+ /*
+ We check that the parent is a RowColumn with exactly two children: a cascade button and a pulldown menu
+ */
+ GuiObject xmMenuBarRowColumn = action -> button -> d_widget -> parent;
+ Melder_assert (xmMenuBarRowColumn);
+ trace (U"destroy the xm menu bar (widget class ", xmMenuBarRowColumn -> widgetClass, U"); this also destroys the xm button and the xm menu");
+ Melder_assert (xmMenuBarRowColumn -> widgetClass == xmRowColumnWidgetClass);
+ GuiObject xmCascadeButton = xmMenuBarRowColumn -> firstChild;
+ Melder_assert (xmCascadeButton);
+ Melder_assert (xmCascadeButton -> widgetClass == xmCascadeButtonWidgetClass);
+ Melder_assert (xmCascadeButton == action -> button -> d_widget);
+ GuiObject xmPulldownMenu = xmCascadeButton -> nextSibling;
+ Melder_assert (xmPulldownMenu);
+ Melder_assert (xmPulldownMenu -> widgetClass == xmPulldownMenuWidgetClass);
+ Melder_assert (! xmPulldownMenu -> nextSibling);
+ Melder_assert (xmCascadeButton -> subMenuId == xmPulldownMenu);
+ /*
+ Let's do some controlled destruction.
+ */
+ //GuiObject_destroy (xmCascadeButton); Melder_assert (xmMenuBarRowColumn -> firstChild == xmPulldownMenu);
+ //GuiObject_destroy (xmPulldownMenu); Melder_assert (xmMenuBarRowColumn -> firstChild == nullptr);
+ GuiObject_destroy (xmMenuBarRowColumn);
+ //GuiObject_destroy (action -> button -> d_widget); // that would be only the cascade button
+ #endif
} else if (action -> button -> d_parent == praat_form) {
+ GuiObject xmLabelOrButton = action -> button -> d_widget;
+ Melder_assert (xmLabelOrButton);
+ Melder_assert (xmLabelOrButton -> widgetClass == xmLabelWidgetClass || xmLabelOrButton -> widgetClass == xmPushButtonWidgetClass);
trace (U"destroy a label or a push button");
- GuiObject_destroy (action -> button -> d_widget);
+ GuiObject_destroy (xmLabelOrButton);
}
#endif
action -> button = nullptr; // undangle
View it on GitLab: https://salsa.debian.org/med-team/praat/-/compare/d9b89c24e9e30772f250806c37ba477569af583a...f876d24f72410f1ac51d37beb6367a76b5db36dd
--
View it on GitLab: https://salsa.debian.org/med-team/praat/-/compare/d9b89c24e9e30772f250806c37ba477569af583a...f876d24f72410f1ac51d37beb6367a76b5db36dd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250206/edd8304e/attachment-0001.htm>
More information about the debian-med-commit
mailing list