Changeset 818:e58b0fa0408a


Ignore:
Timestamp:
09/25/16 06:34:33 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The default column descriptors are moved to the FlightList (re #307).

Location:
src/mlx/gui
Files:
2 edited

Legend:

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

    r811 r818  
    437437class FlightSelectionPage(Page):
    438438    """The page to select the flight."""
    439     columnDescriptors = [
    440         ColumnDescriptor("callsign", xstr("flightsel_no")),
    441         ColumnDescriptor("departureTime", xstr("flightsel_deptime")),
    442         ColumnDescriptor("departureICAO", xstr("flightsel_from")),
    443         ColumnDescriptor("arrivalICAO", xstr("flightsel_to"))
    444     ]
    445 
    446439    def __init__(self, wizard):
    447440        """Construct the flight selection page."""
     
    452445                                                  help, completedHelp = completedHelp)
    453446
    454         self._flightList = FlightList(FlightSelectionPage.columnDescriptors,
    455                                       popupMenuProducer =
     447        self._flightList = FlightList(popupMenuProducer =
    456448                                      self._createListPopupMenu,
    457449                                      widthRequest = 400)
  • src/mlx/gui/flightlist.py

    r817 r818  
    5959    This is a complete widget with a scroll window. It is alignment centered
    6060    horizontally and expandable vertically."""
    61     def __init__(self, columnDescriptors, popupMenuProducer = None,
    62                  widthRequest = None):
     61
     62    defaultColumnDescriptors = [
     63        ColumnDescriptor("callsign", xstr("flightsel_no")),
     64        ColumnDescriptor("departureTime", xstr("flightsel_deptime"),
     65                         sortable = True),
     66        ColumnDescriptor("departureICAO", xstr("flightsel_from"),
     67                         sortable = True),
     68        ColumnDescriptor("arrivalICAO", xstr("flightsel_to"), sortable = True)
     69    ]
     70
     71    def __init__(self, columnDescriptors = defaultColumnDescriptors,
     72                 popupMenuProducer = None, widthRequest = None):
    6373        """Construct the flight list with the given column descriptors."""
    6474
Note: See TracChangeset for help on using the changeset viewer.