Audacity  3.0.3
Public Member Functions | List of all members
NoUpdatesAvailableDialog Class Referencefinal

Information dialog about no updates available, that allows to navigate to settings quickly. More...

#include <NoUpdatesAvailableDialog.h>

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

Public Member Functions

 NoUpdatesAvailableDialog (wxWindow *parent)
 
virtual ~NoUpdatesAvailableDialog ()
 
void OnOk (wxCommandEvent &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
 

Detailed Description

Information dialog about no updates available, that allows to navigate to settings quickly.

Definition at line 18 of file NoUpdatesAvailableDialog.h.

Constructor & Destructor Documentation

◆ NoUpdatesAvailableDialog()

NoUpdatesAvailableDialog::NoUpdatesAvailableDialog ( wxWindow *  parent)
explicit

Definition at line 30 of file NoUpdatesAvailableDialog.cpp.

32  parent, -1, XO("Check for Updates"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
33 {
34  ShuttleGui S(this, eIsCreating);
35 
36  S.SetBorder(8);
37 
38  S.StartVerticalLay();
39  {
40  S.AddSpace(0, 12);
41 
42  S.StartHorizontalLay();
43  {
44  S.AddSpace(12, 0);
45 
46  S.StartVerticalLay();
47  {
48  wxStaticText* titleCtrl = S.AddVariableText(title, false, 0, 500);
49 
50  wxFont font = titleCtrl->GetFont().MakeLarger().MakeBold();
51 
52  titleCtrl->SetFont(font);
53 
54  AccessibleLinksFormatter preferencesMessage(
55  /* i18n-hint: %s is replaced with 'Preferences > Application'. */
56  XO("If you want to change your preference for automatic updates checking, you can find it in %s."));
57 
58  preferencesMessage.FormatLink(
59  /* i18n-hint: Hyperlink title that opens Preferences dialog on Application page and is substituted into "... you can find it in %s." string. */
60  wxT("%s"), XO("Preferences > Application"), [parent, this]() {
61  EndModal(wxID_OK);
62 
63  GlobalPrefsDialog dialog(parent, nullptr);
64 
65  dialog.SelectPageByName(XO("Application").Translation());
66  dialog.ShowModal();
67  });
68 
69  preferencesMessage.Populate(S);
70  }
71  S.EndVerticalLay();
72 
73  S.AddSpace(12, 0);
74  }
75  S.EndHorizontalLay();
76 
77  S.AddSpace(0, 12);
78 
79  S.AddStandardButtons(eOkButton);
80  }
81  S.EndVerticalLay();
82 
83  Layout();
84  Fit();
85  Center();
86 }

References ShuttleGui::AddSpace(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddVariableText(), eIsCreating, ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndVerticalLay(), eOkButton, AccessibleLinksFormatter::FormatLink(), AccessibleLinksFormatter::Populate(), PrefsDialog::SelectPageByName(), ShuttleGuiBase::SetBorder(), PrefsDialog::ShowModal(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartVerticalLay(), title, and XO.

Here is the call graph for this function:

◆ ~NoUpdatesAvailableDialog()

NoUpdatesAvailableDialog::~NoUpdatesAvailableDialog ( )
virtual

Definition at line 88 of file NoUpdatesAvailableDialog.cpp.

89 {
90  ;
91 }

Member Function Documentation

◆ OnOk()

void NoUpdatesAvailableDialog::OnOk ( wxCommandEvent &  event)

Definition at line 93 of file NoUpdatesAvailableDialog.cpp.

94 {
95  EndModal(wxID_OK);
96 }

The documentation for this class was generated from the following files:
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
XO
#define XO(s)
Definition: Internat.h:31
title
static const auto title
Definition: NoUpdatesAvailableDialog.cpp:22
eOkButton
@ eOkButton
Definition: ShuttleGui.h:600
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
GlobalPrefsDialog
Definition: PrefsDialog.h:81
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631