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

Method Populate

src/prefs/KeyConfigPrefs.cpp:125–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void KeyConfigPrefs::Populate()
126{
127 ShuttleGui S(this, eIsCreatingFromPrefs);
128
129 if (!mProject) {
130 S.StartVerticalLay(true);
131 {
132 S.StartStatic( {}, true);
133 {
134 S.AddTitle(XO("Keyboard preferences currently unavailable."));
135 S.AddTitle(XO("Open a new project to modify keyboard shortcuts."));
136 }
137 S.EndStatic();
138 }
139 S.EndVerticalLay();
140
141 return;
142 }
143
144 PopulateOrExchange(S);
145
146 mCommandSelected = wxNOT_FOUND;
147
148 mManager = &CommandManager::Get( *mProject );
149
150 // For speed, don't sort here. We're just creating.
151 // Instead sort when we do SetView later in this function.
152 RefreshBindings(false);
153
154 if (mViewByTree->GetValue()) {
155 mViewType = ViewByTree;
156 }
157 else if (mViewByName->GetValue()) {
158 mViewType = ViewByName;
159 }
160 else if (mViewByKey->GetValue()) {
161 mViewType = ViewByKey;
162 mFilterLabel->SetLabel(_("&Hotkey:"));
163 mFilter->SetName(wxStripMenuCodes(mFilterLabel->GetLabel()));
164 }
165
166 mView->SetView(mViewType);
167}
168
169/// Normally in classes derived from PrefsPanel this function
170/// is used both to populate the panel and to exchange data with it.

Callers

nothing calls this directly

Calls 10

GetFunction · 0.85
StartStaticMethod · 0.80
EndStaticMethod · 0.80
SetViewMethod · 0.80
PopulateOrExchangeFunction · 0.50
AddTitleMethod · 0.45
GetValueMethod · 0.45
SetLabelMethod · 0.45
SetNameMethod · 0.45
GetLabelMethod · 0.45

Tested by

no test coverage detected