Changeset 840:62cef31d250a for src/mlx


Ignore:
Timestamp:
04/17/17 07:08:10 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

It is possible to activate a delay code programmatically.

Location:
src/mlx/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/delaycodes.py

    r834 r840  
    380380        self.show_all()
    381381
     382    def activateCode(self, code):
     383        """Check the checkbox for the given code."""
     384        index = 0
     385        for (type, data) in self._delayCodeData[2]:
     386            if type==DELAYCODE:
     387                if code==data[0].strip():
     388                    self._checkButtons[index].set_active(True)
     389                    break
     390                index += 1
     391
    382392    def _delayCodesChanged(self, button):
    383393        """Called when one of the delay codes have changed."""
  • src/mlx/gui/info.py

    r834 r840  
    168168        self._delayCodeTable.reset()
    169169
     170    def activateDelayCode(self, code):
     171        """Active the checkbox corresponding to the given code."""
     172        self._delayCodeTable.activateCode(code)
     173
    170174    def delayCodesChanged(self):
    171175        """Callewd when the delay codes have changed."""
Note: See TracChangeset for help on using the changeset viewer.