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 862 of file PrefsDialog.cpp.

863{
865
866 {
867 GlobalPrefsDialog dialog(
868 &GetProjectFrame( project ) /* parent */, &project );
869 wxCommandEvent Evt;
870 //dialog.Show();
871 dialog.OnOK(Evt);
872 }
873
874 // LL: Moved from PrefsDialog since wxWidgets on OSX can't deal with
875 // rebuilding the menus while the PrefsDialog is still in the modal
876 // state.
877 for (auto p : AllProjects{}) {
879// TODO: The comment below suggests this workaround is obsolete.
880#if defined(__WXGTK__)
881 // Workaround for:
882 //
883 // http://bugzilla.audacityteam.org/show_bug.cgi?id=458
884 //
885 // This workaround should be removed when Audacity updates to wxWidgets
886 // 3.x which has a fix.
887 auto &window = GetProjectFrame( *p );
888 wxRect r = window.GetRect();
889 window.SetSize(wxSize(1,1));
890 window.SetSize(r.GetSize());
891#endif
892 }
893}
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 ...
void RebuildMenuBar(AudacityProject &project)
Definition: Menus.cpp:493
static MenuManager & Get(AudacityProject &project)
Definition: Menus.cpp:69
static void ReinitializeAll()
Definition: Prefs.cpp:497

References MenuManager::Get(), GetProjectFrame(), PrefsDialog::OnOK(), 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: