diff --git a/src/Prefs.cpp b/src/Prefs.cpp index 6ade29d22..ba9557d41 100644 --- a/src/Prefs.cpp +++ b/src/Prefs.cpp @@ -175,6 +175,40 @@ void InitPreferences() gPrefs->DeleteGroup(wxT("/Locale")); gPrefs->Write(wxT("/PrefsVersion"), wxString(wxT(AUDACITY_PREFS_VERSION_STRING))); } + + // Check if some prefs updates need to happen based on audacity version. + // Unfortunately we can't use the PrefsVersion prefs key because that resets things. + // In the future we may want to integrate that better. + // these are done on a case-by-case basis for now so they must be backwards compatible + // (meaning the changes won't mess audacity up if the user goes back to an earlier version) + int vMajor = gPrefs->Read(wxT("/Version/Major"), (long) 0); + int vMinor = gPrefs->Read(wxT("/Version/Minor"), (long) 0); + int vMicro = gPrefs->Read(wxT("/Version/Micro"), (long) 0); + + // These integer version keys were introduced april 4 2011 for 1.3.13 + // The device toolbar needs to be enabled due to removal of source selection features in + // the mixer toolbar. + if ((vMajor < 1) || + (vMajor == 1 && vMinor < 3) || + (vMajor == 1 && vMinor == 3 && vMicro < 13)) { + + + // Do a full reset of the Device Toolbar to get it on the screen. + if (gPrefs->Exists(wxT("/GUI/ToolBars/Device"))) + gPrefs->DeleteGroup(wxT("/GUI/ToolBars/Device")); + + // We keep the mixer toolbar prefs (shown/not shown) + // the width of the mixer toolbar may have shrunk, the prefs will keep the larger value + // if the user had a device that had more than one source. + if (gPrefs->Exists(wxT("/GUI/ToolBars/Mixer"))) { + // Use the default width + gPrefs->Write(wxT("/GUI/ToolBars/Mixer/W"), -1); + } + } + + gPrefs->Write(wxT("/Version/Major"), AUDACITY_VERSION); + gPrefs->Write(wxT("/Version/Minor"), AUDACITY_RELEASE); + gPrefs->Write(wxT("/Version/Micro"), AUDACITY_REVISION); } void FinishPreferences() diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index 40ab68e91..9d708fcb1 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -81,8 +81,12 @@ BEGIN_EVENT_TABLE(ControlToolBar, ToolBar) END_EVENT_TABLE() //Standard constructor +// This was called "Control" toolbar in the GUI before - now it is "Transport". +// Note that we use the legacy "Control" string as the section because this +// gets written to prefs and cannot be changed in prefs to maintain backwards +// compatibility ControlToolBar::ControlToolBar() -: ToolBar(TransportBarID, _("Transport"), wxT("Transport")) +: ToolBar(TransportBarID, _("Transport"), wxT("Control")) { mPaused = false; mSizer = NULL;