mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-09 08:53:23 +02:00
Define AudacityTextEntryDialog wrapper around wxTextEntryDialog...
... Prohibiting use of the default caption which is unlocalized. (But we didn't use it in fact anywhere.)
This commit is contained in:
parent
ccb4bbac33
commit
af290d73c0
@ -1137,7 +1137,7 @@ void AudacityApp::GenerateCrashReport(wxDebugReport::Context ctx)
|
|||||||
|
|
||||||
if (ok && rpt.Process())
|
if (ok && rpt.Process())
|
||||||
{
|
{
|
||||||
wxTextEntryDialog dlg(NULL,
|
AudacityTextEntryDialog dlg(NULL,
|
||||||
_("Report generated to:"),
|
_("Report generated to:"),
|
||||||
_("Audacity Support Data"),
|
_("Audacity Support Data"),
|
||||||
rpt.GetCompressedFileName(),
|
rpt.GetCompressedFileName(),
|
||||||
|
@ -779,7 +779,7 @@ void EditChainsDialog::OnChainsEndEdit(wxListEvent &event)
|
|||||||
void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
|
void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
|
||||||
{
|
{
|
||||||
while (true) {
|
while (true) {
|
||||||
wxTextEntryDialog d(this,
|
AudacityTextEntryDialog d(this,
|
||||||
_("Enter name of new chain"),
|
_("Enter name of new chain"),
|
||||||
_("Name of new chain"));
|
_("Name of new chain"));
|
||||||
d.SetName(d.GetTitle());
|
d.SetName(d.GetTitle());
|
||||||
|
@ -774,7 +774,7 @@ void LabelDialog::OnChangeTrack(wxGridEvent & WXUNUSED(event), int row, RowData
|
|||||||
|
|
||||||
// User selected the "New..." choice so ask for a NEW name
|
// User selected the "New..." choice so ask for a NEW name
|
||||||
if (mTrackNames.Index(val) == 0) {
|
if (mTrackNames.Index(val) == 0) {
|
||||||
wxTextEntryDialog d(this,
|
AudacityTextEntryDialog d(this,
|
||||||
_("New Label Track"),
|
_("New Label Track"),
|
||||||
_("Enter track name"),
|
_("Enter track name"),
|
||||||
/* i18n-hint: (noun) it's the name of a kind of track.*/
|
/* i18n-hint: (noun) it's the name of a kind of track.*/
|
||||||
|
@ -3315,7 +3315,7 @@ void EditCurvesDialog::OnRename(wxCommandEvent & WXUNUSED(event))
|
|||||||
{ // Show the dialog and bail if the user cancels
|
{ // Show the dialog and bail if the user cancels
|
||||||
bad = false;
|
bad = false;
|
||||||
// build the dialog
|
// build the dialog
|
||||||
wxTextEntryDialog dlg( this,
|
AudacityTextEntryDialog dlg( this,
|
||||||
_("Rename '") + mEditCurves[ item ].Name + _("' to..."),
|
_("Rename '") + mEditCurves[ item ].Name + _("' to..."),
|
||||||
_("Rename...") );
|
_("Rename...") );
|
||||||
dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST );
|
dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST );
|
||||||
|
@ -1006,7 +1006,7 @@ wxString ExportMultiple::MakeFileName(const wxString &input)
|
|||||||
excluded.c_str());
|
excluded.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTextEntryDialog dlg( this, msg, _("Save As..."), newname );
|
AudacityTextEntryDialog dlg( this, msg, _("Save As..."), newname );
|
||||||
|
|
||||||
|
|
||||||
// And tell the validator about excluded chars
|
// And tell the validator about excluded chars
|
||||||
|
@ -98,4 +98,23 @@ inline int AudacityMessageBox(const wxString& message,
|
|||||||
return ::wxMessageBox(message, caption, style, parent, x, y);
|
return ::wxMessageBox(message, caption, style, parent, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Similarly wrap wxTextEntryDialog, to prohibit the default,
|
||||||
|
// unlocalized caption
|
||||||
|
#include <wx/textdlg.h>
|
||||||
|
|
||||||
|
class AudacityTextEntryDialog : public wxTabTraversalWrapper< wxTextEntryDialog >
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AudacityTextEntryDialog(
|
||||||
|
wxWindow *parent,
|
||||||
|
const wxString& message,
|
||||||
|
const wxString& caption, // don't use = wxGetTextFromUserPromptStr,
|
||||||
|
const wxString& value = wxEmptyString,
|
||||||
|
long style = wxTextEntryDialogStyle,
|
||||||
|
const wxPoint& pos = wxDefaultPosition)
|
||||||
|
: wxTabTraversalWrapper< wxTextEntryDialog>
|
||||||
|
{ parent, message, caption, value, style, pos }
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
#endif // __AUDACITY_ERRORDIALOG__
|
#endif // __AUDACITY_ERRORDIALOG__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user