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 "../commands/CommandManager.h"
#include "PrefsPanel.h"
#include "HelpSystem.h"
#include <wx/frame.h>
#include "../Menus.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 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: