MCPcopy Create free account
hub / github.com/audacity/audacity / ShowWarningDialog

Function ShowWarningDialog

src/widgets/Warning.cpp:90–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90int ShowWarningDialog(wxWindow *parent,
91 const wxString &internalDialogName,
92 const TranslatableString &message,
93 bool showCancelButton,
94 const TranslatableString &footer)
95{
96 auto key = WarningDialogKey(internalDialogName);
97 if (!gPrefs->Read(key, (long) true)) {
98 return wxID_OK;
99 }
100
101 WarningDialog dlog(parent, message, footer, showCancelButton);
102
103 int retCode = dlog.ShowModal();
104 if (retCode == wxID_CANCEL)
105 return retCode;
106
107 gPrefs->Write(key, (retCode == wxID_YES));
108 gPrefs->Flush();
109 return wxID_OK;
110}

Callers 1

DropoutSubscriptionMethod · 0.50

Calls 5

WarningDialogKeyFunction · 0.85
ReadMethod · 0.45
ShowModalMethod · 0.45
WriteMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected