mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-30 23:49:28 +02:00
More #ifdefs to allow joint Audacity/DarkAudacity use.
This commit is contained in:
parent
da1f860f2f
commit
49010dc7b0
@ -48,8 +48,7 @@
|
||||
// feature to link audio tracks to a label track
|
||||
#define EXPERIMENTAL_SYNC_LOCK
|
||||
|
||||
// enables dark theme and customisations.
|
||||
#define EXPERIMENTAL_DARK_AUDACITY
|
||||
// enables dark audacity theme and customisations.
|
||||
#define EXPERIMENTAL_DA
|
||||
|
||||
// experimental theming
|
||||
|
@ -57,6 +57,12 @@ const wxString& GetCustomSubstitution(const wxString& str2)
|
||||
str3.Replace( " an DarkAudacity", " a DarkAudacity" );
|
||||
return wxTranslations::GetUntranslatedString(str3);
|
||||
}
|
||||
#else
|
||||
const wxString& GetCustomSubstitution(const wxString& str1)
|
||||
{
|
||||
return str1 ;
|
||||
}
|
||||
#endif
|
||||
|
||||
// In any translated string, we can replace the name 'Audacity' by 'DarkAudacity'
|
||||
// without requiring translators to see extra strings for the two versions.
|
||||
@ -65,7 +71,6 @@ const wxString& GetCustomTranslation(const wxString& str1)
|
||||
const wxString& str2 = wxGetTranslation( str1 );
|
||||
return GetCustomSubstitution( str2 );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void Internat::Init()
|
||||
|
@ -325,7 +325,7 @@ void AudacityProject::CreateMenusAndCommands()
|
||||
AudioIONotBusyFlag | UnsavedChangesFlag);
|
||||
c->AddItem(wxT("SaveAs"), _("Save Project &As..."), FN(OnSaveAs));
|
||||
c->BeginSubMenu( _("Save Other") );
|
||||
#ifdef EXPERIMENTAL_DARK_AUDACITY
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
// Enable Export audio commands only when there are audio tracks.
|
||||
c->AddItem(wxT("ExportMp3"), _("Export as MP&3"), FN(OnExportMp3), wxT(""),
|
||||
AudioIONotBusyFlag | WaveTracksExistFlag,
|
||||
@ -593,7 +593,11 @@ void AudacityProject::CreateMenusAndCommands()
|
||||
TracksExistFlag, TracksExistFlag);
|
||||
|
||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
c->AddItem(wxT("SelSyncLockTracks"), _("In All Time-Locked Tracks"),
|
||||
#else
|
||||
c->AddItem(wxT("SelSyncLockTracks"), _("In All Sync-Locked Tracks"),
|
||||
#endif
|
||||
FN(OnSelectSyncLockSel), wxT("Ctrl+Shift+Y"),
|
||||
TracksSelectedFlag | IsSyncLockedFlag,
|
||||
TracksSelectedFlag | IsSyncLockedFlag);
|
||||
|
@ -1256,7 +1256,11 @@ void AudacityProject::UpdatePrefsVariables()
|
||||
gPrefs->Read(wxT("/AudioFiles/NormalizeOnLoad"),&mNormalizeOnLoad, false);
|
||||
gPrefs->Read(wxT("/GUI/AutoScroll"), &mViewInfo.bUpdateTrackIndicator, true);
|
||||
gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true );
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
gPrefs->Read(wxT("/GUI/Help"), &mHelpPref, wxT("FromInternet") );
|
||||
#else
|
||||
gPrefs->Read(wxT("/GUI/Help"), &mHelpPref, wxT("Local") );
|
||||
#endif
|
||||
gPrefs->Read(wxT("/GUI/SelectAllOnNone"), &mSelectAllOnNone, true);
|
||||
mStopIfWasPaused = true; // not configurable for now, but could be later.
|
||||
gPrefs->Read(wxT("/GUI/ShowSplashScreen"), &mShowSplashScreen, true);
|
||||
|
@ -522,7 +522,11 @@ int SourceOutputStream::OpenFile(const wxString & Filename)
|
||||
bOk = File.Open( Filename, wxFile::write );
|
||||
if( bOk )
|
||||
{
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
File.Write( wxT("// DarkThemeAsCeeCode.h\r\n") );
|
||||
#else
|
||||
File.Write( wxT("// ThemeAsCeeCode.h\r\n") );
|
||||
#endif
|
||||
File.Write( wxT("//\r\n") );
|
||||
File.Write( wxT("// This file was Auto-Generated.\r\n") );
|
||||
File.Write( wxT("// It is included by Theme.cpp.\r\n") );
|
||||
|
@ -392,7 +392,11 @@ wxAccStatus TrackPanelAx::GetName( int childId, wxString* name )
|
||||
this track is shown with a sync-locked icon.*/
|
||||
// The absence of a dash between Sync and Locked is deliberate -
|
||||
// if present, Jaws reads it as "dash".
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
name->Append( wxT(" ") + wxString(_( " Time Lock Selected" )) );
|
||||
#else
|
||||
name->Append( wxT(" ") + wxString(_( " Sync Lock Selected" )) );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "../Experimental.h"
|
||||
#include "DtmfGen.h"
|
||||
|
||||
#include <wx/intl.h>
|
||||
@ -33,12 +34,18 @@ enum
|
||||
ID_DutyCycle,
|
||||
};
|
||||
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
#define SHORT_APP_NAME "darkaudacity"
|
||||
#else
|
||||
#define SHORT_APP_NAME "audacity"
|
||||
#endif
|
||||
|
||||
// Define keys, defaults, minimums, and maximums for the effect parameters
|
||||
//
|
||||
// Name Type Key Def Min Max Scale
|
||||
Param( Sequence, wxString, XO("Sequence"), wxT("darkaudacity"), wxT(""), wxT(""), wxT(""));
|
||||
Param( DutyCycle, double, XO("Duty Cycle"), 55.0, 0.0, 100.0, 10.0 );
|
||||
Param( Amplitude, double, XO("Amplitude"), 0.8, 0.001, 1.0, 1 );
|
||||
// Name Type Key Def Min Max Scale
|
||||
Param( Sequence, wxString, XO("Sequence"), wxT(SHORT_APP_NAME), wxT(""), wxT(""), wxT(""));
|
||||
Param( DutyCycle, double, XO("Duty Cycle"), 55.0, 0.0, 100.0, 10.0 );
|
||||
Param( Amplitude, double, XO("Amplitude"), 0.8, 0.001, 1.0, 1 );
|
||||
|
||||
static const double kFadeInOut = 250.0; // used for fadein/out needed to remove clicking noise
|
||||
|
||||
@ -269,7 +276,7 @@ bool EffectDtmf::Startup()
|
||||
// Load the old "current" settings
|
||||
if (gPrefs->Exists(base))
|
||||
{
|
||||
gPrefs->Read(base + wxT("String"), &dtmfSequence, wxT("darkaudacity"));
|
||||
gPrefs->Read(base + wxT("String"), &dtmfSequence, wxT(SHORT_APP_NAME));
|
||||
gPrefs->Read(base + wxT("DutyCycle"), &dtmfDutyCycle, 550L);
|
||||
gPrefs->Read(base + wxT("Amplitude"), &dtmfAmplitude, 0.8f);
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "../Experimental.h"
|
||||
#include "TruncSilence.h"
|
||||
|
||||
#include <algorithm>
|
||||
@ -283,7 +284,11 @@ bool EffectTruncSilence::ProcessIndependently()
|
||||
if (track2->GetKind() == Track::Wave &&
|
||||
!(track2 == track || track2 == link) &&
|
||||
track2->GetSelected()) {
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
::wxMessageBox(_("When truncating independently, there may only be one selected audio track in each Time-Locked Track Group."));
|
||||
#else
|
||||
::wxMessageBox(_("When truncating independently, there may only be one selected audio track in each Sync-Locked Track Group."));
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,11 @@ bool GUIPrefs::Apply()
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
wxString theme = gPrefs->Read(wxT("/GUI/Theme"), wxT("dark"));
|
||||
#else
|
||||
wxString theme = gPrefs->Read(wxT("/GUI/Theme"), wxT("light"));
|
||||
#endif
|
||||
if( theme != "foo" ){
|
||||
// gPrefs->Write(wxT("/GUI/Theme"), theme);
|
||||
// gPrefs->Flush();
|
||||
|
@ -148,10 +148,12 @@ void EditToolBar::Populate()
|
||||
AddSeparator();
|
||||
|
||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||
// AddButton(bmpSyncLockTracksUp, bmpSyncLockTracksDown, bmpSyncLockTracksUp, ETBSyncLockID,
|
||||
// _("Time-Lock Tracks"), true);
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
AddButton(bmpSyncLockTracksUp, bmpSyncLockTracksDown, bmpSyncLockTracksUp, ETBSyncLockID,
|
||||
_("Sync-Lock Tracks"), true);
|
||||
|
||||
// AddSeparator();
|
||||
AddSeparator();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
AddButton(bmpZoomIn, bmpZoomIn, bmpZoomInDisabled, ETBZoomInID,
|
||||
@ -212,7 +214,9 @@ void EditToolBar::RegenerateTooltips()
|
||||
{ ETBRedoID, wxT("Redo"), XO("Redo") },
|
||||
|
||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||
// { ETBSyncLockID, wxT("SyncLock"), XO("Time-Lock Tracks") },
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
{ ETBSyncLockID, wxT("SyncLock"), XO("Sync-Lock Tracks") },
|
||||
#endif
|
||||
#endif
|
||||
|
||||
{ ETBZoomInID, wxT("ZoomIn"), XO("Zoom In") },
|
||||
|
@ -38,7 +38,9 @@ enum {
|
||||
ETBRedoID,
|
||||
|
||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||
// ETBSyncLockID,
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
ETBSyncLockID,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ETBZoomInID,
|
||||
|
@ -296,9 +296,15 @@ void HelpSystem::ShowHelpDialog(wxWindow *parent,
|
||||
}
|
||||
else if (releasePageName == wxT("Quick_Help"))
|
||||
{
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
releasePageName = wxT("video") + HelpSystem::ReleaseSuffix + anchor;
|
||||
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
||||
webHelpPath = wxT("http://www.darkaudacity.com/");
|
||||
#else
|
||||
releasePageName = wxT("quick_help") + HelpSystem::ReleaseSuffix + anchor;
|
||||
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
||||
webHelpPath = wxT("http://")+HelpSystem::HelpHostname+HelpSystem::HelpServerHomeDir;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user