Changeset 1055:e55d18232dcf


Ignore:
Timestamp:
06/15/22 18:01:49 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

All booked flights are displayed, but those that are too much in the future cannot be started

File:
1 edited

Legend:

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

    r1046 r1055  
    12191219        sensitive = len(self._flightList.selectedIndexes)==1 and \
    12201220          not self._pendingFlightsWindowShown
     1221        if sensitive:
     1222            flight = self._getSelectedFlight()
     1223            flightDate = datetime.datetime.strptime(flight.date, "%Y-%m-%d").date()
     1224            tomorrow = datetime.date.today() + datetime.timedelta(days=1)
     1225            print(flightDate, tomorrow)
     1226            sensitive = flightDate <= tomorrow
    12211227        self._button.set_sensitive(sensitive)
    12221228
Note: See TracChangeset for help on using the changeset viewer.