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

A fault explanation text can be set programmatically.

File:
1 edited

Legend:

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

    r834 r841  
    9393        return buffer.get_text(buffer.get_start_iter(),
    9494                               buffer.get_end_iter(), True)
     95
     96    @explanation.setter
     97    def explanation(self, explanation):
     98        """Set the explanation."""
     99        self._explanation.get_buffer().set_text(explanation)
    95100
    96101    @property
     
    235240                          numExplanations = self._numExplanations -
    236241                          (1 if hasExplanation else 0))
     242
     243    def setExplanation(self, id, explanation):
     244        """Set the explanation for the fault with the given ID"""
     245        self._faultWidgets[id][1].explanation = explanation
    237246
    238247    def reset(self):
Note: See TracChangeset for help on using the changeset viewer.