1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 07:13:49 +01:00

Fix crash initializing GlobalPrefsDialog for special case of undefined temp...

... directory at startup time.
This commit is contained in:
Paul Licameli
2015-06-17 16:01:44 -04:00
parent 7b01339e51
commit b924c8ad62
3 changed files with 9 additions and 11 deletions

View File

@@ -386,18 +386,13 @@ void PrefsDialog::SelectPageByName(wxString pageName)
}
}
void PrefsDialog::ShowTempDirPage()
{
SelectPageByName(_("Directories"));
}
int PrefsDialog::GetSelectedPage() const
{
return mCategories->GetSelection();
}
GlobalPrefsDialog::GlobalPrefsDialog(wxWindow * parent)
: PrefsDialog(parent, _("Preferences: "), DefaultFactories())
GlobalPrefsDialog::GlobalPrefsDialog(wxWindow * parent, Factories &factories)
: PrefsDialog(parent, _("Preferences: "), factories)
{
}

View File

@@ -58,7 +58,6 @@ class PrefsDialog:public wxDialog
void OnTreeKeyDown(wxTreeEvent & e); // Used to dismiss the dialog when enter is pressed with focus on tree
void SelectPageByName(wxString pageName);
void ShowTempDirPage();
// Accessor to help implementations of SavePreferredPage(),
// such as by saving a preference after DoModal() returns
@@ -85,7 +84,7 @@ private:
class GlobalPrefsDialog : public PrefsDialog
{
public:
GlobalPrefsDialog(wxWindow * parent);
GlobalPrefsDialog(wxWindow * parent, Factories &factories = DefaultFactories());
virtual ~GlobalPrefsDialog();
virtual long GetPreferredPage();
virtual void SavePreferredPage();