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 182 of file FFmpeg.h.

Constructor & Destructor Documentation

◆ FFmpegNotFoundDialog()

FFmpegNotFoundDialog::FFmpegNotFoundDialog ( wxWindow *  parent)

Definition at line 572 of file FFmpeg.cpp.

573  : wxDialogWrapper(parent, wxID_ANY, XO("FFmpeg not found"))
574 {
575  SetName();
576  ShuttleGui S(this, eIsCreating);
578 }

References eIsCreating.

Member Function Documentation

◆ OnOk()

void FFmpegNotFoundDialog::OnOk ( wxCommandEvent &  WXUNUSEDevent)

Definition at line 610 of file FFmpeg.cpp.

611 {
612  if (mDontShow->GetValue())
613  {
614  gPrefs->Write(wxT("/FFmpeg/NotFoundDontShow"),1);
615  gPrefs->Flush();
616  }
617  this->EndModal(0);
618 }

References FileConfig::Flush(), gPrefs, and mDontShow.

Here is the call graph for this function:

◆ PopulateOrExchange()

void FFmpegNotFoundDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 580 of file FFmpeg.cpp.

581 {
582  wxString text;
583 
584  S.SetBorder(10);
585  S.StartVerticalLay(true);
586  {
587  S.AddFixedText(XO(
588 "Audacity attempted to use FFmpeg to import an audio file,\n\
589 but the libraries were not found.\n\n\
590 To use FFmpeg import, go to Edit > Preferences > Libraries\n\
591 to download or locate the FFmpeg libraries."
592  ));
593 
594  mDontShow = S
595  .AddCheckBox(XXO("Do not show this warning again"),
596  gPrefs->ReadBool(wxT("/FFmpeg/NotFoundDontShow"), false) );
597 
599  }
600  S.EndVerticalLay();
601 
602  Layout();
603  Fit();
604  SetMinSize(GetSize());
605  Center();
606 
607  return;
608 }

References ShuttleGuiBase::AddCheckBox(), ShuttleGuiBase::AddFixedText(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::EndVerticalLay(), eOkButton, gPrefs, mDontShow, 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 194 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:37
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1177
ShuttleGuiBase::AddCheckBox
wxCheckBox * AddCheckBox(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:302
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:68
XO
#define XO(s)
Definition: Internat.h:31
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1196
ShuttleGuiBase::AddFixedText
void AddFixedText(const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
Definition: ShuttleGui.cpp:433
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:153
eOkButton
@ eOkButton
Definition: ShuttleGui.h:594
FFmpegNotFoundDialog::mDontShow
wxCheckBox * mDontShow
Definition: FFmpeg.h:194
FFmpegNotFoundDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: FFmpeg.cpp:580
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2406
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:484
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:625