Changeset 1146:0321756c76fe for src
- Timestamp:
- 04/24/24 13:54:14 (7 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/delaycodes.py
r1035 r1146 191 191 self._alignments = [] 192 192 self._checkButtons = [] 193 self._codesToExplain = [] 193 194 194 195 self._eventBox = Gtk.EventBox() … … 203 204 204 205 self._previousWidth = 0 206 207 @property 208 def _delayCodeRows(self): 209 """Get a list of the row indexes in the delay code data table of 210 the delay codes that are enabled.""" 211 rows = [] 212 213 for checkButton in self._checkButtons: 214 if checkButton.get_active(): 215 rows.append(checkButton.delayCodeRow) 216 217 return rows 205 218 206 219 @property … … 210 223 211 224 if self._delayCodeData is not None: 212 codeExtractor = self._delayCodeData[0] 213 for checkButton in self._checkButtons: 214 if checkButton.get_active(): 215 codes.append(codeExtractor(checkButton.delayCodeRow)) 225 codeExtractor = self._delayCodeData[0][1] 226 for row in self._delayCodeRows: 227 codes.append(codeExtractor(row)) 216 228 217 229 return codes … … 337 349 def _delayCodesChanged(self, button): 338 350 """Called when one of the delay codes have changed.""" 339 numDelayCodes = len(self.delayCodes) 351 delayCodeRows = self._delayCodeRows 352 numDelayCodes = len(delayCodeRows) 340 353 if numDelayCodes>=4: 341 354 for checkButton in self._checkButtons: … … 346 359 checkButton.set_sensitive(True) 347 360 361 codeExtractor = self._delayCodeData[0][0] 362 isExplanationRequired = self._delayCodeData[0][2] 363 codesToExplain = [] 364 for row in delayCodeRows: 365 if isExplanationRequired(row): 366 code = codeExtractor(row) 367 codesToExplain.append(code) 368 if code not in self._codesToExplain: 369 self._info.addFault("dc_" + code, 370 xstr("info_delay_explain") % (code,)) 371 372 for code in self._codesToExplain: 373 if code not in codesToExplain: 374 self._info.clearFault("dc_" + code) 375 self._codesToExplain = codesToExplain 376 348 377 self._info.delayCodesChanged() 349 378
Note:
See TracChangeset
for help on using the changeset viewer.