Audacity 3.2.0
Functions
PrefsDialog.cpp File Reference
#include "PrefsDialog.h"
#include <thread>
#include <wx/app.h>
#include <wx/setup.h>
#include <wx/defs.h>
#include <wx/font.h>
#include <wx/gdicmn.h>
#include <wx/listbox.h>
#include <wx/listbook.h>
#include <wx/treebook.h>
#include <wx/treectrl.h>
#include "AudioIOBase.h"
#include "Prefs.h"
#include "ProjectWindows.h"
#include "ShuttleGui.h"
#include "CommandManager.h"
#include "PrefsPanel.h"
#include "HelpSystem.h"
#include <wx/frame.h>
#include "../MenuCreator.h"
#include "Project.h"
Include dependency graph for PrefsDialog.cpp:

Go to the source code of this file.

Functions

void DoReloadPreferences (AudacityProject &project)
 

Function Documentation

◆ DoReloadPreferences()

void 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: