Changeset 836:df442f51e8de for src
- Timestamp:
- 04/17/17 07:01:42 (8 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r834 r836 519 519 520 520 #------------------------------------------------------------------------------ 521 522 def createFlightTypeComboBox(): 523 flightTypeModel = gtk.ListStore(str, int) 524 for type in _const.flightTypes: 525 name = "flighttype_" + _const.flightType2string(type) 526 flightTypeModel.append([xstr(name), type]) 527 528 flightType = gtk.ComboBox(model = flightTypeModel) 529 renderer = gtk.CellRendererText() 530 flightType.pack_start(renderer, True) 531 flightType.add_attribute(renderer, "text", 0) 532 533 return flightType 534 535 #------------------------------------------------------------------------------ -
src/mlx/gui/flight.py
r834 r836 4521 4521 class FinishPage(Page): 4522 4522 """Flight finish page.""" 4523 _flightTypes = [ ("flighttype_scheduled", const.FLIGHTTYPE_SCHEDULED),4524 ("flighttype_ot", const.FLIGHTTYPE_OLDTIMER),4525 ("flighttype_vip", const.FLIGHTTYPE_VIP),4526 ("flighttype_charter", const.FLIGHTTYPE_CHARTER) ]4527 4528 4523 def __init__(self, wizard, saveHelper): 4529 4524 """Construct the finish page.""" … … 4658 4653 table.attach(labelAlignment, 0, 1, row, row+1) 4659 4654 4660 flightTypeModel = gtk.ListStore(str, int) 4661 for (name, type) in FinishPage._flightTypes: 4662 flightTypeModel.append([xstr(name), type]) 4663 4664 self._flightType = gtk.ComboBox(model = flightTypeModel) 4665 renderer = gtk.CellRendererText() 4666 self._flightType.pack_start(renderer, True) 4667 self._flightType.add_attribute(renderer, "text", 0) 4655 self._flightType = createFlightTypeComboBox() 4668 4656 self._flightType.set_tooltip_text(xstr("finish_type_tooltip")) 4669 4657 self._flightType.set_active(0)
Note:
See TracChangeset
for help on using the changeset viewer.