MCPcopy Create free account
hub / github.com/audacity/audacity / DoReloadPreferences

Function DoReloadPreferences

src/prefs/PrefsDialog.cpp:860–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858#include "Project.h"
859
860void DoReloadPreferences( AudacityProject &project )
861{
862 PreferenceInitializer::ReinitializeAll();
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{}) {
876 MenuCreator::Get(*p).RebuildMenuBar();
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}

Callers 3

ApplyMethod · 0.85
OnResetConfigFunction · 0.85
QuickFixDialogClass · 0.85

Calls 6

GetFunction · 0.85
RebuildMenuBarMethod · 0.80
wxSizeClass · 0.50
OnOKMethod · 0.45
SetSizeMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected