Audacity  3.0.3
Classes | Macros | Functions
PrefsDialog.h File Reference
#include <functional>
#include <vector>
#include "../widgets/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
 

Macros

#define CONST   const
 

Functions

void AUDACITY_DLL_API DoReloadPreferences (AudacityProject &project)
 

Macro Definition Documentation

◆ CONST

#define CONST   const

Definition at line 28 of file PrefsDialog.h.

Function Documentation

◆ DoReloadPreferences()

void AUDACITY_DLL_API DoReloadPreferences ( AudacityProject project)

Definition at line 846 of file PrefsDialog.cpp.

847 {
849 
850  {
851  GlobalPrefsDialog dialog(
852  &GetProjectFrame( project ) /* parent */, &project );
853  wxCommandEvent Evt;
854  //dialog.Show();
855  dialog.OnOK(Evt);
856  }
857 
858  // LL: Moved from PrefsDialog since wxWidgets on OSX can't deal with
859  // rebuilding the menus while the PrefsDialog is still in the modal
860  // state.
861  for (auto p : AllProjects{}) {
863 // TODO: The comment below suggests this workaround is obsolete.
864 #if defined(__WXGTK__)
865  // Workaround for:
866  //
867  // http://bugzilla.audacityteam.org/show_bug.cgi?id=458
868  //
869  // This workaround should be removed when Audacity updates to wxWidgets
870  // 3.x which has a fix.
871  auto &window = GetProjectFrame( *p );
872  wxRect r = window.GetRect();
873  window.SetSize(wxSize(1,1));
874  window.SetSize(r.GetSize());
875 #endif
876  }
877 }

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

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

Here is the call graph for this function:
Here is the caller graph for this function:
PreferenceInitializer::ReinitializeAll
static void ReinitializeAll()
Definition: Prefs.cpp:443
MenuCreator::RebuildMenuBar
void RebuildMenuBar(AudacityProject &project)
Definition: Menus.cpp:486
GetProjectFrame
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 ...
Definition: ProjectWindows.cpp:72
MenuManager::Get
static MenuManager & Get(AudacityProject &project)
Definition: Menus.cpp:70
AllProjects
Definition: Project.h:35
GlobalPrefsDialog
Definition: PrefsDialog.h:81