Audacity 3.2.0
Classes | Functions
PrefsDialog.h File Reference
#include <functional>
#include <vector>
#include "wxPanelWrapper.h"
#include "PrefsPanel.h"
Include dependency graph for PrefsDialog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PrefsDialog
 Dialog that shows the current PrefsPanel in a tabbed divider. More...
 
class  GlobalPrefsDialog
 

Functions

void AUDACITY_DLL_API DoReloadPreferences (AudacityProject &project)
 

Function Documentation

◆ DoReloadPreferences()

void AUDACITY_DLL_API DoReloadPreferences ( AudacityProject project)

Definition at line 860 of file PrefsDialog.cpp.

861{
863
864 {
865 GlobalPrefsDialog dialog(
866 &GetProjectFrame( project ) /* parent */, &project );
867 wxCommandEvent Evt;
868 //dialog.Show();
869 dialog.OnOK(Evt);
870 }
871
872 // LL: Moved from PrefsDialog since wxWidgets on OSX can't deal with
873 // rebuilding the menus while the PrefsDialog is still in the modal
874 // state.
875 for (auto p : AllProjects{}) {
877// TODO: The comment below suggests this workaround is obsolete.
878#if defined(__WXGTK__)
879 // Workaround for:
880 //
881 // http://bugzilla.audacityteam.org/show_bug.cgi?id=458
882 //
883 // This workaround should be removed when Audacity updates to wxWidgets
884 // 3.x which has a fix.
885 auto &window = GetProjectFrame( *p );
886 wxRect r = window.GetRect();
887 window.SetSize(wxSize(1,1));
888 window.SetSize(r.GetSize());
889#endif
890 }
891}
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
const auto project
void RebuildMenuBar()
static MenuCreator & Get(AudacityProject &project)
Definition: MenuCreator.cpp:91
static void ReinitializeAll()
Definition: Prefs.cpp:538

References MenuCreator::Get(), GetProjectFrame(), PrefsDialog::OnOK(), project, MenuCreator::RebuildMenuBar(), and PreferenceInitializer::ReinitializeAll().

Referenced by SetPreferenceCommand::Apply(), anonymous_namespace{PluginMenus.cpp}::OnResetConfig(), and anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange().

Here is the call graph for this function:
Here is the caller graph for this function: