MCPcopy Create free account
hub / github.com/SpartanJ/eepp / runUpdate

Method runUpdate

src/tools/ecode/uibuildsettings.cpp:1118–1148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1116}
1117
1118void UIBuildSettings::runUpdate( bool recreateList, UIDropDownList* runList,
1119 UIDropDownList* panelRunListDDL ) {
1120 if ( recreateList ) {
1121 runList->getListBox()->clear();
1122 if ( panelRunListDDL )
1123 panelRunListDDL->getListBox()->clear();
1124
1125 size_t i = 1;
1126 for ( const auto& run : mBuild.mRun ) {
1127 auto name =
1128 run->name.empty()
1129 ? String::format(
1130 i18n( "custom_executable_num", "Custom Executable %d" ).toUtf8(), i )
1131 : run->name;
1132 runList->getListBox()->addListBoxItem( name );
1133 if ( panelRunListDDL )
1134 panelRunListDDL->getListBox()->addListBoxItem( name );
1135 i++;
1136 }
1137 }
1138
1139 bool runButEnabled = !runList->getListBox()->isEmpty();
1140 runList->setEnabled( runButEnabled );
1141 if ( panelRunListDDL )
1142 panelRunListDDL->setEnabled( runButEnabled );
1143 find( "run_cont" )->setEnabled( runButEnabled )->setVisible( runButEnabled );
1144 find( "run_remove" )->setEnabled( runButEnabled );
1145 find( "run_remove_all" )->setEnabled( runButEnabled );
1146 find( "run_rename" )->setEnabled( runButEnabled );
1147 find( "run_clone" )->setEnabled( runButEnabled );
1148}
1149
1150Uint32 UIBuildSettings::runIndex() const {
1151 for ( size_t i = 0; i < mBuild.mRun.size(); i++ ) {

Callers

nothing calls this directly

Calls 10

formatFunction · 0.85
findFunction · 0.85
toUtf8Method · 0.80
addListBoxItemMethod · 0.80
clearMethod · 0.45
getListBoxMethod · 0.45
emptyMethod · 0.45
isEmptyMethod · 0.45
setEnabledMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected