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

Method LoadFile

modules/nyquist/mod-nyq-bench/NyqBench.cpp:1695–1719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1693}
1694
1695void NyqBench::LoadFile()
1696{
1697 wxString path = mPath.GetFullPath();
1698
1699 if (path.IsEmpty()) {
1700 return;
1701 }
1702
1703 wxFFile f(path);
1704 if (f.IsOpened()) {
1705 wxString t;
1706 if (f.ReadAll(&t)) {
1707//#if defined(__WXGTK__) || defined(__WXMAC__)
1708 t.Replace(wxT("\r\n"), wxT("\n"));
1709 t.Replace(wxT("\r"), wxT("\n"));
1710//#elif defined(__WXMSW__)
1711// t.Replace("\r\n", "\n");
1712//#endif
1713 mScript->SetValue(t);
1714 mScript->DiscardEdits();
1715 }
1716 }
1717
1718// mScript->LoadFile(mPath.GetFullPath());
1719}
1720
1721//----------------------------------------------------------------------------
1722// Connects Audacity menu item to an action in this dll.

Callers 7

ReadImageCacheMethod · 0.80
ShowHtmlTextMethod · 0.80
FetchImageMethod · 0.80
LoadEmbeddedImageMethod · 0.80
OnLoadMethod · 0.80
LoadEmbeddedPNGFunction · 0.80

Calls 3

IsOpenedMethod · 0.80
IsEmptyMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected