mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-20 14:20:06 +02:00
Steve's patch for http://bugzilla.audacityteam.org/show_bug.cgi?id=687
Changes in AudacityProject::SaveAs() warning dialogs, per 'Save Project warning' discussion on audacity-quality, plus some further changes of my own. Similar changes for 'Save Compressed Project'. Added Cancel button to both warnings, so user can opt out immediately, rather than have to wait another dialog. Added wxMessageBox's best 'warning' icon to our WarningDialog constructor, so it shows in title bar. It's low-rez (32x32), but all that's available with wxWidgets 2.8.12. Easy to remove if too ugly.
This commit is contained in:
parent
7d4bc6917b
commit
bf2bc01b64
@ -263,12 +263,12 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Enable Export audio commands only when there are audio tracks.
|
// Enable Export audio commands only when there are audio tracks.
|
||||||
c->AddItem(wxT("Export"), _("&Export..."), FN(OnExport), wxT("Ctrl+Shift+E"),
|
c->AddItem(wxT("Export"), _("&Export Audio..."), FN(OnExport), wxT("Ctrl+Shift+E"),
|
||||||
AudioIONotBusyFlag | WaveTracksExistFlag,
|
AudioIONotBusyFlag | WaveTracksExistFlag,
|
||||||
AudioIONotBusyFlag | WaveTracksExistFlag);
|
AudioIONotBusyFlag | WaveTracksExistFlag);
|
||||||
|
|
||||||
// Enable Export Selection commands only when there's a selection.
|
// Enable Export Selection commands only when there's a selection.
|
||||||
c->AddItem(wxT("ExportSel"), _("Expo&rt Selection..."), FN(OnExportSelection),
|
c->AddItem(wxT("ExportSel"), _("Expo&rt Selected Audio..."), FN(OnExportSelection),
|
||||||
AudioIONotBusyFlag | TimeSelectedFlag | WaveTracksSelectedFlag,
|
AudioIONotBusyFlag | TimeSelectedFlag | WaveTracksSelectedFlag,
|
||||||
AudioIONotBusyFlag | TimeSelectedFlag | WaveTracksSelectedFlag);
|
AudioIONotBusyFlag | TimeSelectedFlag | WaveTracksSelectedFlag);
|
||||||
|
|
||||||
@ -3054,7 +3054,7 @@ void AudacityProject::OnExportSelection()
|
|||||||
Exporter e;
|
Exporter e;
|
||||||
|
|
||||||
wxGetApp().SetMissingAliasedFileWarningShouldShow(true);
|
wxGetApp().SetMissingAliasedFileWarningShouldShow(true);
|
||||||
e.SetFileDialogTitle( _("Export Selection") );
|
e.SetFileDialogTitle( _("Export Selected Audio") );
|
||||||
e.Process(this, true, mViewInfo.sel0, mViewInfo.sel1);
|
e.Process(this, true, mViewInfo.sel0, mViewInfo.sel1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3556,14 +3556,28 @@ bool AudacityProject::SaveAs(bool bWantSaveCompressed /*= false*/)
|
|||||||
wxString sDialogTitle;
|
wxString sDialogTitle;
|
||||||
if (bWantSaveCompressed)
|
if (bWantSaveCompressed)
|
||||||
{
|
{
|
||||||
ShowWarningDialog(this, wxT("FirstProjectSave"),
|
if (ShowWarningDialog(this, wxT("FirstProjectSave"),
|
||||||
_("Audacity compressed project files (.aup) save your work in a smaller, compressed (.ogg) format. \nCompressed project files are a good way to transmit your project online, because they are much smaller. \nTo open a compressed project takes longer than usual, as it imports each compressed track. \n\nMost other programs can't open Audacity project files.\nWhen you want to save a file that can be opened by other programs, select one of the\nExport commands."));
|
_("\
|
||||||
|
'Save Compressed Project' is for an Audacity project, not an audio file.\n\
|
||||||
|
For an audio file that will open in other apps, use 'Export'.\n\n\
|
||||||
|
\
|
||||||
|
Compressed project files are a good way to transmit your project online, \n\
|
||||||
|
but they have some loss of fidelity.\n\n\
|
||||||
|
\
|
||||||
|
To open a compressed project takes longer than usual, as it imports \n\
|
||||||
|
each compressed track.\n"),
|
||||||
|
true) != wxID_OK)
|
||||||
|
return false;
|
||||||
sDialogTitle.Printf(_("Save Compressed Project \"%s\" As..."), sProjName.c_str());
|
sDialogTitle.Printf(_("Save Compressed Project \"%s\" As..."), sProjName.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowWarningDialog(this, wxT("FirstProjectSave"),
|
if (ShowWarningDialog(this, wxT("FirstProjectSave"),
|
||||||
_("You are saving an Audacity project file (.aup).\n\nSaving a project creates a file that only Audacity can open.\n\nTo save an audio file for other programs, use one of the \"File > Export\" commands.\n"));
|
_("\
|
||||||
|
'Save Project' is for an Audacity project, not an audio file.\n\
|
||||||
|
For an audio file that will open in other apps, use 'Export'.\n"),
|
||||||
|
true) != wxID_OK)
|
||||||
|
return false;
|
||||||
sDialogTitle.Printf(_("Save Project \"%s\" As..."), sProjName.c_str());
|
sDialogTitle.Printf(_("Save Project \"%s\" As..."), sProjName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ Mixer* ExportPlugin::CreateMixer(int numInputTracks, WaveTrack **inputTracks,
|
|||||||
Exporter::Exporter()
|
Exporter::Exporter()
|
||||||
{
|
{
|
||||||
mMixerSpec = NULL;
|
mMixerSpec = NULL;
|
||||||
SetFileDialogTitle( _("Export File") );
|
SetFileDialogTitle( _("Export Audio") );
|
||||||
|
|
||||||
RegisterPlugin(New_ExportPCM());
|
RegisterPlugin(New_ExportPCM());
|
||||||
RegisterPlugin(New_ExportMP3());
|
RegisterPlugin(New_ExportMP3());
|
||||||
|
@ -23,6 +23,7 @@ the ability to not see similar warnings again for this session.
|
|||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
@ -55,6 +56,7 @@ WarningDialog::WarningDialog(wxWindow *parent, wxString message, bool showCancel
|
|||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
(showCancelButton ? wxDEFAULT_DIALOG_STYLE : wxCAPTION | wxSYSTEM_MENU)) // Unlike wxDEFAULT_DIALOG_STYLE, no wxCLOSE_BOX.
|
(showCancelButton ? wxDEFAULT_DIALOG_STYLE : wxCAPTION | wxSYSTEM_MENU)) // Unlike wxDEFAULT_DIALOG_STYLE, no wxCLOSE_BOX.
|
||||||
{
|
{
|
||||||
|
SetIcon(wxArtProvider::GetIcon(wxART_WARNING, wxART_MESSAGE_BOX));
|
||||||
ShuttleGui S(this, eIsCreating);
|
ShuttleGui S(this, eIsCreating);
|
||||||
|
|
||||||
S.SetBorder(10);
|
S.SetBorder(10);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user