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

Method NotifyMenu

src/widgets/FileHistory.cpp:152–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void FileHistory::NotifyMenu(wxMenu *menu)
153{
154 wxMenuItemList items = menu->GetMenuItems();
155 for (auto end = items.end(), iter = items.begin(); iter != end;)
156 menu->Destroy(*iter++);
157
158 for (size_t i = 0; i < mHistory.size(); i++) {
159 wxString item = mHistory[i];
160 item.Replace( "&", "&&" );
161 menu->Append(mIDBase + 1 + i,item);
162 }
163
164 if (mHistory.size() > 0) {
165 menu->AppendSeparator();
166 }
167 menu->Append(mIDBase, _("&Clear"));
168 menu->Enable(mIDBase, mHistory.size() > 0);
169}
170
171void FileHistory::Compress()
172{

Callers

nothing calls this directly

Calls 7

GetMenuItemsMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
DestroyMethod · 0.45
sizeMethod · 0.45
AppendMethod · 0.45
EnableMethod · 0.45

Tested by

no test coverage detected