Audacity 3.2.0
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 258 of file FFmpeg.cpp.

259 : wxDialogWrapper(parent, wxID_ANY, XO("FFmpeg not found"))
260{
261 SetName();
262 ShuttleGui S(this, eIsCreating);
264}
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
#define S(N)
Definition: ToChars.cpp:64
void PopulateOrExchange(ShuttleGui &S)
Definition: FFmpeg.cpp:266
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625

References eIsCreating, and S.

Member Function Documentation

◆ OnOk()

void FFmpegNotFoundDialog::OnOk ( wxCommandEvent &  WXUNUSEDevent)

Definition at line 296 of file FFmpeg.cpp.

297{
298 if (mDontShow->GetValue())
299 {
301 gPrefs->Flush();
302 }
303 this->EndModal(0);
304}
BoolSetting FFmpegNotFoundDontShow
Definition: FFmpeg.cpp:362
FileConfig * gPrefs
Definition: Prefs.cpp:70
wxCheckBox * mDontShow
Definition: FFmpeg.h:68
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
bool Write(const T &value)
Write value to config and return true if successful.
Definition: Prefs.h:252

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 266 of file FFmpeg.cpp.

267{
268 wxString text;
269
270 S.SetBorder(10);
271 S.StartVerticalLay(true);
272 {
273 S.AddFixedText(XO(
274"Audacity attempted to use FFmpeg to import an audio file,\n\
275but the libraries were not found.\n\n\
276To use FFmpeg import, go to Edit > Preferences > Libraries\n\
277to download or locate the FFmpeg libraries."
278 ));
279
280 mDontShow = S
281 .AddCheckBox(XXO("Do not show this warning again"),
283
284 S.AddStandardButtons(eOkButton);
285 }
286 S.EndVerticalLay();
287
288 Layout();
289 Fit();
290 SetMinSize(GetSize());
291 Center();
292
293 return;
294}
XXO("&Cut/Copy/Paste Toolbar")
@ eOkButton
Definition: ShuttleGui.h:594
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:200

References eOkButton, FFmpegNotFoundDontShow, mDontShow, Setting< T >::Read(), S, 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: