Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
FFmpegNotFoundDialog Class Referencefinal

#include <FFmpeg.h>

Inheritance diagram for FFmpegNotFoundDialog:
[legend]
Collaboration diagram for FFmpegNotFoundDialog:
[legend]

Public Member Functions

 FFmpegNotFoundDialog (wxWindow *parent)
 
void PopulateOrExchange (ShuttleGui &S)
 
void OnOk (wxCommandEvent &WXUNUSED(event))
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Attributes

wxCheckBox * mDontShow
 

Detailed Description

If Audacity failed to load libav*, this dialog shows up and tells user about that. It will pop-up again and again until it is disabled.

Definition at line 56 of file FFmpeg.h.

Constructor & Destructor Documentation

◆ FFmpegNotFoundDialog()

FFmpegNotFoundDialog::FFmpegNotFoundDialog ( wxWindow *  parent)

Definition at line 253 of file FFmpeg.cpp.

254  : wxDialogWrapper(parent, wxID_ANY, XO("FFmpeg not found"))
255 {
256  SetName();
257  ShuttleGui S(this, eIsCreating);
259 }

References eIsCreating.

Member Function Documentation

◆ OnOk()

void FFmpegNotFoundDialog::OnOk ( wxCommandEvent &  WXUNUSEDevent)

Definition at line 291 of file FFmpeg.cpp.

292 {
293  if (mDontShow->GetValue())
294  {
296  gPrefs->Flush();
297  }
298  this->EndModal(0);
299 }

References FFmpegNotFoundDontShow, FileConfig::Flush(), gPrefs, mDontShow, and Setting< T >::Write().

Here is the call graph for this function:

◆ PopulateOrExchange()

void FFmpegNotFoundDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 261 of file FFmpeg.cpp.

262 {
263  wxString text;
264 
265  S.SetBorder(10);
266  S.StartVerticalLay(true);
267  {
268  S.AddFixedText(XO(
269 "Audacity attempted to use FFmpeg to import an audio file,\n\
270 but the libraries were not found.\n\n\
271 To use FFmpeg import, go to Edit > Preferences > Libraries\n\
272 to download or locate the FFmpeg libraries."
273  ));
274 
275  mDontShow = S
276  .AddCheckBox(XXO("Do not show this warning again"),
278 
280  }
281  S.EndVerticalLay();
282 
283  Layout();
284  Fit();
285  SetMinSize(GetSize());
286  Center();
287 
288  return;
289 }

References ShuttleGuiBase::AddCheckBox(), ShuttleGuiBase::AddFixedText(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::EndVerticalLay(), eOkButton, FFmpegNotFoundDontShow, mDontShow, Setting< T >::Read(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartVerticalLay(), XO, and XXO.

Here is the call graph for this function:

Member Data Documentation

◆ mDontShow

wxCheckBox* FFmpegNotFoundDialog::mDontShow
private

Definition at line 68 of file FFmpeg.h.

Referenced by OnOk(), and PopulateOrExchange().


The documentation for this class was generated from the following files:
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
ShuttleGuiBase::AddCheckBox
wxCheckBox * AddCheckBox(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:309
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
Setting::Write
bool Write(const T &value)
Write value to config and return true if successful.
Definition: Prefs.h:172
XO
#define XO(s)
Definition: Internat.h:31
Setting::Read
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:128
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1203
ShuttleGuiBase::AddFixedText
void AddFixedText(const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
Definition: ShuttleGui.cpp:440
FFmpegNotFoundDontShow
BoolSetting FFmpegNotFoundDontShow
Definition: FFmpeg.cpp:349
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
eOkButton
@ eOkButton
Definition: ShuttleGui.h:600
FFmpegNotFoundDialog::mDontShow
wxCheckBox * mDontShow
Definition: FFmpeg.h:68
FFmpegNotFoundDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: FFmpeg.cpp:261
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2444
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
wxDialogWrapper::SetName
void SetName()
Definition: wxPanelWrapper.cpp:81
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631