Changeset 220:96ad81e11b85
- Timestamp:
- 06/04/12 09:53:04 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/const.py
r197 r220 203 203 #------------------------------------------------------------------------------- 204 204 205 flightTypes = [ FLIGHTTYPE_SCHEDULED, 206 FLIGHTTYPE_OLDTIMER, 207 FLIGHTTYPE_VIP, 208 FLIGHTTYPE_CHARTER ] 209 210 #------------------------------------------------------------------------------- 211 212 _flightTypeStrings = { FLIGHTTYPE_SCHEDULED : "scheduled", 213 FLIGHTTYPE_OLDTIMER : "ot", 214 FLIGHTTYPE_VIP : "vip", 215 FLIGHTTYPE_CHARTER : "charter" } 216 217 def flightType2string(flightType): 218 """Get the string equivalent of the given flight type.""" 219 print _flightTypeStrings 220 return _flightTypeStrings[flightType] \ 221 if flightType in _flightTypeStrings else None 222 223 #------------------------------------------------------------------------------- 224 205 225 # Delay code: loading problems 206 226 DELAYCODE_LOADING = 0 -
src/mlx/gui/common.py
r191 r220 53 53 54 54 SELECTION_MULTIPLE = gtk.SELECTION_MULTIPLE 55 56 SHADOW_IN = gtk.SHADOW_IN 57 58 POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC 55 59 56 60 def text2unicode(text): … … 97 101 SELECTION_MULTIPLE = gtk.SelectionMode.MULTIPLE 98 102 103 SHADOW_IN = gtk.ShadowType.IN 104 105 POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC 106 99 107 import codecs 100 108 _utf8Decoder = codecs.getdecoder("utf-8") -
src/mlx/gui/gui.py
r215 r220 12 12 from mlx.gui.prefs import Preferences 13 13 from mlx.gui.checklist import ChecklistEditor 14 from mlx.gui.pirep import PIREPViewer 14 15 15 16 import mlx.const as const … … 144 145 self._monitorWindowY = None 145 146 self._selfToggling = False 147 148 self._pirepViewer = PIREPViewer(self) 146 149 147 150 window.show_all() … … 1006 1009 if result==RESPONSETYPE_OK: 1007 1010 self.sendPIREP(pirep) 1011 elif result==1: 1012 self._pirepViewer.setPIREP(pirep) 1013 self._pirepViewer.show_all() 1014 self._pirepViewer.run() 1015 self._pirepViewer.hide() 1008 1016 1009 1017 def _getLoadPirepDialog(self): … … 1138 1146 1139 1147 dialog.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT) 1148 dialog.add_button(xstr("viewPIREP"), 1) 1140 1149 dialog.add_button(xstr("sendPIREP"), RESPONSETYPE_OK) 1141 1150 -
src/mlx/i18n.py
r217 r220 873 873 "you may try again later. Or it can be a bug;\n" \ 874 874 "see the debug log for more information.") 875 876 self.add("viewPIREP", "_View PIREP...") 877 878 self.add("pirepView_title", "PIREP viewer") 879 880 self.add("pirepView_frame_flight", "Flight") 881 self.add("pirepView_callsign", "Callsign:") 882 self.add("pirepView_tailNumber", "Tail no.:") 883 self.add("pirepView_aircraftType", "Aircraft:") 884 self.add("pirepView_departure", "Departure airport:") 885 self.add("pirepView_departure_time", "time:") 886 self.add("pirepView_arrival", "Arrival airport:") 887 self.add("pirepView_arrival_time", "time:") 888 self.add("pirepView_numPassengers", "PAX:") 889 self.add("pirepView_numCrew", "Crew:") 890 self.add("pirepView_bagWeight", "Baggage:") 891 self.add("pirepView_cargoWeight", "Cargo:") 892 self.add("pirepView_mailWeight", "Mail:") 893 self.add("pirepView_route", "MAVA route:") 894 895 self.add("pirepView_frame_route", "Route filed") 896 self.add("pirepView_filedCruiseLevel", "Cruise level:") 897 self.add("pirepView_modifiedCruiseLevel", "modified to:") 898 899 self.add("pirepView_frame_departure", "Departure") 900 self.add("pirepView_runway", "Runway:") 901 self.add("pirepView_sid", "SID:") 902 903 self.add("pirepView_frame_arrival", "Arrival") 904 self.add("pirepView_star", "STAR:") 905 self.add("pirepView_transition", "Transition:") 906 self.add("pirepView_approachType", "Approach:") 907 908 self.add("pirepView_frame_statistics", "Statistics") 909 self.add("pirepView_blockTimeStart", "Block time start:") 910 self.add("pirepView_blockTimeEnd", "end:") 911 self.add("pirepView_flightTimeStart", "Flight time start:") 912 self.add("pirepView_flightTimeEnd", "end:") 913 self.add("pirepView_flownDistance", "Flown distance:") 914 self.add("pirepView_fuelUsed", "Fuel used:") 915 self.add("pirepView_rating", "Rating:") 916 917 self.add("pirepView_frame_miscellaneous", "Miscellaneous") 918 self.add("pirepView_flightType", "Type:") 919 self.add("pirepView_online", "Online:") 920 self.add("pirepView_yes", "yes") 921 self.add("pirepView_no", "no") 922 self.add("pirepView_delayCodes", "Delay codes:") 875 923 876 924 #------------------------------------------------------------------------------ -
src/mlx/pirep.py
r151 r220 10 10 class PIREP(object): 11 11 """A pilot's report of a flight.""" 12 _delayCodeNames = { const.DELAYCODE_LOADING : "Loading Problems",13 14 15 16 17 18 19 20 21 12 delayCodeNames = { const.DELAYCODE_LOADING : "Loading Problems", 13 const.DELAYCODE_NETWORK : "Net Problems", 14 const.DELAYCODE_SYSTEM : "System Crash/Freezing", 15 const.DELAYCODE_TRAFFIC : "Traffic Problems", 16 const.DELAYCODE_WEATHER : "Weather Problems", 17 const.DELAYCODE_VATSIM : "VATSIM Problem", 18 const.DELAYCODE_CONTROLLER : "Controller's Fault", 19 const.DELAYCODE_NAVIGATION : "Navigation Problem", 20 const.DELAYCODE_APRON : "Apron Navigation Problems", 21 const.DELAYCODE_PERSONAL : "Personal Reasons" } 22 22 23 23 @staticmethod … … 117 117 for code in self.delayCodes: 118 118 if s: s += ", " 119 s += PIREP. _delayCodeNames[code]119 s += PIREP.delayCodeNames[code] 120 120 return s 121 121
Note:
See TracChangeset
for help on using the changeset viewer.