| 1116 | } |
| 1117 | |
| 1118 | void 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 | |
| 1150 | Uint32 UIBuildSettings::runIndex() const { |
| 1151 | for ( size_t i = 0; i < mBuild.mRun.size(); i++ ) { |
nothing calls this directly
no test coverage detected