Changeset 578:90209bf35f29 for src


Ignore:
Timestamp:
12/14/14 08:01:53 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The pilot ID is converted to upper-case when entering it (re #234)

File:
1 edited

Legend:

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

    r570 r578  
    287287
    288288        self._pilotID = gtk.Entry()
    289         self._pilotID.connect("changed", self._setControls)
     289        self._pilotID.connect("changed", self._pilotIDChanged)
    290290        self._pilotID.set_tooltip_text(xstr("login_pilotID_tooltip"))
    291291        table.attach(self._pilotID, 1, 2, 0, 1)
     
    344344        self._rememberButton.set_active(config.rememberPassword)
    345345        self._setControls(None)
     346
     347    def _pilotIDChanged(self, entry):
     348        """Called when the pilot ID has changed.
     349
     350        It sets the text to upper-case and calls _setControls to update other
     351        stuff."""
     352        entry.set_text(entry.get_text().upper())
     353        self._setControls(entry)
    346354
    347355    def _setControls(self, entry = None):
Note: See TracChangeset for help on using the changeset viewer.