Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2563 - Button text ignored in Nyquist "file" widget
Button text ignored in Nyquist "file" widget
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Nyquist
2.4.2
All All
: P3 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-05 13:30 UTC by Steve Daulton
Modified: 2020-10-06 06:16 UTC (History)
2 users (show)

See Also:
Steps To Reproduce:
1. Launch Audacity 2. Open the Nyquist Prompt and enter: ;control filename "Save to" file "RIGHT BUTTON TEXT" "*default*" "Text file|*.txt;*.TXT|All files|*.*;*" "save" (print filename) 3. Click OK to run the code 4. Observe that the button text is the default "Select a file" and not "RIGHT BUTTON TEXT"
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2020-10-06 00:00:00
stevethefiddle: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2020-10-05 13:30:03 UTC
This is a regression against Audacity 2.4.1

The syntax for the "file" widget is:

;control variable-name "text-left" file "button-text" "default-file-path" "wildcard-filters" "flags"

As of Audacity 2.4.2, the "button-text" is ignored.
Comment 1 Steve Daulton 2020-10-05 15:18:00 UTC
This was broken by https://github.com/audacity/audacity/commit/f1ae810
Comment 2 Steve Daulton 2020-10-05 16:22:39 UTC
Fix committed at https://github.com/audacity/audacity/commit/22dbe0a
Comment 3 Peter Sampson 2020-10-06 05:18:41 UTC
(In reply to Steve Daulton from comment #2)
Testing on W10 with Audacity 3.0.0 22dbe0a

a) Connie does not like the full-capitalization "RIGHT BUTTON TEXT"
this is inconsistent with any other button that we have (it's shouting)

b) I cannot understand this change anyway what is "Right button text" supposed to do? Clicking it invokes a "Save file as" - meaning that the original button text of "Select a file" looks totally appropriate.

c) If "Right button text" is deemed to be correct and meaningful there is no description in thge Manual of waht it might do:
https://alphamanual.audacityteam.org/man/Nyquist_Prompt


Accordingly I am going to reopen this
Comment 4 Steve Daulton 2020-10-06 05:48:29 UTC
(In reply to Peter Sampson from comment #3)
> Connie does not like the full-capitalization "RIGHT BUTTON TEXT"

"RIGHT BUTTON TEXT" is just an example of customised button text. The text on the button should be customisable through the ";control" line.

Example, if you want the button text to be "Click Me", then substitute that in place of "Button Text" like this:

;control filename "Save to" file "Click Me" "*default*/something.txt" "Text file|*.txt;*.TXT|All files|*.*;*" "save"
()

In Audacity 2.4.2 you will (incorrectly) see the default "Select a file" as the button text, even though the above code says the text should be "Click Me".

In Audacity 3.0.0 (post fix) you should see that the above code overrides the default and shows "Click Me".



If the right button text is not specified (an empty string), then the default "Select a file" will appear on the button. Here is the code for that:
;control filename "Save to" file "" "*default*/something.txt" "Text file|*.txt;*.TXT|All files|*.*;*" "save"
()
Comment 5 Steve Daulton 2020-10-06 05:53:09 UTC
(In reply to Peter Sampson from comment #3)
> there is no description in thge Manual


The "widgets" syntax is documented here:
https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Widgets

There is also comprehensive documentation of the "file widget" here:
https://wiki.audacityteam.org/wiki/Nyquist_File-Button_Tutorial


Changing the bug status back to "fix made" for retest.
(I'm aware that this is a very "technical" bug, so please feel free to discuss with me off-list if necessary).
Comment 6 Peter Sampson 2020-10-06 06:02:21 UTC
(In reply to Steve Daulton from comment #5)
Thanks for taht explanation (would help if I understood the Nyquist)

So now marked as "+" OK on W10
Comment 7 Peter Sampson 2020-10-06 06:13:28 UTC
(In reply to Steve Daulton from comment #5)
Testing on macOS 10.15.6 with Audacity 3.0.0 22dbe0a

Works on Mac as well

So closable if you, Steve, are happy with it on Linux
Comment 8 Steve Daulton 2020-10-06 06:16:36 UTC
(In reply to Peter Sampson from comment #7)
> So closable if you, Steve, are happy with it on Linux

Thanks Peter. I'm happy with it on Linux, so closing as fixed.