Index: .hgignore
===================================================================
--- .hgignore	(revision 276)
+++ .hgignore	(revision 442)
@@ -6,2 +6,5 @@
 mlx-common.nsh
 locale/.+/LC_MESSAGES
+locale/.+/mlx_delay.po
+src/mlx/gui/dcdata.py
+xplra.py
Index: .hgtags
===================================================================
--- .hgtags	(revision 465)
+++ .hgtags	(revision 458)
@@ -7,3 +7,5 @@
 13937d44e004a8751426c14f6173ff3240822f62 version_0.13
 cc775599652d39ab574dac90fe8730ef52842744 version_0.14
-2e0ef8c7ca9a3bec34f71ac1f98be3939ced9387 version_0.15.1
+e11be493e87d09619387e352c389208cca54097d version_0.15
+89c9d5d516eb0da04f2cd10db58332f054249bb1 version_0.16
+998ecee73a374558f87b42cd851d76b375870185 version_0.17
Index: MLXMANIFEST
===================================================================
--- MLXMANIFEST	(revision 418)
+++ MLXMANIFEST	(revision 457)
@@ -7,11 +7,11 @@
 library/fnmatch.pyc	3414	4d50000f78e903598af06ef1c5cfb3ef
 library/libexpat-1.dll	143096	701659d3689bf4a8265b669b7d774255
-library/gtk/_gtk.pyc	549	6233f4030116a4767b50edc0fdb67866
+library/gtk/_gtk.pyc	549	47d70d42eae21e74c6032ae84cb15340
 library/encodings/cp858.pyc	7591	02054a0b8e91b9758826eb70cddf096f
-library/mlx/pirep.pyc	5235	fc4a7861ab475fe7e629ada4f84de089
+library/mlx/pirep.pyc	4623	68189237ada6e14afd692f29194675a9
 library/encodings/cp1254.pyc	2678	17ff2ac86f90886d5c73ed789f0499f3
 library/encodings/unicode_internal.pyc	2022	1e902113491e0c334b44deb0c8940e01
 library/libpango-1.0-0.dll	333729	5a14efd93ee27cfe960220fe4a904911
-library/mlx/gui/gui.pyc	48512	c75d1f34de964078769de9b4ee5a0c3e
+library/mlx/gui/gui.pyc	48520	2819da9092529a1f823300394d3f0b7c
 library/encodings/cp737.pyc	8102	40e61988748e4ca1742a2bad43949f4e
 library/stat.pyc	2503	d3b6dc7a54e705219f04d0be75a212de
@@ -22,5 +22,5 @@
 library/encodings/cp932.pyc	1638	e060301989634a7fb30ded375011cb09
 library/share/locale/hu/LC_MESSAGES/gtk20.mo	58794	6ee4491ae7bc9d3dfb778578eb29a0b3
-library/gobject/_gobject.pyc	573	17a945fa9ae6b80db017ec58ebf10947
+library/gobject/_gobject.pyc	573	13c47e2c9b1ff22c82fa1138f94bb578
 library/encodings/utf_7.pyc	1747	2beeb059236527197d6c640396476ce8
 doc/manual/hu/pirepViewer.png	25089	47fd4cbd140cedcd5f972b16ef484ba0
@@ -40,5 +40,5 @@
 library/pangocairo.pyd	17920	5fc69a7d29a6d3127710c64de440daa4
 doc/manual/en/fuel.png	23882	896aa65c7a8d4fcd7710b386b96bb97c
-library/mlx/gui/info.pyc	6082	fa61b9e5bd1dec5998a46ce9a07076e6
+library/mlx/gui/info.pyc	4951	cdb36f50aa93e2c35884a07b4d8b0ab7
 library/xml/sax/xmlreader.pyc	17862	0362ded7016d21cdd85aea1170ebdda1
 doc/manual/hu/fuel.png	27014	6a7764815c991f99961b39080bf9af03
@@ -60,5 +60,5 @@
 library/encodings/utf_8.pyc	1806	4b8dee0284ea2f55c4142fcde7463524
 library/unicodedata.pyd	688128	c856c31a03dc892e4f2aee93d0bfee44
-locale/hu/LC_MESSAGES/mlx.mo	44774	b7f65dc824054b25c08aa100b02d599c
+locale/hu/LC_MESSAGES/mlx.mo	64529	cc181a87f3328bf8a736ef008a341972
 library/encodings/mac_roman.pyc	2716	4b4745eccfcb77860b70b374ac07fbcc
 library/copy_reg.pyc	4893	7a58bc441232056d1c123cd3375b3774
@@ -73,9 +73,9 @@
 library/_hashlib.pyd	287232	a1a18de0644f481749fcbcf26005eeaf
 doc/manual/en/monitorWindow.png	16582	e07cbd4f5b360e1e8e80bc8409ad242b
-library/_hashlib.pyc	549	ed1f009b3ccd9a93d8fa4258f9373796
+library/_hashlib.pyc	549	85f44addf6e86ff56c1043c21217c41d
 library/libpng14-14.dll	230529	f3a15497e25baaa721f96638d7a4d2f8
 library/copy.pyc	11674	30d1745c5e38ab170f8a0486fbebf305
 library/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo	21895	a932ead453f04de30e348c1689a4d896
-library/unittest/result.pyc	7444	aefbb3cc79c0ff17787ce84faed7f5e8
+library/mlx/gui/dcdata.pyc	16051	4892c87e6998bb6151739e7994ebe5bf
 library/mlx/gui/__init__.pyc	107	3494fc6a671a7b8a9dc72ea93948ae52
 library/encodings/iso8859_5.pyc	2679	58a290e94b0266ef8ff4ee52da00e257
@@ -84,8 +84,8 @@
 library/select.pyd	11776	d90bf525f9f6c9c3aa6532fa6e569b4f
 library/base64.pyc	10528	39abec9c60dc011d3c763f443f9b1a11
-locale/en/LC_MESSAGES/mlx.mo	41375	3145880f78f59668a68f46eee10b6bc1
+locale/en/LC_MESSAGES/mlx.mo	60039	ba50bf8059d1a393961d122430b40e76
 library/traceback.pyc	11223	50ace5c2c6c040a923082442da94cd78
 library/_weakrefset.pyc	9290	a56e87c491c0511cd329a3c8c4cd9563
-library/mlx/flight.pyc	17303	30d491cdcb9acb318d4c952ca777808a
+library/mlx/flight.pyc	17303	b9942b2863ce54ed3704e9883bf54541
 library/urllib2.pyc	43566	7eb57ea0dcd1086d1d9073a5cefb0903
 doc/manual/en/flightSelection.png	25456	84e5574bc58ff156da71470550d540d8
@@ -114,5 +114,5 @@
 library/encodings/mac_latin2.pyc	4717	564dbaf5c296a147203eb821dc2466ba
 library/encodings/utf_16_be.pyc	1854	84a1d1465453727af051eaeeb853782f
-library/mlx/fsuipc.pyc	70737	8d01b21710cf9438bbb0b20839dfc945
+library/mlx/fsuipc.pyc	72133	bb9dc9c43ea8ebf511f4069062577720
 library/xml/sax/__init__.pyc	3579	c78222ad1fd4f3dbdea06666fe74e84e
 doc/manual/en/connect.png	24272	01e31d899c4ede823423f705c6886f30
@@ -126,5 +126,5 @@
 library/libgdk-win32-2.0-0.dll	931390	a2b46daac3d4140efdf86429f7aea476
 library/win32file.pyd	111616	25ecaa0a381c6fd9ba4080bea63b952e
-library/mlx/gui/common.pyc	9996	53858ed2537f28fd26c1d95fa3ada991
+library/mlx/gui/common.pyc	10275	4466f2d9547b91107ea7de9b69bcc71e
 library/dummy_threading.pyc	1265	5ab5c897721aeb346b5bccb84066c5bd
 doc/manual/hu/index.html	47588	fd83bee17f50bf3fd488d86f65563f7d
@@ -132,6 +132,6 @@
 sounds/767taxi.mp3	160496	4cb43cda6e1214fbe15328a716827345
 doc/manual/en/prefsAdvanced.png	13720	d43a6df9991d331ce8fdc9fedae514c3
-library/cairo/_cairo.pyc	561	2d69c9c670ed352716d4fb97180ab533
-library/win32file.pyc	552	02091144183ac705afe0a744872dcf7c
+library/cairo/_cairo.pyc	561	cc9cb8a4064a24cef04a8a129edc4004
+library/win32file.pyc	552	e2a792eee61fb72563f73da86c462435
 library/encodings/cp865.pyc	7868	7d40a7ba053ac23339218be8799e5397
 library/lib/gtk-2.0/2.10.0/engines/libwimp.dll	97984	a5bbbe46e1363aba9020a76f2d58e9d6
@@ -142,5 +142,5 @@
 library/share/locale/hu/LC_MESSAGES/gtk20-properties.mo	167125	cd1b1b3693c1e3c74bfcea20be640cc6
 conn_red.png	914	860388cb7c3b26b2f348fdbee40780ce
-library/bz2.pyc	534	6fc99d980120fd663ffb0818a34828b1
+library/bz2.pyc	534	e59fe6bdb36241510519275012597648
 library/xml/sax/expatreader.pyc	13563	4f64c0efb2f1f8dbba84cdb5c6036f2d
 library/email/utils.pyc	8840	a7be428df6fddee6121cfce55382d1f8
@@ -158,6 +158,6 @@
 library/mlx/gui/statusbar.pyc	4812	49946660d92b7b634740537450b63723
 library/warnings.pyc	12666	9788b5f45765e8204e04c820f2711094
-mlxupdate.exe	19456	c887d69e3c2741503e23e244f0a689c4
-library/mlx/const.pyc	6956	f4684465c27724b62f5a67c14fec672f
+mlxupdate.exe	19456	31467783c1b3ebe2b17a07b760f5ac6a
+library/mlx/const.pyc	6707	e11d9ff3e6aa26a56f1828be2f19fc3d
 library/email/errors.pyc	3229	cdb78ab237e195ad69f059128bc03b1d
 library/linecache.pyc	3091	666e6f81b0ea9a7637f8068493f738d5
@@ -172,5 +172,5 @@
 library/shlex.pyc	7282	cbe1a4823894c97c87d01f9d9faf5b8f
 library/cairo/__init__.pyc	142	010dd7cc8485565d5782d60e92e4ba34
-library/_ssl.pyc	537	e26888c5773f237986294f0be8c60a62
+library/_ssl.pyc	537	1cb0db32b06e3ca9372bd132e4c241a5
 library/encodings/iso8859_8.pyc	2717	f3ad6ce58cfac9e3ca86cf5c2fef092b
 library/encodings/iso2022_jp_1.pyc	1699	faed9d5747e982cec9fa8b3ad8e1de26
@@ -192,5 +192,5 @@
 library/encodings/cp1252.pyc	2676	b4c43cc72650c911cf3654dbaf565df9
 library/share/locale/hu/LC_MESSAGES/atk10.mo	8465	e3f3466da367215aad971d7b0394229d
-library/unicodedata.pyc	558	6297d24ae9647ab3fcdf09ca61b75c3c
+library/unicodedata.pyc	558	6fcecb75e0a3d45438f3c8b43b235948
 library/encodings/uu_codec.pyc	4646	5282a5fcb676851224d2924aa3e48a9e
 library/ConfigParser.pyc	23857	1d17020dd0000ce0f73de812effa152f
@@ -223,5 +223,5 @@
 doc/manual/hu/flightInfoTab.png	22378	5f3e77393d8693fec723590daeedb50a
 library/encodings/utf_8_sig.pyc	4625	1b1405db186e5819fa271ff96c1ca2c5
-library/pangocairo.pyc	555	3b0030fc6f2497e51ca60c00750d8684
+library/pangocairo.pyc	555	3286993c7cd527b1e0d5df1c72e64969
 library/encodings/cp1255.pyc	2697	b265913c887f2e1c8736632b652c0093
 library/encodings/zlib_codec.pyc	4308	319c9073aff840436a03cc1fa0b08fb5
@@ -230,5 +230,5 @@
 doc/manual/hu/connect.png	27238	50477d157c924984c224806455e8f87d
 library/encodings/palmos.pyc	2876	9284ad53dcfd82dfae0a79923b1cf91d
-library/mlx/web.pyc	28982	9db31983a125d6fbb9cccd699f450889
+library/mlx/web.pyc	29032	6dd23f897276b82ef46a40398e45ca96
 library/mlx/gui/gates.pyc	5384	e85898dc153d9e624ff663afc0575e7d
 library/email/feedparser.pyc	10682	4de6a63da8dc270c9881edb9c2f28508
@@ -236,5 +236,5 @@
 library/intl.dll	152489	eb2d4c4d4a527bc88a69a16cc99afcf5
 library/encodings/mbcs.pyc	1883	2213911a7dd0deada6799b63e18b695b
-library/pyuipc.pyc	543	17740e034cdc12d87175e6f44f8d8c0c
+library/pyuipc.pyc	543	36d2d5c3740dfe8e21fc3caa60d638af
 sounds/TOC.mp3	273032	fae1be2ad25c8b54806bd1d759919705
 library/encodings/iso8859_4.pyc	2678	16f2fe7994051752360c533c052b892b
@@ -260,10 +260,10 @@
 doc/manual/hu/flightSelection.png	27734	560275c030f373691ca59e99c4ba686e
 library/win32pipe.pyd	24064	de374eded459293b2a7eb8ed8fb38eaa
-library/win32pipe.pyc	552	eb124a4ee4010ec897a5d2ea2e19072d
+library/win32pipe.pyc	552	a0d6186cd638718fb49119799e6e9de9
 doc/manual/hu/logTab.png	29189	d3cbae223d547919d9954fc535856298
 library/encodings/iso2022_jp_2004.pyc	1723	66376e788f3819e781897268c1100986
-library/win32event.pyc	555	d8c0a9982b63b46d494318127fb020dd
+library/win32event.pyc	555	85b44a4f42738a522ff0097d47e4e90e
 library/encodings/cp866.pyc	8103	f36418dcf93b17b3ced63bd544f44159
-library/gio/_gio.pyc	549	9e7f2b095af02def0c64e781aac9ebc6
+library/gio/_gio.pyc	549	4e648e0b01c80d857604e50e631c74b3
 library/encodings/cp437.pyc	7874	63f1278c0a66129c6fb4f504d6b61b66
 doc/manual/hu/helpTab.png	25326	f83cf32e49d6de786df20885232aa1ee
@@ -285,7 +285,7 @@
 library/email/message.pyc	27764	493826f529d17f5a21080a4c98b49369
 library/encodings/mac_romanian.pyc	2756	a3b2a0892236bc80c8efe8940e33339e
-library/mlx/gui/pirep.pyc	16780	06c8ceef8809771f5b870ca161d2a0e1
+library/mlx/gui/pirep.pyc	16749	328578f8f3b6ecdb5a4fc66a69654b43
 library/mimetypes.pyc	17806	927ce6a7079707aaee925e855ed23454
-library/_ctypes.pyc	546	3537b8548171d9214a47aae373358d13
+library/_ctypes.pyc	546	b4e549553cf3be3d4f7b48f2340c8729
 sounds/F70taxi.mp3	154854	51332dc691d3519355f61ed06c959d8d
 library/encodings/cp857.pyc	7611	1b46c8959ac097b73e1c680d464cdc32
@@ -305,5 +305,5 @@
 library/repr.pyc	5045	82f0d89c685c3dacd941e01e4b2f31ef
 library/quopri.pyc	6352	87c42d94f753dd4c8a761cfa79453bb8
-library/mlx/gui/monitor.pyc	12015	d770e12a62ca8d880144b8b45c3a2576
+library/mlx/gui/monitor.pyc	12015	6d558b1484c61348b34e48a353c8fc09
 library/encodings/latin_1.pyc	2111	52427573ccbfd06220b67d5a9dd1376e
 library/mlx/update.pyc	16952	8fa20ca0ddd4ce5f06f70fba9bea6e83
@@ -314,8 +314,8 @@
 doc/manual/en/gatesTab.png	25611	6de724fef235fcdb11a5c960f9f40502
 library/bdb.pyc	17708	9a8fdcaa65f595c842689247847879d9
-library/mlx/gui/flight.pyc	111758	d700fbd8afa04e59546d7e9cd374b10e
+library/mlx/gui/flight.pyc	111770	3632efc6ec9e67adebd76460bb18f556
 library/unittest/case.pyc	37758	1d2235e74c246b562c5c00ddf73c621a
 library/subprocess.pyc	38648	c9f749db06dfc9fb32079de51d6efd01
-library/mlx/acft.pyc	36286	14bca971b2e3aba95a2dcfca1e8317f7
+library/mlx/acft.pyc	37473	3e6648f88ebabd4e2b695d2e49f4e79d
 library/gobject._gobject.pyd	113152	3d05dd191361f83aa247b62c700fa04e
 doc/manual/hu/checklistEditor.png	27863	8c750892a52dc10ca654a9d0b2765358
@@ -330,5 +330,5 @@
 library/encodings/cp863.pyc	7868	fc7ff06dab536b93c68fcb8e7bac713f
 library/xml/parsers/__init__.pyc	294	83f6a77ed8cd962b3c75c4779dc557ac
-library/pyexpat.pyc	546	ccf3d0df566cb35274165187cc26b2fe
+library/pyexpat.pyc	546	0f30688f8dac3814a6eac9ca7910e527
 doc/manual/hu/gateSelection.png	26472	aa5a7d5602ec8544d1aed25b731a2460
 logo.png	69816	4a7517b22cfd75cc9c15e3fc1b7ebeec
@@ -355,15 +355,15 @@
 library/_socket.pyd	38400	5d273be76603399e88cf57f2605004bf
 sounds/ding.wav	80856	18e639792d3767436ac6955eb60e4f54
-library/_socket.pyc	546	0f631e04e95639805597d54f1753d7e0
+library/_socket.pyc	546	835167109a0196c168b7dd10e7562ab2
 library/encodings/hex_codec.pyc	3520	a8b8d5b7c8810379c7007bcbc253951c
-library/mlx/checks.pyc	58147	34a5bf3f11b975072500165bb3599f8f
+library/mlx/checks.pyc	58257	dbf35ff3f3e94e5479c32f39d8a919f0
 doc/manual/en/statusIcon2.png	5875	71fc121823dee0a4c00715fac1b5665c
-library/mlx/sound.pyc	6326	be3f6aa26c6b3fa2e358ad6882010a4d
+library/mlx/sound.pyc	6326	33443e15039f5714339f41b355d0e30f
 doc/manual/en/pirepViewer.png	22216	326127e30fa405919b337cc9920698ed
 library/encodings/aliases.pyc	8750	75c22196420d0157fec085d285947a71
-library/glib/_glib.pyc	555	50a45dfb7fc78fead808072687ba11d5
+library/glib/_glib.pyc	555	f86757facd85e32db6a4e3bb463f8019
 library/libpangowin32-1.0-0.dll	108945	d07f128828225b7cc38e9e590eb3ba8a
 library/encodings/iso8859_10.pyc	2693	5e6cc8f721486ddbc1c99da285e13191
-library/win32api.pyc	549	77d91a1efed3113697ab9b3dc3e12bea
+library/win32api.pyc	549	eb908638a60b5da82c9212c47b0f7781
 library/gobject/constants.pyc	1957	2e9cdc605e7c449ef4fc23f56128acec
 library/libgtk-win32-2.0-0.dll	4938115	cc6dca192aca6f91bd96a5b5f86e036d
@@ -394,5 +394,5 @@
 library/webbrowser.pyc	18138	c85009edebad6d278fe786fec10ebbbe
 library/sre_compile.pyc	10792	c58f94fbee661f3bb0c59ecc13c0416e
-library/mlx/pyuipc_sim.pyc	56186	bd00d6dfd1771a62579c8fb84bf5dcf0
+library/mlx/pyuipc_sim.pyc	56894	38f9c05d6ef797a6d345174b9d6b9ead
 library/encodings/iso8859_9.pyc	2678	88880e046738ebd2012c8034416a9adf
 library/encodings/cp875.pyc	2636	c72faa5d1cb6105ae81c971448fea479
@@ -407,10 +407,10 @@
 library/email/iterators.pyc	2266	b8a0df35815bc00be1ed8ece42aac537
 library/encodings/hz.pyc	1614	876bb7c36683358c3e95005619b10541
-library/select.pyc	543	4cc793adb82a4e1505ad2ee3f43b02ec
+library/select.pyc	543	ff1dfee167d49aabeafa74ee4659ceb8
 library/encodings/iso2022_jp.pyc	1683	40c2b92127f99452f84b250c2b4b2cda
 library/libgthread-2.0-0.dll	44287	7ad6f303082b382bff7bafbab246c61f
 library/glib._glib.pyd	58368	0de636503e43c4eb00e80927bc9bda97
 library/mlx/config.pyc	29918	3b72b0439191e799656171cc7dd7c019
-library/atk.pyc	534	b03849f4a1eac3e542e97a385e0d1657
+library/atk.pyc	534	4796262a8b1b52345a59ba0faa53e5cc
 library/gio._gio.pyd	263168	acb8c95fdc391079bebdf7d8685b0dbc
 library/encodings/cp861.pyc	7868	c97a8970ce4d9f40cbafbea6576fbdca
@@ -422,7 +422,8 @@
 library/__future__.pyc	4177	43d264d951ac2085334c7b9dd4558595
 library/logging/__init__.pyc	54813	7bcdf2e8da474f5e94d8e499f6fc3ed4
-runmlx.exe	64000	4ad32cb1aec39a193569f600adb7d977
+runmlx.exe	64000	10345b15a699aae07c3c15c2cdbe6bed
 library/optparse.pyc	51253	39594a40bc1222173d57b7d5740e3d92
-library/mlx/fs.pyc	11756	c8b8a4a1d355432ff2aaa9ac8cd445d7
+library/mlx/fs.pyc	11756	e00d02c76fac4a787e7a5702441ea864
+library/unittest/result.pyc	7444	aefbb3cc79c0ff17787ce84faed7f5e8
 library/inspect.pyc	38547	836f659fad54f5ee7e8f9d565003aacd
 library/pickle.pyc	36348	2b55640f6f4e2fd70d95482fd16bfb73
@@ -433,7 +434,8 @@
 library/glib/option.pyc	11891	bd90183c75d8f473ecf653e3d63a27f9
 library/StringIO.pyc	11100	f4eb4a2bb3d6fb0af925681c5375c673
-library/pango.pyc	540	a9ea88a574b996c739cce07e2b315b3e
+library/pango.pyc	540	bc12badc36d786fa32f867aaf7fc8036
 Microsoft.VC90.CRT/msvcp90.dll	568832	6de5c66e434a9c1729575763d891c6c2
 library/sre_parse.pyc	18380	fe2376a101668be1124f9ee316662bab
+library/mlx/gui/delaycodes.pyc	12327	1ef0c40dfd726f737eafc266975298a8
 library/encodings/raw_unicode_escape.pyc	2048	8138045029da04bf45204ab756d1bcd4
 sounds/TOD.mp3	174707	92176d53d948fbfebd08c011b063179a
Index: Makefile
===================================================================
--- Makefile	(revision 276)
+++ Makefile	(revision 439)
@@ -3,5 +3,8 @@
 all: $(foreach lang,$(LANGUAGES),locale/$(lang)/LC_MESSAGES/mlx.mo)
 
-locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po
+locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po locale/%/mlx_delay.po
 	mkdir -p `dirname $@`
-	msgfmt -o $@ $^
+	msgcat $^ | msgfmt -o $@ -
+
+locale/hu/mlx_delay.po locale/en/mlx_delay.po: dcdatagen.py
+	./dcdatagen.py
Index: dcdatagen.py
===================================================================
--- dcdatagen.py	(revision 443)
+++ dcdatagen.py	(revision 443)
@@ -0,0 +1,906 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# Script that generates the delay code data files from a common data base
+#
+# It generates the following files:
+# - src/mlx/gui/dcdata.py: a Python module that contains the data structures
+#   describing the delay code information for each aircraft type.
+# - locale/en/mlx_delay.po, local/hu/mlx_delay.po: PO files containing the
+#   delay code texts. Those texts are referred to from dcdata.py
+
+#----------------------------------------------------------------------------
+
+import os
+
+#----------------------------------------------------------------------------
+
+# The list of language codes. The strings should be arrays of at least this
+# length
+languageCodes = ["en", "hu"]
+
+#----------------------------------------------------------------------------
+
+# Row type: a caption
+CAPTION = 1
+
+# Row type: an actual delay code
+DELAYCODE = 2
+
+#----------------------------------------------------------------------------
+
+# Prefixes for the generated tables
+tablePrefixes = [ "modern", "ot" ]
+
+# Type groups
+typeGroups = [ ["B736", "B737", "B738", "B738C", "B733", "B734", "B735",
+                "DH8D", "B762", "B763", "CRJ2", "F70", "B462" ],
+               ["DC3", "T134", "T154", "YK40"] ]
+
+#----------------------------------------------------------------------------
+
+# The associated row or column is for the modern fleet
+FOR_MODERN = 1
+
+# The associated row or column is for the old-timer fleet
+FOR_OT = 2
+
+#----------------------------------------------------------------------------
+
+# The complete delay code table
+table = (("info_delay_",
+          "lambda row: row[0].strip()"),
+         [ ["MA", "MA"], ["IATA", "IATA"], ["Code", "Kód"],
+           ["Name", "Név"],["Description", "Leírás" ] ],
+         [ FOR_OT, FOR_MODERN | FOR_OT, FOR_MODERN,
+           FOR_OT | FOR_MODERN, FOR_OT | FOR_MODERN ],
+         [ (CAPTION, FOR_MODERN | FOR_OT,
+            ["Others", "Egyebek"] ),
+           (DELAYCODE, FOR_OT,
+            ["012      ", "01      ", None,
+             ["LATE PARTS OR MATERIALS", "KÉSEI ALKATRÉSZ VAGY ANYAG"],
+             ["Parts and/or materials shipped late from the warehouse",
+              "Kései alkatrész és/vagy anyagkiszállítás a raktárból"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "06    ", "OA     ",
+             ["NO GATES/STAND AVAILABLE", "NINCS SZABAD KAPU/ÁLLÓHELY"],
+             ["Due to own airline activity",
+              "Saját tevékenység miatt"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "09", "SG",
+             ["SCHEDULED GROUND TIME", "ÜTEMEZETT FORDULÓ IDŐ"],
+             ["Planned turnaround time less than declared minimum",
+              "A tervezett forduló idő rövidebb a minimálisnál"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Passenger and baggage",
+             "Utas és poggyászkezelés"] ),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["111", "11", "PD",
+             ["LATE CHECK-IN", "KÉSEI JEGYKEZELÉS"],
+             ["Check-in reopened for late passengers",
+              "Check-in járatzárás után"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["121", "12", "PL",
+             ["LATE CHECK-IN", "KÉSEI JEGYKEZELÉS"],
+             ["Check-in not completed by flight closure time",
+              "Torlódás az indulási csarnokban"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["132", "13", "PE",
+             ["CHECK-IN ERROR", "JEGYKEZELÉSI HIBA"],
+             ["Error with passenger or baggage details",
+              "Téves utas és poggyászfelvétel"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["142", "14", "PO",
+             ["OVERSALES", "TÚLKÖNYVELÉS"],
+             ["Booking errors – not resolved at check-in",
+              "Téves könyvelés, a jegykezelés során nem megoldott"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "15", "PH",
+             ["BOARDING", "BESZÁLLÍTÁS"],
+             ["Discrepancies and paging, missing checked in passengers",
+              "Beszállítási rendellenesség, hiányzó utasok"]]),
+           (DELAYCODE, FOR_OT,
+            ["151", "15", None,
+             ["BOARDING", "BESZÁLLÍTÁS"],
+             ["Boarding discrepancies due to the passenger's fault",
+              "Beszállítási rendellenesség utas hibájából"]]),
+           (DELAYCODE, FOR_OT,
+            ["152", "", None,
+             ["BOARDING", "BESZÁLLÍTÁS"],
+             ["Boarding discrepancies due to the tranzit's fault",
+              "Beszállítási rendellenesség tranzit hibájából"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["161", "16", "PS",
+             ["COMMERCIAL PUBLICITY/\nPASSENGER CONVENIENCE",
+              "NYILVÁNOS FOGADÁS/\nUTASKÉNYELMI SZEMPONTOK"],
+             ["Local decision to delay for VIP or press; \ndelay due to offload of passengers following family bereavement",
+              "Késleltetés helyi döntés alapján reptérzár,\nbetegség/halál, VIP, sajtó, TV miatt"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "17", "PC",
+             ["CATERING ORDER", "CATERING MEGRENDELÉS"],
+             ["Late or incorrect order given to supplier",
+              "Kései vagy téves megrendelés leadása a szállítónak"]]),
+           (DELAYCODE, FOR_OT,
+            ["171", "17", None,
+             ["CATERING ORDER", "CATERING MEGRENDELÉS"],
+             ["Late catering order in case of an additional group of people",
+              "Kései catering megrendelés, extra csoport jelentkezése esetén"]]),
+           (DELAYCODE, FOR_OT,
+            ["172", "", None,
+             ["CATERING ORDER", "CATERING MEGRENDELÉS"],
+             ["Late catering order due to negligence",
+              "Kései catering megrendelés gondatlanságból"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["182", "18", "PD",
+             ["BAGGAGE PROCESSING", "POGGYÁSZKEZELÉS"],
+             ["Late or incorrectly sorted baggage",
+              "Késő vagy tévesen szortírozott poggyász"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Cargo and mail",
+             "Áru és postakezelés"] ),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["212", "21", "CD",
+             ["DOCUMENTATION", "DOKUMENTÁCIÓ"],
+             ["Late or incorrect documentation for booked cargo",
+              "Hibás vagy kései áruokmányolás"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["221", "22", "CP",
+             ["LATE POSITIONING", "KÉSEI SZÁLLÍTÁS"],
+             ["Late delivery of booked cargo to airport/aircraft",
+              "Szállítmány kései érkezése a repülőtérre"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["232", "23", "CC",
+             ["LATE ACCEPTANCE", "KÉSEI ÁTVÉTEL"],
+             ["Acceptance of cargo after deadline",
+              "Kereskedelmi döntés, áru és posta járatzárás utáni elfogadása"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["242", "24", "CI",
+             ["INADEQUATE PACKING", "NEM MEGFELELŐ CSOMAGOLÁS"],
+             ["Repackaging and/or re-labelling of booked cargo",
+              "Az áru újracsomagolása és/vagy -címkézése"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["252", "25", "CO",
+             ["OVERSALES", "ÁRUTÚLKÖNYVELÉS"],
+             ["Booked load in excess of saleable load capacity\n"
+              "(weight or volume), resulting in reloading or off-load",
+              "A könyvelt terhelés meghaladja az eladható (tömeg\n"
+              "vagy térfogat) kapacitást."]]),
+
+           (CAPTION, FOR_MODERN,
+            ["Mail only",
+             "Postakezelés"] ),
+           (DELAYCODE, FOR_MODERN,
+            [None, "27", "CE",
+             ["DOCUMENTATION, PACKING", "DOKUMENTÁCIÓ, CSOMAGOLÁS"],
+             ["Incomplete and/or inaccurate documentation",
+              "Hiányos és/vagy pontatlan dokumentáció"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "28", "CL",
+             ["LATE POSITIONING", "KÉSEI SZÁLLÍTÁS"],
+             ["Late delivery of mail to airport / aircraft",
+              "Posta kései érkezése a repülőtérre"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, 29, "CA",
+             ["LATE ACCEPTANCE", "KÉSEI ÁTVÉTEL"],
+             ["Acceptance of mail after deadline",
+              "Posta járatázárás utáni átvétele"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Aircraft and Ramp Handling",
+             "Repülőgép-kiszolgálás"] ),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["312", "31", "GD",
+             ["LATE/INACCURATE\nAIRCRAFT DOCUMENTATION",
+              "KÉSEI/PONTATLAN\nFEDÉLZETI OKMÁNYOK"],
+             ["Late or inaccurate mass and balance documentation, \n"
+              "general declaration, passenger manifest",
+              "Fedélzeti okmányok elégtelensége, kései kiállítása"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "32", "GL",
+             ["LOADING/UNLOADING", "BE- ÉS KIRAKODÁS"],
+             ["Bulky items, special load, lack of loading staff",
+              "Különleges, súlyos vagy nagy terjedelmű áru,\n"
+              "rakodószemélyzet hiánya miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["322", "32", None,
+             ["LOADING/UNLOADING", "BE- ÉS KIRAKODÁS"],
+             ["Bulky items, special load",
+              "Különleges, súlyos vagy nagy terjedelmű áru miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["324", "", None,
+             ["LOADING/UNLOADING", "BE- ÉS KIRAKODÁS"],
+             ["Lack of loading staff",
+              "Rakodószemélyzet hiánya miatt"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["332", "33", "GE",
+             ["LOADING EQUIPMENT", "RAKODÓBERENDEZÉSEK"],
+             ["Lack of and/or breakdown; lack of operating staff",
+              "Hiányuk vagy üzemképtelenségük, működtető személyzet hiánya"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["342", "34", "GS",
+             ["SERVICING EQUIPMENT", "KISZOLGÁLÓ ESZKÖZÖK"],
+             ["Lack of and/or breakdown; lack of operating staff",
+              "Hiányuk vagy üzemképtelenségük, működtető személyzet hiánya"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["352", "34", "GC",
+             ["AIRCRAFT CLEANING", "REPÜLŐGÉP TAKARÍTÁS"],
+             ["Late completion of aircraft cleaning",
+              "Késedelme vagy elhúzódása"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["362", "36", "GF",
+             ["FUELLING/DEFUELLING", "ÜZEMANYAG TÖLTÉS/LESZÍVÁS"],
+             ["Late delivery of fuel; excludes late request",
+              "Üzemanyag kései szállítása, kivéva, ha az igénylés késett"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["372", "37", "GB",
+             ["CATERING", "CATERING"],
+             ["Late and/or incomplete delivery; late loading",
+              "Catering kései szállítása, berakása"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "38", "GU",
+             ["ULD", "KONTÉNER"],
+             ["Lack of and/or unserviceable ULD's or pallets",
+              "Üzemképes konténerek és raklapok hiánya"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            [None, "39", "GT",
+             ["TECHNICAL EQUIPMENT", "BERENDEZÉSEK"],
+             ["Lack and/or breakdown; lack of operating staff;\n"
+              "includes GPU, air start, pushback tug, de-icing",
+              "Hiánya és/vagy elromlása, működtető személyzet hiánya\n"
+              "ide tartozik a földi áramellátó, a hajtómű indító,\n"
+              "a repülőgép-vontató és a jégtelenítő"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Technical and Aircraft Equipment",
+             "Műszaki előkészítés"] ),
+           (DELAYCODE, FOR_MODERN,
+            [None, "41", "TD",
+             ["TECHNICAL DEFECTS", "REPÜLŐGÉP HIBÁK"],
+             ["Aircraft defects including items covered by MEL",
+              "Repülőgép hibák, idértve a MEL alá tartozó berendezéseket"]]),
+           (DELAYCODE, FOR_OT,
+            ["411", "41", None,
+             ["TECHNICAL DEFECTS", "REPÜLŐGÉP HIBÁK"],
+             ["Aircraft arrived with defects from abroad",
+              "Külföldről hibával érkezett repülőgép"]]),
+           (DELAYCODE, FOR_OT,
+            ["412", "41", None,
+             ["TECHNICAL DEFECTS", "REPÜLŐGÉP HIBÁK"],
+             ["Departing aircraft with defects",
+              "Hibásan kiállított induló repülőgép"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "42", "TM",
+             ["SCHEDULED MAINTENANCE", "TERVEZETT KARBANTARTÁS"],
+             ["Late release from maintenance",
+              "Karbantartás kései befejezése"]]),
+           (DELAYCODE, FOR_OT,
+            ["421", "42", None,
+             ["SCHEDULED MAINTENANCE", "TERVEZETT KARBANTARTÁS"],
+             ["Late release from maintenance due to lack of parts",
+              "Betervezett karbantartás kései befejezése alkatrészhiány miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["422", "", None,
+             ["SCHEDULED MAINTENANCE", "TERVEZETT KARBANTARTÁS"],
+             ["Late release from maintenance due to bad management\n"
+              "or other internal deficiencies",
+              "Betervezett karbantartás kései befejezése rossz\n"
+              "szervezés vagy egyéb belső hiányosság miatt"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "43", "TN",
+             ["NON-SCHEDULED\nMAINTENANCE", "RENDKÍVÜLI KARBANTARTÁS"],
+             ["Special checks and/or additional works\n"
+              "beyond normal maintenance schedule",
+              "A normál karbantartási ütemterven felül elvégzett\n"
+              "speciális ellenőrzések és/vagy egyéb munkák"]]),
+           (DELAYCODE, FOR_OT,
+            ["431", "43", None,
+             ["NON-SCHEDULED\nMAINTENANCE", "RENDKÍVÜLI KARBANTARTÁS"],
+             ["Special checks in an ad-hoc manner",
+              "Különleges ellenőrzések ad hoc jelleggel"]]),
+           (DELAYCODE, FOR_OT,
+            ["432", "", None,
+             ["NON-SCHEDULED\nMAINTENANCE", "RENDKÍVÜLI KARBANTARTÁS"],
+             ["Lack of earlier scheduled checks",
+              "Korábbi tervezett ellenőrzések elmaradása"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "44", "TS",
+             ["SPARES AND MAINTENANCE", "PÓTALKATRÉSZEK ÉS\nKARBANTARTÁS"],
+             ["Lack of spares, lack of and/or breakdown of\n"
+              "specialist equipment required for defect rectification\n",
+              "Pótalkatrészek hiánya, a meghibásodások kijavításához\n"
+              "szükséges felszerelés hiánya és/vagy üzemképtelensége"]]),
+           (DELAYCODE, FOR_OT,
+            ["441", "44", None,
+             ["SPARES AND MAINTENANCE", "PÓTALKATRÉSZEK ÉS\nKARBANTARTÁS"],
+             ["Lack of spares and equipment due to external factors",
+              "Repülőgép berendezések és alkatrészek hiánya külső okokból"]]),
+           (DELAYCODE, FOR_OT,
+            ["442", "", None,
+             ["SPARES AND MAINTENANCE", "PÓTALKATRÉSZEK ÉS\nKARBANTARTÁS"],
+             ["Lack of spares and equipment due to failing to order",
+              "Repülőgép berendezések és alkatrészek hiánya\n"
+              "megrendelés hiányából"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["451", "45", "TA",
+             ["AOG SPARES", "AOG PÓTALKATRÉSZEK"],
+             ["Awaiting AOG spare(s) to be carried to another station",
+              "Alkatrész szállítás más állomásokra, külföldi meghibásodás\n"
+              "(külföldön leragadt saját gép) esetén"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "46", "TC",
+             ["AIRCRAFT CHANGE", "REPÜLŐGÉPCSERE"],
+             ["For technical reasons, e.g. a prolonged technical delay",
+              "Műszaki okok, pl. elhúzódó javítás miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["461", "46", None,
+             ["AIRCRAFT CHANGE", "REPÜLŐGÉPCSERE"],
+             ["If the reason is: 411",
+              "Ha az ok: 411"]]),
+           (DELAYCODE, FOR_OT,
+            ["462", "", None,
+             ["AIRCRAFT CHANGE", "REPÜLŐGÉPCSERE"],
+             ["If the reason is: 412",
+              "Ha az ok: 412"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Damage to Aircraft",
+             "Repülőgép sérülése"] ),
+           (DELAYCODE, FOR_MODERN,
+            [None, "51", "DF",
+             ["DAMAGE DURING\nFLIGHT OPERATIONS", "REPÜLÉS KÖZBENI SÉRÜLÉS"],
+             ["Bird or lightning strike, turbulence, heavy or\n"
+              "overweight landing, collisions during taxiing",
+              "Madár, villámcsapás, légörvény, túl erős vagy\n"
+              "túlsúlyos leszállás, ütközés gurulás közben"]]),
+           (DELAYCODE, FOR_OT,
+            ["511", "51", None,
+             ["DAMAGE DURING\nFLIGHT OPERATIONS", "REPÜLÉS KÖZBENI SÉRÜLÉS"],
+             ["Bird or lightning strike, turbulence",
+              "Madár, villámcsapás, turbulencia"]]),
+           (DELAYCODE, FOR_OT,
+            ["512", "", None,
+             ["DAMAGE DURING\nFLIGHT OPERATIONS", "REPÜLÉS KÖZBENI SÉRÜLÉS"],
+             ["Overweight landing, collisions during taxiing",
+              "Leszállási túlsúly, gurulás közbeni ütközés"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "52", "DG",
+             ["DAMAGE DURING\nGROUND OPERATIONS", "SÉRÜLÉS A FÖLDÖN"],
+             ["Collisions (other than taxiing), loading/offloading\n"
+              "damage, towing, contamination, extreme weather conditions",
+              "Ütközés (nem gurulás közben), rakodásnál, vontatásnál\n"
+              "szennyeződés vagy szélsőséges időjárás miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["521", "52", None,
+             ["DAMAGE DURING\nGROUND OPERATIONS", "SÉRÜLÉS A FÖLDÖN"],
+             ["Not during taxiing, extreme weather conditions",
+              "Nem gurulás közben, időjárás következtében"]]),
+           (DELAYCODE, FOR_OT,
+            ["522", "52", None,
+             ["DAMAGE DURING\nGROUND OPERATIONS", "SÉRÜLÉS A FÖLDÖN"],
+             ["Loading/offloading damage, towing other collisions",
+              "Ki- vagy berakodásnál, vontatásnál vagy egyéb ütközések miatt"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["EDP/Automated Equipment Failure",
+             "Számítógépes rendszerek hibái"] ),
+           (DELAYCODE, FOR_MODERN,
+            [None, "55", "ED",
+             ["DEPARTURE CONTROL", "INDULÁS-IRÁNYÍTÁS"],
+             ["Failure of automated systems, including check-in;\n"
+              "load control systems producing mass and balance",
+              "Az automatizált rendszerek meghibásodása, beleértve a\n",
+              "check-int és a tömeg- és egyensúlyszámítást végző rendszereket"]]),
+           (DELAYCODE, FOR_OT,
+            ["551", "55", None,
+             ["DEPARTURE CONTROL", "INDULÁS-IRÁNYÍTÁS"],
+             ["System failure due to transmission errors",
+              "Rendszerleállás vonalhiba, átviteli hiba miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["552", "", None,
+             ["DEPARTURE CONTROL", "INDULÁS-IRÁNYÍTÁS"],
+             ["System failure due to operator error",
+              "Rendszerleállás kezelői hiba miatt"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "56", "EC",
+             ["CARGO PREPARATION\nDOCUMENTATION", "ÁRUDOKUMENTÁCIÓ"],
+             ["Failure of documentation and/or load control\n"
+              "systems covering cargo"
+              "A dokumentációs és/vagy terhelés irányító rendszerek\n",
+              "árukezeléssel kapcsolatos részének hibája"]]),
+           (DELAYCODE, FOR_OT,
+            ["561", "56", None,
+             ["CARGO PREPARATION\nDOCUMENTATION", "ÁRUDOKUMENTÁCIÓ"],
+             ["System failure due to transmission errors",
+              "Rendszerleállás vonalhiba, átviteli hiba miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["562", "", None,
+             ["CARGO PREPARATION\nDOCUMENTATION", "ÁRUDOKUMENTÁCIÓ"],
+             ["System failure due to operator error",
+              "Rendszerleállás kezelői hiba miatt"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["571", "57", "EF",
+             ["FLIGHT PLANS", "REPÜLÉSI TERVEK"],
+             ["Failure of automated flight plan systems",
+              "A repülési terveket kezelő rendszerek meghibásodása"]]),
+           (DELAYCODE, FOR_OT,
+            ["581", "58", "EF",
+             ["", ""],
+             ["",
+              ""]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Flight Operations and Crewing",
+             "Üzemeltetés"] ),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["612", "61", "FP",
+             ["FLIGHT PLAN", "REPÜLÉSI TERV"],
+             ["Late completion of or change to flight plan",
+              "Repülési terv kései benyújtása vagy módosítása"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["622", "62", "FF",
+             ["OPERATIONAL REQUIREMENT", "ÜZEMELTETÉSI IGÉNYEK"],
+             ["Late alteration to fuel or payload",
+              "Üzemanyag mennyiség vagy hasznos teher\n"
+              "kései módosítása"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["632", "63", "FT",
+             ["LATE CREW BOARDING\nOR DEPARTURE PROCEDURES",
+              "SZEMÉLYZET KÉSEI MEGJELENÉSE\nVAGY ELHÚZÓDÓ INDULÁS"],
+             ["Late flight deck, or entire crew, other than standby;\n"
+              "late completion of flight deck crew checks",
+              "A repülő- vagy a teljes, nem készenléti személyzet\n"
+              "késése, az ellenőrzések elhúzódása"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["642", "64", "FS",
+             ["FLIGHT DECK\nCREW SHORTAGE", "REPÜLŐSZEMÉLYZET\nLÉTSZÁMHIÁNYA"],
+             ["Sickness, awaiting standby, flight time limitations,\n"
+              "valid visa, health documents, etc.",
+              "Betegség, készenlét, a repülési idő korlátozásai,\n"
+              "érvényes vízum, egészségügyi papírok hiánya, stb."]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["652", "65", "FR",
+             ["FLIGHT DECK CREW\nSPECIAL REQUEST",
+              "SZEMÉLYZET KÜLÖNLEGES IGÉNYE"],
+             ["Requests not within operational requirements",
+              "Az üzemeltetési feltételeken kívül eső igények"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "66", "FL",
+             ["LATE CABIN CREW BOARDING\nOR DEPARTURE PROCEDURES",
+              "UTASKÍSÉRŐK KÉSEI MEGJELENÉSE\nVAGY ELHÚZÓDÓ INDULÁS"],
+             ["Late cabin crew other than standby; late completion\n"
+              "of cabin crew checks",
+              "A nem készenléti utaskisérők késése,\n"
+              "az ellenőrzések elhúzódása"]]),
+           (DELAYCODE, FOR_OT,
+            ["662", "66", None,
+             ["OPERATIONAL (GROUND)\nDECISION",
+              "FORGALMI (FÖLDI) DÖNTÉS"],
+             ["Modification of route, merging or cancelling flights\n"
+              "due to business reasons",
+              "Útvonal módosítás, járatösszevonás, járattörlés\n"
+              "kereskedelmi okból"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["672", "67", "FC",
+             ["CABIN CREW SHORTAGE", "UTASKÍSÉRŐK HIÁNYA"],
+             ["Sickness, awaiting standby, flight time limitations,\n"
+              "valid visa, health documents",
+              "Betegség, készenlét, a repülési idő korlátozásai,\n"
+              "érvényes vízum, egészségügyi papírok hiánya."]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["682", "68", "FA",
+             ["CABIN CREW ERROR OR\nSPECIAL REQUEST",
+              "UTASKÍSÉRŐK HIBÁJA\nVAGY KÜLÖNLEGES IGÉNYE"],
+             ["Requests not within operational requirements",
+              "Az üzemeltetési feltételeken kívül eső igények"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["692", "69", "FB",
+             ["CAPTAIN REQUEST FOR\nSECURITY CHECK",
+              "KAPITÁNY KÉRÉSÉRE\nBIZTONSÁGI ELLENŐRZÉS"],
+             ["Extraordinary requests outside mandatory requirements",
+              "A kötelező elvárásokon felüli kérés"]]),
+
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Weather", "Időjárás"] ),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["711", "71", "WO",
+             ["DEPARTURE STATION", "INDULÓ ÁLLOMÁS"],
+             ["Below operating limits",
+              "Kedvezőtlen/minimum alatti időjárás"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["721", "72", "WT",
+             ["DESTINATION STATION", "CÉLÁLLOMÁS"],
+             ["Below operating limits",
+              "Kedvezőtlen/minimum alatti időjárás"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["731", "73", "WR",
+             ["EN-ROUTE OR ALTERNATE", "ÚTVONAL VAGY\nKITÉRŐ REPÜLŐTÉR"],
+             ["Below operating limits",
+              "Kedvezőtlen/minimum alatti időjárás"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["751", "75", "WS",
+             ["DE-ICING OF AIRCRAFT", "JÉGTELENÍTÉS"],
+             ["Removal of ice and/or snow; excludes\n"
+              "equipment – lack of or breakdown",
+              "Jég és hó eltakarítás, ha az nem a berendezések\n"
+              "hiánya vagy meghibásodása miatt késik"]]),
+           (DELAYCODE, FOR_OT,
+            ["752", "", None,
+             ["DE-ICING OF AIRCRAFT", "JÉGTELENÍTÉS"],
+             ["Bad management, technology or the lack of\n"
+              "de-icing liquid",
+              "Rossz munkaszervezés, rossz technológia vagy a\n"
+              "jégtelenító folyadék hiánya miatt"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["761", "76", "WS",
+             ["REMOVAL OF SNOW, ICE,\nWATER, AND SAND FROM\nAIRPORT",
+              "HÓ, JÉG, VÍZ ÉS\nHOMOK ELTAKARÍTÁSA\nA REPÜLŐTÉREN"],
+             ["Runway, taxiway conditions",
+              "A futópályák, gurulóutak állapota"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["771", "77", "WG",
+             ["GROUND HANDLING\nIMPAIRED BY ADVERSE\nWEATHER CONDITIONS",
+              "AZ IDŐJÁRÁS AKADÁLYOZTA\nFÖLDI KISZOLGÁLÁST"],
+             ["High winds, heavy rain, blizzards, monsoons etc.",
+              "Erős szél, heves esőzés, hóvihar, monszun, stb."]]),
+
+           (CAPTION, FOR_MODERN,
+            ["Air Traffic Flow Management Restrictions",
+             "A forgalomáramlás-irányítás követelményei"] ),
+           (DELAYCODE, FOR_MODERN,
+            [None, "81", "AT",
+             ["ATFM DUE TO ATC\nENROUTE DEMAND/CAPACITY",
+              "ÚTVONAL TERHELTSÉG/KAPACITÁS"],
+             ["Standard demand/capacity problems",
+              "A szokványos terheltségi és kapacitás problémák"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "82", "AX",
+             ["ATFM DUE TO ATC STAFF/\nEQUIPMENT ENROUTE",
+              "ÚTVONALI IRÁNYÍTÓ\nSZEMÉLYZET/NBERENDEZÉSEK"],
+             ["Reduced capacity caused by industrial\n"
+              "action or staff shortage, equipment failure,\n"
+              "military exercise or extraordinary demand\n"
+              "due to capacity reduction in neighbouring area",
+              "Csökkent kapacitás sztrájk vagy munkaerőhiány,\n"
+              "berendezések meghibásodása, hadgyakorlat vagy\n"
+              "egy szomszédos terület kapacitáscsökkenési miatti\n"
+              "megnövekedett leterheltség"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "83", "AE",
+             ["ATFM DUE TO\nRESTRICTION AT\nDESTINATION AIRPORT",
+              "KORLÁTOZÁSOK A\nCÉLREPÜLŐTÉREN"],
+             ["Airport and/or runway closed due to obstruction,\n"
+              "industrial action, staff shortage, political unrest,\n"
+              "noise abatement, night curfew, special flights",
+              "A repülőtér és/vagy a futopálya bezárt akadály,\n"
+              "sztrájk, munkaerőhiány, politikai megmozdulások\n"
+              "zajcsökkentés, kijárási tilalom, kölönleges járatok miatt"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "84", "AW",
+             ["ATFM DUE TO WEATHER\n AT DESTINATION",
+              "CÉLREPÜLŐTÉR IDŐJÁRÁSA"],
+             ["", ""]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Airport and state authorities",
+             "Repülőtéri és állami hatóságok"] ),
+           (DELAYCODE, FOR_MODERN,
+            [None, "85", "AS",
+             ["MANDATORY SECURITY", "BIZTONSÁGI ELLENŐRZÉS" ],
+             ["Passengers, baggage, crew, etc.",
+              "Utasok, poggyász, személyzet, stb."]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "86", "AG",
+             ["IMMIGRATION, CUSTOMS,\nHEALTH",
+              "HATÁRRENDÉSZET, VÁM,\nEGÉSZSÉGÜGY" ],
+             ["Passengers, crew",
+              "Utasok, személyzet"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "87", "AF",
+             ["AIRPORT FACILITIES", "REPÜLŐTÉRI LÉTESÍTMÉNYEK" ],
+             ["Parking stands, ramp congestion, lighting,\n"
+              "buildings, gate limitations etc.",
+              "Állóhelyek, torlódás az előtéren, világítás\n"
+              "épületek, kapuk, stb."]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "88", "AD",
+             ["RESTRICTIONS AT\nDESTINATION AIRPORT",
+              "KORLÁTOZÁSOK A\nCÉLREPÜLŐTÉREN" ],
+             ["Airport and/or runway closed due to obstruction,\n"
+              "industrial action, staff shortage, political unrest,\n"
+              "noise abatement, night curfew, special flights",
+              "A repülőtér és/vagy a futopálya bezárt akadály,\n"
+              "sztrájk, munkaerőhiány, politikai megmozdulások\n"
+              "zajcsökkentés, kijárási tilalom, kölönleges járatok miatt"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "89", "AM",
+             ["RESTRICTIONS AT\nAIRPORT OF DEPARTURE",
+              "KORLÁTOZÁSOK AZ\nINDULÓ REPÜLŐTÉREN" ],
+             ["Including air traffic services, start-up and pushback,\n"
+              "airport and/or runway closed due to obstruction or weather\n"
+              "(restriction due to weather in case of ATFM only) industrial\n"
+              "action, staff shortage, political unrest, noise abatement,\n"
+              "night curfew, special flights",
+              "Beleértve a légiirányítás, a hajtóműindítás és hátratolás\n"
+              "szüneteltetését, a repülőtér és/vagy a futopálya bezárását\n"
+              "akadály vagy időjárás (csak forgalom-áramlási okokból),\n"
+              "sztrájk, munkaerőhiány, politikai megmozdulások\n"
+              "zajcsökkentés, kijárási tilalom, kölönleges járatok miatt"]]),
+
+           (DELAYCODE, FOR_OT,
+            ["811", "81", None,
+             ["ATC", "IRÁNYÍTÁS"],
+             ["E.g. lack of clearances",
+              "Pl. engedélyek hiánya"]]),
+           (DELAYCODE, FOR_OT,
+            ["821", "82", None,
+             ["SECURITY CHECK", "BIZTONSÁGI ELLENŐRZÉS"],
+             ["Passenger, baggage, cargo",
+              "Utas, poggyász, áru"]]),
+           (DELAYCODE, FOR_OT,
+            ["823", "", None,
+             ["BOMB SCARE", "BOMBARIADÓ"],
+             ["", ""]]),
+           (DELAYCODE, FOR_OT,
+            ["831", "83", None,
+             ["CUSTOMS CHECKS", "VÁMHATÓSÁGI ELLENŐRZÉSEK"],
+             ["", ""]]),
+           (DELAYCODE, FOR_OT,
+            ["833", "", None,
+             ["IMMIGRATION CHECKS", "HATÁRRENDÉSZETI\nELLENŐRZÉSEK"],
+             ["",  ""]]),
+           (DELAYCODE, FOR_OT,
+            ["835", "", None,
+             ["HEALTHCARE CHECKS", "EGÉSZSÉGÜGYI ELLENŐRZÉSEK"],
+             ["",  ""]]),
+           (DELAYCODE, FOR_OT,
+            ["841", "84", None,
+             ["AIRPORT CAPACITY", "REPÜLŐTÉR KAPACITÁS"],
+             ["Inadequate capacity and throughput of the airport,\n"
+              "lack of stands (stairs, etc.), congestion in the\n"
+              "apron and at the exists",
+              "Repülőtér befogadó és áteresztő képességének elégtelensége,\n"
+              "állóhely (lépcső stb.) hiánya, torlódás az előtéren,\n"
+              "kijáratok zsúfoltsága"]]),
+           (DELAYCODE, FOR_OT,
+            ["851", "85", None,
+             ["AIRPORT RESTRICTIONS", "KORLÁTOZÁSOK A REPÜLŐTÉREN"],
+             ["Closed runway, industrial action, political unrest\n"
+              "or noise abatement",
+              "Leszállópályazárlat, sztrájk, politikai esemény\n"
+              "vagy zajvédelem miatt"]]),
+           (DELAYCODE, FOR_OT,
+            ["861", "86", None,
+             ["AIRPORT CLOSED", "TELJES REPTÉRZÁR"],
+             ["E.g. due to security reasons, including all flights",
+              "Pl. biztonsági okok miatt, minden járatot beleértve"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Reactionary", "Visszahatások"] ),
+
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["911", "91", "RL",
+             ["LOAD CONNECTION", "CSATLAKOZÁS"],
+             ["Awaiting load from another flight",
+              "Csatlakozásra várás más járatról, utas és áru"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "91", "RT",
+             ["THROUGH CHECK-IN ERROR", "JEGYKEZELÉSI HIBA"],
+             ["Passenger or baggage check-in error at originating station",
+              "Utas- vagy a csomagkezelési hiba az induló repülőtéren"]]),
+           (DELAYCODE, FOR_OT,
+            ["921", "91", None,
+             ["CREW LATE ARRIVAL", "SZEMÉLYZET KÉSEI ÉRKEZÉSE"],
+             ["Deck crew arrived later from preceding flight",
+              "Személyzet kései érkezése előző járatról (deck crew)"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "93", "RA",
+             ["AIRCRAFT ROTATION", "REPÜLŐGÉP ROTÁCIÓ"],
+             ["Late arrival of aircraft from another flight or previous sector",
+              "Repülőgép kései érkezése előző járatról vagy szektorból"]]),
+           (DELAYCODE, FOR_OT,
+            ["931", "93", None,
+             ["AIRCRAFT LATE", "REPÜLŐGÉP KÉSIK"],
+             ["Late arrival of aircraft from another flight\n"
+              "(not due to company reasons)",
+              "Repülőgép kései érkezése előző járatról\n"
+              "(nem vállalati okok miatt)"]]),
+           (DELAYCODE, FOR_OT,
+            ["932", "", None,
+             ["AIRCRAFT LATE", "REPÜLŐGÉP KÉSIK"],
+             ["Late arrival of aircraft from another flight\n"
+              "(due to company reasons)",
+              "Repülőgép kései érkezése előző járatról\n"
+              "(vállalati okok miatt)"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["941", "94", "RS",
+             ["CABIN CREW ROTATION", "UTASKÍSÉRŐK KÉSEI ÉRKEZÉSE"],
+             ["Awaiting cabin crew from another flight",
+              "Utaskísérők kései érkezése előző járatról"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["951", "95", "RC",
+             ["CREW ROTATION", "SZEMÉLYZET KÉSEI ÉRKEZÉSE"],
+             ["Awaiting flight deck, or entire crew, from another flight",
+              "Teljes személyzet kései érkezése előző járatról"]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "96", "RO",
+             ["OPERATIONS CONTROL", "ÜZEMELTETÉS"],
+             ["Re-routing, diversion, consolidation, aircraft change\n"
+              "for reasons other than technical",
+              "Útvonalváltoztatás, repülőgép cseréje nem műszaki okokból"]]),
+
+           (CAPTION, FOR_MODERN | FOR_OT,
+            ["Miscellaneous", "Egyéb"] ),
+           (DELAYCODE, FOR_OT,
+            ["961", "96", None,
+             ["INDUSTRIAL ACTION\nWITHIN OWN AIRLINE",
+              "SZTRÁJK VÁLLALATON BELÜL"],
+             ["", ""]]),
+           (DELAYCODE, FOR_MODERN,
+            [None, "97", "MI",
+             ["INDUSTRIAL ACTION\n WITHIN OWN AIRLINE",
+              "SZTRÁJK VÁLLALATON BELÜL"],
+             ["", ""]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["981", "98", "MO",
+             ["INDUSTRIAL ACTION\nOUTSIDE OWN AIRLINE",
+              "SZTRÁJK VÁLLALTON KÍVÜL"],
+             ["Industrial action (except Air Traffic Control Services)",
+              "Sztrájk (kivéve a légiirányítást)"]]),
+           (DELAYCODE, FOR_MODERN | FOR_OT,
+            ["991", "99", "MX",
+             ["MISCELLANEOUS", "EGYÉB"],
+             ["No suitable code; explain reason(s) in plain text",
+              "A táblázatban nem szereplő egyéb ok"]])
+           ])
+
+#-------------------------------------------------------------------------------
+
+def generateMsgStr(file, text):
+    """Generate an 'msgstr' entry for the given text."""
+    lines = text.splitlines()
+    numLines = len(lines)
+    if numLines==0:
+        print >> file, "msgstr \"\""
+    elif numLines==1:
+        print >> file, "msgstr \"%s\"" % (lines[0])
+    else:
+        print >> file, "msgstr \"\""
+        for i in range(0, numLines):
+            print >> file, "\"%s%s\"" % (lines[i], "" if i==(numLines-1) else "\\n")
+    print >> file
+
+#-------------------------------------------------------------------------------
+
+def generateFiles(baseDir):
+    """Generate the various files."""
+    dcdata = None
+    poFiles = []
+
+    try:
+        dcdataPath = os.path.join(baseDir, "src", "mlx", "gui", "dcdata.py")
+        dcdata = open(dcdataPath, "wt")
+
+        numLanguages = len(languageCodes)
+        for language in languageCodes:
+            poPath = os.path.join(baseDir, "locale", language, "mlx_delay.po")
+            poFile = open(poPath, "wt")
+            poFiles.append(poFile)
+            print >> poFile, "msgid \"\""
+            print >> poFile, "msgstr \"\""
+            print >> poFile, "\"Content-Type: text/plain; charset=utf-8\\n\""
+            print >> poFile, "\"Content-Transfer-Encoding: 8bit\\n\""
+
+        (baseData, headings, headingFlags, rows) = table
+        (poPrefix, extractor) = baseData
+
+        for i in range(0, len(headings)):
+            heading = headings[i]
+            for j in range(0, numLanguages):
+                poFile = poFiles[j]
+                print >> poFile, "msgid \"%sheading%d\"" % (poPrefix, i)
+                generateMsgStr(poFile, heading[j])
+
+
+        rowIndex = 0
+        for (type, _tableMask, columns) in rows:
+            if type==CAPTION:
+                for i in range(0, numLanguages):
+                    poFile = poFiles[i]
+                    print >> poFile, "msgid \"%srow%d\"" % (poPrefix, rowIndex)
+                    generateMsgStr(poFile, columns[i])
+            elif type==DELAYCODE:
+                columnIndex = 0
+                for column in columns:
+                    if isinstance(column, list):
+                        for i in range(0, numLanguages):
+                            if column[i]:
+                                poFile = poFiles[i]
+                                print >> poFile, "msgid \"%srow%d_col%d\"" % \
+                                  (poPrefix, rowIndex, columnIndex)
+                                generateMsgStr(poFile, column[i])
+                    columnIndex += 1
+            rowIndex += 1
+
+        print >> dcdata, "import mlx.const as const"
+        print >> dcdata, "from mlx.i18n import xstr"
+        print >> dcdata
+        print >> dcdata, "CAPTION = 1"
+        print >> dcdata, "DELAYCODE = 2"
+
+        tableMask = 1
+        for i in range(0, len(tablePrefixes)):
+            print >> dcdata, "_%s_data = (" % (tablePrefixes[i],)
+            print >> dcdata, "    %s," % (extractor,)
+            print >> dcdata, "    [",
+
+            columnIndexes = []
+            for j in range(0, len(headings)):
+                if ( (headingFlags[j]&tableMask)==tableMask ):
+                    if columnIndexes:
+                        print >> dcdata, ",",
+                    print >> dcdata, "xstr(\"%sheading%d\")" % (poPrefix, j),
+                    columnIndexes.append(j)
+
+            print >> dcdata, "],"
+
+            print >> dcdata, "    ["
+
+            rowIndex = 0
+            for (type, mask, columns) in rows:
+                if (mask&tableMask)!=tableMask:
+                    rowIndex += 1
+                    continue
+
+                if type==CAPTION:
+                    print >> dcdata, "        (CAPTION, xstr(\"%srow%d\"))," % \
+                      (poPrefix, rowIndex)
+                elif type==DELAYCODE:
+                    print >> dcdata, "        (DELAYCODE, ["
+                    for j in columnIndexes:
+                        column = columns[j]
+                        if j!=columnIndexes[0]:
+                            print >> dcdata, ","
+                        if isinstance(column, list):
+                            if column[0]:
+                                print >> dcdata, "            xstr(\"%srow%d_col%d\")"  % \
+                                (poPrefix, rowIndex, j),
+                            else:
+                                print >> dcdata, "            \"\"",
+                        else:
+                            print >> dcdata, "            \"%s\""  % \
+                              (column,),
+                    print >> dcdata, "] ),"
+                rowIndex += 1
+
+            print >> dcdata, "    ]"
+
+            print >> dcdata, ")"
+            print >> dcdata
+
+            tableMask <<= 1
+
+        print >> dcdata, "def getTable(aircraftType):"
+        first = True
+        for i in range(0, len(tablePrefixes)):
+            tablePrefix = tablePrefixes[i]
+            for typeSuffix in typeGroups[i]:
+                print >> dcdata, "    %s aircraftType==const.AIRCRAFT_%s:" % \
+                  ("if" if first else "elif", typeSuffix)
+                print >> dcdata, "        return _%s_data" % (tablePrefix,)
+                first = False
+
+        print >> dcdata, "    else:"
+        print >> dcdata, "        return None"
+    finally:
+        for poFile in poFiles:
+            poFile.close()
+        if dcdata is not None:
+            dcdata.close()
+
+#-------------------------------------------------------------------------------
+
+if __name__ == "__main__":
+    generateFiles(os.path.dirname(__file__))
Index: doc/overview.dox
===================================================================
--- doc/overview.dox	(revision 302)
+++ doc/overview.dox	(revision 444)
@@ -11,9 +11,9 @@
  * Note, that to be able to understand the code most effectively, it
  * is important to either use the application actively, or to read its
- * user documentation carefully. 
+ * user documentation carefully.
  *
  * \section overview Overview
  *
- * The application was written in 
+ * The application was written in
  * <a href="http://python.org">Python 2</a>. The Python wrapper
  * <a href="http://gtk.org">Gtk+</a> toolkit was used for the graphical
@@ -23,5 +23,5 @@
  * as the primary toolkit, while it has no reliable port for Windows
  * yet. Therefore it was decided to support both Gtk+ 2 and 3
- * depending on the platform. For Gtk+ 2 the 
+ * depending on the platform. For Gtk+ 2 the
  * <a href="http://pygtk.org">PyGTK</a> wrapper is used, while for Gtk+
  * 3 the <a href="https://live.gnome.org/PyGObject">PyGObject</a>
@@ -33,5 +33,5 @@
  * <a href="http://www.schiratti.com/dowson.html">FSUIPC</a>
  * interface. The author has created a Python mapping for it, which
- * has been submitted for inclusion into the SDK, so it will hopefully  
+ * has been submitted for inclusion into the SDK, so it will hopefully
  * appear in its next version. It is planned to support X-Plane in the
  * near future (hopefully by the end of 2012) on both Linux and
@@ -45,5 +45,5 @@
  * Gtk+ and Gtk+ itself. Since Python is an interpreted language,
  * there is no need for any special build system.
- * 
+ *
  * Python and Gtk+ are readily available on most Linux distributions,
  * but some links are probably useful for Windows users:
@@ -54,5 +54,5 @@
  * \li To create install packages, you also need py2exe: <a href="http://www.py2exe.org/">http://www.py2exe.org</a>,
  * \li as well as the Nullsoft Install System: http://nsis.sourceforge.net/Main_Page
- * 
+ *
  * The install package can be created by running the \c makeinst.bat
  * file. It contains some absolute paths, so check those befure
@@ -81,5 +81,5 @@
  *    thread. Instead, use \c gobject.idle_add to "inject" the
  *    operation into the main thread.
- * -# To ensure the responsiveness of the GUI, only operations 
+ * -# To ensure the responsiveness of the GUI, only operations
  *    that take a short time should be executed in the GUI thread.
  *
@@ -98,10 +98,10 @@
  * simulator is to be supported, a class with the same (or at least
  * sufficiently similar) public interface should be implemented.
- *              
+ *
  * The most important function of the program is the
  * continuous monitoring of the aircraft's parameters and some other
  * data. The monitoring is started using the \ref
  * mlx.fsuipc.Simulator.startMonitoring "startMonitoring" function of
- * the simulator object. If started, it calls the \ref 
+ * the simulator object. If started, it calls the \ref
  * mlx.acft.Aircraft.handleState "handleState" function of the
  * mlx.acft.Aircraft instance used. The mlx.acft module contains one
@@ -114,17 +114,17 @@
  * smoothed values of IAS and VS, and then calls each "checker". A
  * checker is an instance of a subclass of mlx.checks.StateChecker,
- * which checks a one or a few parameters that are important from some 
+ * which checks a one or a few parameters that are important from some
  * aspect of the correct execution of a flight. For example, a checker
- * may check if the \ref mlx.checks.StrobeLightsChecker 
+ * may check if the \ref mlx.checks.StrobeLightsChecker
  * "strobe lights" are switched on and off at the right stages of the
  * flight. But some checkers simply log some \ref
  * mlx.checks.AltimeterLogger "value" whenever it changes
  * in an "interesting" way, or \ref mlx.checks.ACARSSender "send the
- * ACARS" periodically. 
+ * ACARS" periodically.
  *
  * There is also a \ref mlx.checks.StageCheker "checker" which
  * detects the changes in the stage of the flight, and calls the
  * \ref mlx.acft.Aircraft.setStage "setStage" function of the
- * aircraft, if there is a change. It first calls the  
+ * aircraft, if there is a change. It first calls the
  * \ref mlx.flight.Flight "flight"'s \ref mlx.flight.Flight.setStage
  * "setStage" function, which notifies the GUI and the \ref
@@ -139,10 +139,10 @@
  * mlx.soundsched.SoundScheduler "sound scheduler" to check if some
  * backround sound should be played. If the check list hotkey is
- * pressed, the \ref mlx.soundsched.ChecklistScheduler 
+ * pressed, the \ref mlx.soundsched.ChecklistScheduler
  * "checklist scheduler" is notified too.
  *
  * As mentioned, there is a \ref mlx.logger.Logger "logger" in the
  * application, which contains the textual log lines as well as the
- * faults and their scores. 
+ * faults and their scores.
  *
  * The business logic part contains many other components, but they
@@ -151,5 +151,5 @@
  * modules for more information.
  *
- * \subsection arch_gui GUI     
+ * \subsection arch_gui GUI
  *
  * As mentioned, the GUI is implemented using Gtk+. This toolkit
@@ -158,5 +158,5 @@
  * experience with Glade in an earlier project, it was decided to not
  * use it. Instead, the GUI elements are created and handled by
- * hand-written code. 
+ * hand-written code.
  *
  * The central class of the graphical user interface is
@@ -165,9 +165,85 @@
  * connection to the simulator and creates the \ref mlx.flight.Flight
  * "flight" and \ref mlx.flight.Aircraft "aircraft" objects as
- * needed. 
+ * needed.
  *
  * To understand the operation of the GUI, one should be familiar with
  * Gtk+, but otherwise it is pretty straighforward. See the
- * documentation of the relevant modules for more information. 
+ * documentation of the relevant modules for more information.
+ *
+ * \section newtype Adding a new aircraft type
+ *
+ * While new aircraft types will probably not be added too often, here
+ * is a checklist about what should be modified when such a
+ * requirement arises.
+ *
+ * First, it is worth to know what data you need to add the new type:
+ *
+ * \li the aircraft's type name and its ICAO code
+ * \li the following weights: DOW, MZFW, MTOW, MLW
+ * \li the flap settings and their speed limits
+ * \li the speed limit for extending/retracting the gear (VLE)
+ * \li the number and types of the fuel tanks
+ * \li the type code the MAVA website uses to identify the type
+ * \li if the plane has reversers, what is the operating limit speed,
+ *     if any
+ * \li does the plane support the notion of a takeoff derate, and if
+ *     so, what data should be given
+ * \li what lights does the plane have
+ *
+ * If you have the data, you can add the type by modifying the source
+ * files as per the checklist below:
+ *
+ * -# \c src/mlx/const.py: look for the constants named AIRCRAFT_xxx.
+ *    Add the new type at the end of the list of those constants, with
+ *    a number 1 greater than the number of the last existing
+ *    type. The part of the constant's name after the underscore (xxx
+ *    above) should be the ICAO code of the aircraft type.
+ * -# \c src/mlx/const.py: below this list of constants, you can find
+ *    an array named \c aircraftTypes. Add the type constant to it.
+ * -# \c src/mlx/const.py: further below you can find a dictionary
+ *    mapping te aircraft type to the corresponding ICAO codes. Add
+ *    the new type to it.
+ * -# \c src/mlx/acft.py: add a new subclass of \ref
+ *    mlx.acft.Aircraft. Its name should be the ICAO code. Check an
+ *    existing aircraft and add the same variables containing the
+ *    weights, the flap speed limits and the gear speed limit. There
+ *    may be some other member variables or functions that should be
+ * -# \c src/mlx/acft.py: there is a dictionary named \c _classes
+ *    towards the end of the file. Add the type to it.
+ * -# \c src/mlx/web.py: the \ref mlx.web.BookedFlight class contains
+ *    two dictionaries, the mapping between the types and the values the MAVA
+ *    website uses to identify the type. Add the appropriate values
+ *    here.
+ * -# \c src/mlx/fsuipc.py: add a subclass of \ref
+ *    mlx.fsuipc.GenericAircraftModel for the new type named the ICAO
+ *    code of the type followed by the word \c Model. Implement its
+ *    constructor to supply the base class with the flaps notches
+ *    (starting with 0), the array of constants describing the fuel
+ *    tanks the model has, and the number of engines. Also implement
+ *    the name of the model, which should be something like
+ *    "FSUIPC/Generic ...". If necessary implement other functions or
+ *    set other members.
+ * -# \c src/mlx/fsuipc.py: add the new type and model class to the
+ *    dictionary named \c _genericModels towards the end of the file.
+ * -# \c src/mlx/fsuipc.py: if you have a model that has some
+ *    non-generic characteristics, create a specific class for
+ *    it. This class should be a subclass of the generic class
+ *    created, and it should be registered at the bottom of the file,
+ *    as the other models are.
+ * -# \c src/mlx/gui/common.py: this file contains a dictionary called
+ *    \c mlx.gui.common.aircraftNames. Add the new type it it. It
+ *    contains the mapping from the type constants to their
+ *    language-specific names. The string ID is "aircraft_" followed by
+ *    the lower-cased ICAO code.
+ * -# \c locale/hu/mlx.po, locale/en/mlx.po: the beginning of this
+ *    file contains mapping from the string ID previously used to the
+ *    actual name of the aircraft. Add the new type as appropriate.
+ * -# \c dcdatagen.py: this program generates some source and message
+ *    files related to the delay codes. Currently there are two
+ *    tables, one for old-timer types and the other for the "modern" types.
+ *    The file contains a list of lists called \c typeGroups. Add the
+ *    type's ICAO code the appropriate list.
+ *
+ * When all the changes have been made, run \c make in the root
+ * directory to update some source files.
  */
- 
Index: locale/en/mlx.po
===================================================================
--- locale/en/mlx.po	(revision 393)
+++ locale/en/mlx.po	(revision 445)
@@ -63,4 +63,7 @@
 msgid "aircraft_yk40"
 msgstr "Yakovlev Yak-40"
+
+msgid "aircraft_b462"
+msgstr "British Aerospace 146-200"
 
 msgid "file_filter_all"
@@ -777,4 +780,7 @@
 msgstr "N_ominal/takeoff:"
 
+msgid "takeoff_derate_b462"
+msgstr "Der_ate (yes/no):"
+
 msgid "takeoff_derate_tooltip"
 msgstr "Enter the takeoff derate parameter."
@@ -971,34 +977,4 @@
 msgid "info_delay"
 msgstr "Delay codes"
-
-msgid "info_delay_loading"
-msgstr "L_oading problems"
-
-msgid "info_delay_vatsim"
-msgstr "_VATSIM problem"
-
-msgid "info_delay_net"
-msgstr "_Net problems"
-
-msgid "info_delay_atc"
-msgstr "Controll_er's fault"
-
-msgid "info_delay_system"
-msgstr "S_ystem crash/freeze"
-
-msgid "info_delay_nav"
-msgstr "Naviga_tion problem"
-
-msgid "info_delay_traffic"
-msgstr "T_raffic problems"
-
-msgid "info_delay_apron"
-msgstr "_Apron navigation problem"
-
-msgid "info_delay_weather"
-msgstr "_Weather problems"
-
-msgid "info_delay_personal"
-msgstr "_Personal reasons"
 
 msgid "statusbar_conn_tooltip"
Index: locale/hu/mlx.po
===================================================================
--- locale/hu/mlx.po	(revision 393)
+++ locale/hu/mlx.po	(revision 445)
@@ -64,4 +64,7 @@
 msgstr "Jakovlev Jak-40"
 
+msgid "aircraft_b462"
+msgstr "British Aerospace 146-200"
+
 msgid "file_filter_all"
 msgstr "Összes fájl"
@@ -778,4 +781,7 @@
 msgstr "Névleges/felszállási:"
 
+msgid "takeoff_derate_b462"
+msgstr "Teljesítménycsökkentés (yes/no):"
+
 msgid "takeoff_derate_tooltip"
 msgstr "Írd be a felszállási teljesítménycsökkentés értékét."
@@ -974,34 +980,4 @@
 msgid "info_delay"
 msgstr "Késés kódok"
-
-msgid "info_delay_loading"
-msgstr "_Betöltési problémák"
-
-msgid "info_delay_vatsim"
-msgstr "_VATSIM probléma"
-
-msgid "info_delay_net"
-msgstr "_Hálózati problémák"
-
-msgid "info_delay_atc"
-msgstr "Irán_yító hibája"
-
-msgid "info_delay_system"
-msgstr "_Rendszer elszállás/fagyás"
-
-msgid "info_delay_nav"
-msgstr "Navi_gációs probléma"
-
-msgid "info_delay_traffic"
-msgstr "_Forgalmi problémák"
-
-msgid "info_delay_apron"
-msgstr "_Előtér navigációs probléma"
-
-msgid "info_delay_weather"
-msgstr "Időjárási _problémák"
-
-msgid "info_delay_personal"
-msgstr "S_zemélyes okok"
 
 msgid "statusbar_conn_tooltip"
Index: src/mlx/acft.py
===================================================================
--- src/mlx/acft.py	(revision 409)
+++ src/mlx/acft.py	(revision 447)
@@ -152,5 +152,5 @@
         self._checkers.append(checks.VSChecker())
 
-        timeout = 5.0 + config.realIASSmoothingLength - 1
+        timeout = 30.0 + config.realIASSmoothingLength - 1
         self._checkers.append(checks.OverspeedChecker(timeout = timeout))
 
@@ -1017,4 +1017,36 @@
 #---------------------------------------------------------------------------------------
 
+class B462(Aircraft):
+    """British Aerospace BAe-146 aircraft.
+
+    The aircraft type-specific values in the aircraft state have the following
+    structure:
+    - fuel: left, centre, right
+    - n1: left outer, left inner, right inner, right outer
+    - reverser: empty (the plane has no reversers)"""
+    def __init__(self, flight):
+        super(B462, self).__init__(flight)
+        self.dow = 25706
+        self.mtow = 43998
+        self.mlw = 38599
+        self.mzfw = 33792
+        self.gearSpeedLimit = 210
+        self.flapSpeedLimits = { 18 : 217,
+                                 24 : 180,
+                                 30 : 170,
+                                 33 : 150 }
+
+    @property
+    def derateLabels(self):
+        """Get the derate strings for this type."""
+        return (xstr("takeoff_derate_b462"), None)
+
+    @property
+    def derateTemplate(self):
+        """Get the derate template for this aicraft type."""
+        return "Derate enabled: %s"
+
+#---------------------------------------------------------------------------------------
+
 mostFuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1,
                  const.FUELTANK_LEFT_AUX,
@@ -1040,5 +1072,6 @@
              const.AIRCRAFT_T134  : T134,
              const.AIRCRAFT_T154  : T154,
-             const.AIRCRAFT_YK40  : YK40 }
+             const.AIRCRAFT_YK40  : YK40,
+             const.AIRCRAFT_B462  : B462 }
 
 #---------------------------------------------------------------------------------------
Index: src/mlx/checks.py
===================================================================
--- src/mlx/checks.py	(revision 416)
+++ src/mlx/checks.py	(revision 453)
@@ -940,5 +940,6 @@
             if n1>5: numEnginesRunning += 1
 
-        if flight.stage==const.STAGE_PARKING:
+        if flight.stage==const.STAGE_PARKING or \
+           (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking):
             return numEnginesRunning<len(state.n1) \
                    and state.antiCollisionLightsOn
@@ -1050,6 +1051,6 @@
     def isCondition(self, flight, aircraft, oldState, state):
         """Check if the fault condition holds."""
-        return state.gLoad>2.0 and (flight.stage!=const.STAGE_LANDING or \
-                                    state.radioAltitude>=50)
+        return state.gLoad>2.0 and not state.onTheGround and \
+          (flight.stage!=const.STAGE_LANDING or state.radioAltitude>=50)
 
     def logFault(self, flight, aircraft, logger, oldState, state):
@@ -1118,5 +1119,7 @@
                  (flight.stage in
                   [const.STAGE_CRUISE, const.STAGE_DESCENT,
-                   const.STAGE_LANDING, const.STAGE_GOAROUND] or \
+                   const.STAGE_GOAROUND] or \
+                  (flight.stage==const.STAGE_LANDING  and
+                   state.groundSpeed>50.0) or \
                   ((not state.autoXPDR or \
                     (self._liftOffTime is not None and
@@ -1235,5 +1238,5 @@
 class OverspeedChecker(PatientFaultChecker):
     """Check if Vne has been exceeded."""
-    def __init__(self, timeout = 5.0):
+    def __init__(self, timeout = 30.0):
         """Construct the checker."""
         super(OverspeedChecker, self).__init__(timeout = timeout)
@@ -1304,4 +1307,5 @@
         return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING,
                                 const.STAGE_TAXIAFTERLAND] and \
+            state.reverser and \
             state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser)
 
@@ -1350,9 +1354,9 @@
     If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as
     saved as a provisional takeoff state. If the speed then decreases below 50
-    knots, or the plane remains on the ground for more than 20 seconds, a taxi
+    knots, or the plane remains on the ground for more than 40 seconds, a taxi
     speed error is logged with the highest ground speed detected. This state is
     also stored in the flight object as a possible
 
-    If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF,
+    If the plane becomes airborne within 40 seconds, the stage becomes TAKEOFF,
     and the previously saved takeoff state is logged.
 
@@ -1386,5 +1390,5 @@
                     aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF)
                     self._takeoffState = None
-                elif state.timestamp > (self._takeoffState.timestamp + 30):
+                elif state.timestamp > (self._takeoffState.timestamp + 40):
                     flight.setRTOState(self._highestSpeedState)
         elif self._takeoffState is not None:
Index: src/mlx/const.py
===================================================================
--- src/mlx/const.py	(revision 459)
+++ src/mlx/const.py	(revision 466)
@@ -11,5 +11,5 @@
 
 ## The version of the program
-VERSION="0.15.1"
+VERSION="0.17.1"
 
 #-------------------------------------------------------------------------------
@@ -95,4 +95,7 @@
 ## Aircraft type: Yakovlev Yak-40
 AIRCRAFT_YK40 = 15
+
+## Aircraft type: British Aerospace BAe-146
+AIRCRAFT_B462 = 17
 
 #-------------------------------------------------------------------------------
@@ -108,5 +111,6 @@
                  AIRCRAFT_B733, AIRCRAFT_B734, AIRCRAFT_B735,
                  AIRCRAFT_T154, AIRCRAFT_T134,
-                 AIRCRAFT_YK40, AIRCRAFT_DC3]
+                 AIRCRAFT_YK40, AIRCRAFT_DC3,
+                 AIRCRAFT_B462]
 
 #-------------------------------------------------------------------------------
@@ -129,5 +133,6 @@
               AIRCRAFT_T134  : "T134",
               AIRCRAFT_T154  : "T154",
-              AIRCRAFT_YK40  : "YK40" }
+              AIRCRAFT_YK40  : "YK40",
+              AIRCRAFT_B462  : "B462" }
 
 #-------------------------------------------------------------------------------
@@ -237,36 +242,4 @@
 #-------------------------------------------------------------------------------
 
-## Delay code: loading problems
-DELAYCODE_LOADING = 0
-
-## Delay code: VATSIM problem
-DELAYCODE_VATSIM = 1
-
-## Delay code: network problems
-DELAYCODE_NETWORK = 2
-
-## Delay code: controller's fault
-DELAYCODE_CONTROLLER = 3
-
-## Delay code: system crash or freeze
-DELAYCODE_SYSTEM = 4
-
-## Delay code: navigation problem
-DELAYCODE_NAVIGATION = 5
-
-## Delay code: traffic problems
-DELAYCODE_TRAFFIC = 6
-
-## Delay code: apron navigation
-DELAYCODE_APRON = 7
-
-## Delay code: weather problems
-DELAYCODE_WEATHER = 8
-
-## Delay code: personal reasons
-DELAYCODE_PERSONAL = 9
-
-#-------------------------------------------------------------------------------
-
 ## Message type: logger error
 # FIXME: cannot set the hotkey
Index: src/mlx/fsuipc.py
===================================================================
--- src/mlx/fsuipc.py	(revision 412)
+++ src/mlx/fsuipc.py	(revision 456)
@@ -1740,4 +1740,10 @@
         return "FSUIPC/Dreamwings Bombardier Dash 8-Q400"
 
+    def addMonitoringData(self, data, fsType):
+        """Add the model-specific monitoring data to the given array."""
+        super(DreamwingsDH8DModel, self).addMonitoringData(data, fsType)
+
+        self._addOffsetWithIndexMember(data, 0x132c, "d", "_dwdh8d_navgps")
+
     def getAircraftState(self, aircraft, timestamp, data):
         """Get the aircraft state.
@@ -1747,5 +1753,6 @@
                                                                   timestamp,
                                                                   data)
-        state.pitotHeatOn = not state.pitotHeatOn
+        if data[self._dwdh8d_navgps]==1:
+            state.apHeading = None
 
         return state
@@ -2043,4 +2050,31 @@
 #------------------------------------------------------------------------------
 
+class B462Model(GenericAircraftModel):
+    """Generic model for the British Aerospace BAe 146-200 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE,
+                 const.FUELTANK_RIGHT]
+
+    def __init__(self):
+        """Construct the model."""
+        super(B462Model, self). \
+            __init__(flapsNotches = [0, 18, 24, 30, 33],
+                     fuelTanks = B462Model.fuelTanks,
+                     numEngines = 4)
+
+    @property
+    def name(self):
+        """Get the name for this aircraft model."""
+        return "FSUIPC/Generic British Aerospace 146"
+
+    def getAircraftState(self, aircraft, timestamp, data):
+        """Get an aircraft state object for the given monitoring data.
+
+        This removes the reverser value for the middle engine."""
+        state = super(B462Model, self).getAircraftState(aircraft, timestamp, data)
+        state.reverser = []
+        return state
+
+#------------------------------------------------------------------------------
+
 _genericModels = { const.AIRCRAFT_B736  : B737Model,
                    const.AIRCRAFT_B737  : B737Model,
@@ -2058,5 +2092,6 @@
                    const.AIRCRAFT_T134  : T134Model,
                    const.AIRCRAFT_T154  : T154Model,
-                   const.AIRCRAFT_YK40  : YK40Model }
+                   const.AIRCRAFT_YK40  : YK40Model,
+                   const.AIRCRAFT_B462  : B462Model }
 
 #------------------------------------------------------------------------------
Index: src/mlx/gui/common.py
===================================================================
--- src/mlx/gui/common.py	(revision 401)
+++ src/mlx/gui/common.py	(revision 443)
@@ -73,4 +73,5 @@
 
     SHADOW_IN = gtk.SHADOW_IN
+    SHADOW_NONE = gtk.SHADOW_NONE
 
     POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC
@@ -86,4 +87,9 @@
 
     EVENT_BUTTON_PRESS = gdk.BUTTON_PRESS
+
+    TREE_VIEW_COLUMN_FIXED = gtk.TREE_VIEW_COLUMN_FIXED
+
+    FILL = gtk.FILL
+    EXPAND = gtk.EXPAND
 
     pixbuf_new_from_file = gdk.pixbuf_new_from_file
@@ -139,4 +145,5 @@
 
     SHADOW_IN = gtk.ShadowType.IN
+    SHADOW_NONE = gtk.ShadowType.NONE
 
     POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC
@@ -152,4 +159,9 @@
 
     EVENT_BUTTON_PRESS = gdk.EventType.BUTTON_PRESS
+
+    TREE_VIEW_COLUMN_FIXED = gtk.TreeViewColumnSizing.FIXED
+
+    FILL = gtk.AttachOptions.FILL
+    EXPAND = gtk.AttachOptions.EXPAND
 
     pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file
@@ -286,5 +298,6 @@
                   _const.AIRCRAFT_T134  : xstr("aircraft_t134"),
                   _const.AIRCRAFT_T154  : xstr("aircraft_t154"),
-                  _const.AIRCRAFT_YK40  : xstr("aircraft_yk40") }
+                  _const.AIRCRAFT_YK40  : xstr("aircraft_yk40"),
+                  _const.AIRCRAFT_B462  : xstr("aircraft_b462") }
 
 #------------------------------------------------------------------------------
Index: src/mlx/gui/delaycodes.py
===================================================================
--- src/mlx/gui/delaycodes.py	(revision 439)
+++ src/mlx/gui/delaycodes.py	(revision 439)
@@ -0,0 +1,368 @@
+# Module to handle the GUI aspects of the table of the delay codes
+
+#------------------------------------------------------------------------------
+
+from dcdata import CAPTION, DELAYCODE, getTable
+
+from mlx.gui.common import *
+
+import mlx.const as const
+
+#------------------------------------------------------------------------------
+
+if pygobject:
+
+#------------------------------------------------------------------------------
+
+    class Viewport(gtk.Viewport):
+        """Viewport implementation that alleviates the problem with improper
+        resizing by the VBox."""
+        def __init__(self):
+            """Construct the viewport."""
+            gtk.Viewport.__init__(self)
+            self._recursive = False
+            self._vboxHeight = None
+
+        def setVBOXHeight(self, vboxHeight):
+            """Set the height of the VBox which will be used to calculate the
+            viewport's height."""
+            self._vboxHeight = vboxHeight
+
+        def do_size_allocate(self, allocation):
+            """Called when the viewport's size is allocated.
+
+            The height in the allocation object is modified so that it is only
+            so high to fit into the VBox."""
+            if self._vboxHeight is not None:
+                allocation.height = self._vboxHeight - allocation.y
+                self._vboxHeight = None
+            gtk.Viewport.do_size_allocate(self, allocation)
+
+    class DelayCodeTableBase(gtk.VBox, gtk.Scrollable):
+        """PyGObject-specific base class for the delay code table."""
+        __gproperties__ = {
+            "vscroll-policy" : ( gtk.ScrollablePolicy,
+                                 "vscroll-policy",
+                                 "The vertical scrolling policy",
+                                 gtk.ScrollablePolicy.MINIMUM,
+                                 gobject.PARAM_READWRITE ),
+            "vadjustment" : ( gtk.Adjustment,
+                              "vadjustment",
+                              "The vertical adjustment",
+                              gobject.PARAM_READWRITE ),
+            "hscroll-policy" : ( gtk.ScrollablePolicy,
+                                 "hscroll-policy",
+                                 "The horizontal scrolling policy",
+                                 gtk.ScrollablePolicy.MINIMUM,
+                                 gobject.PARAM_READWRITE ),
+            "hadjustment" : ( gtk.Adjustment,
+                              "hadjustment",
+                              "The horizontal adjustment",
+                              gobject.PARAM_READWRITE )  }
+
+
+        @staticmethod
+        def _createViewport():
+            """Create an instance of the viewport class used by this base class."""
+            return Viewport()
+
+        def __init__(self):
+            """Construct the delay code table."""
+            super(DelayCodeTableBase, self).__init__()
+
+        def do_size_allocate(self, allocation):
+            """Allocate the size for the table and its children.
+
+            This sets up the VBox height in the viewport and then calls the
+            do_size_allocate() function of VBox()."""
+            self._viewport.setVBOXHeight(allocation.height)
+            gtk.VBox.do_size_allocate(self, allocation)
+            self.allocate_column_sizes(allocation)
+
+        def do_get_property(self, prop):
+            """Get the value of one of the properties defined above.
+
+            The request is forwarded to the viewport."""
+            if prop.name=="vscroll-policy":
+                return self._viewport.get_vscroll_policy()
+            elif prop.name=="hscroll-policy":
+                return self._viewport.get_hscroll_policy()
+            elif prop.name=="vadjustment":
+                return self._viewport.get_vadjustment()
+            elif prop.name=="hadjustment":
+                return self._viewport.get_hadjustment()
+            else:
+                raise AttributeError("mlx.gui.delaycodes.DelayCodeTableBase: property %s is not handled in do_get_property" %
+                                     (prop.name,))
+
+        def do_set_property(self, prop, value):
+            """Set the value of the adjustment properties defined above.
+
+            The adjustments are forwarded to the viewport."""
+            if prop.name=="vadjustment":
+                self._viewport.set_vadjustment(value)
+            elif prop.name=="hadjustment":
+                self._viewport.set_hadjustment(value)
+                self._treeView.set_hadjustment(value)
+            else:
+                raise AttributeError("mlx.gui.delaycodes.DelayCodeTableBase: property %s is not handled in do_set_property" %
+                                     (prop.name,))
+
+        def setStyle(self):
+            """Set the style of the event box from the treeview."""
+
+    class Alignment(gtk.Alignment):
+        """An alignment that remembers the width it was given."""
+        def __init__(self, xalign = 0.0, yalign=0.0,
+                     xscale = 0.0, yscale = 0.0 ):
+            """Construct the alignment."""
+            super(Alignment, self).__init__(xalign = xalign, yalign = yalign,
+                                            xscale = xscale, yscale = yscale)
+            self.allocatedWidth = 0
+
+        def do_size_allocate(self, allocation):
+            """Called with the new size allocation."""
+            self.allocatedWidth = allocation.width
+            gtk.Alignment.do_size_allocate(self, allocation)
+
+#------------------------------------------------------------------------------
+
+else: # pygobject
+
+#------------------------------------------------------------------------------
+
+    class DelayCodeTableBase (gtk.VBox):
+        """Base class of the delay code table for PyGtk."""
+
+        __gsignals__ = {
+            "set-scroll-adjustments": (
+                gobject.SIGNAL_RUN_LAST,
+                gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjustment))
+                }
+
+        @staticmethod
+        def _createViewport():
+            """Create an instance of the viewport class used by this base class."""
+            return gtk.Viewport()
+
+        def __init__(self):
+            """Construct the base class."""
+            super(DelayCodeTableBase, self).__init__()
+            self.set_set_scroll_adjustments_signal("set-scroll-adjustments")
+            self.connect("size-allocate", self._do_size_allocate)
+
+        def do_set_scroll_adjustments(self, hAdjustment, vAdjustment):
+            """Set the adjustments on the viewport."""
+            self._viewport.set_hadjustment(hAdjustment)
+            self._viewport.set_vadjustment(vAdjustment)
+            self._treeView.set_hadjustment(hAdjustment)
+
+        def _do_size_allocate(self, widget, allocation):
+            """Handler of the size-allocate signal.
+
+            Calls allocate_column_sizes()."""
+            self.allocate_column_sizes(allocation)
+
+        def setStyle(self):
+            """Set the style of the event box from the treeview."""
+            if self._treeView is not None:
+                style = self._treeView.rc_get_style()
+                self._eventBox.modify_bg(0, style.bg[2])
+                self._eventBox.modify_fg(0, style.fg[2])
+
+    class Alignment(gtk.Alignment):
+        """An alignment that remembers the width it was given."""
+        def __init__(self, xalign = 0.0, yalign=0.0,
+                     xscale = 0.0, yscale = 0.0 ):
+            """Construct the alignment."""
+            super(Alignment, self).__init__(xalign = xalign, yalign = yalign,
+                                            xscale = xscale, yscale = yscale)
+            self.allocatedWidth = 0
+            self.connect("size-allocate", self._do_size_allocate)
+
+        def _do_size_allocate(self, widget, allocation):
+            """Called with the new size allocation."""
+            self.allocatedWidth = allocation.width
+
+#------------------------------------------------------------------------------
+
+class CheckButton(gtk.CheckButton):
+    """A check button that contains a reference to a row in the delay code
+    data table."""
+    def __init__(self, delayCodeRow):
+        """Construct the check button."""
+        super(CheckButton, self).__init__()
+        self.delayCodeRow = delayCodeRow
+
+#------------------------------------------------------------------------------
+
+# CAPTION = 1
+
+# DELAYCODE = 2
+
+# _data1 = ( lambda row: row[0].strip(),
+#            ["Num", "Code", "Title", "Description"],
+#            [ (CAPTION, "Others"),
+#              (DELAYCODE, ("        6", "OA     ", "NO GATES/STAND AVAILABLE",
+#                           "Due to own airline activity")),
+#              (DELAYCODE, ("9", "SG", "SCHEDULED GROUND TIME",
+#                           "Planned turnaround time less than declared minimum")),
+#              (CAPTION, "Passenger and baggage"),
+#              (DELAYCODE, ("11", "PD", "LATE CHECK-IN",
+#                           "Check-in reopened for late passengers")),
+#              (DELAYCODE, ("12", "PL", "LATE CHECK-IN",
+#                           "Check-in not completed by flight closure time")),
+#              (DELAYCODE, ("13", "PE", "CHECK-IN ERROR",
+#                           "Error with passenger or baggage details")) ] )
+
+# _data2 = ( lambda row: row[0].strip(),
+#            ["MA", "IATA", "Description"],
+#            [ (CAPTION, "Passenger and baggage"),
+#              (DELAYCODE, (" 012", "01   ",
+#                           "Late shipping of parts and/or materials")),
+#              (DELAYCODE, (" 111", "11",
+#                           "Check-in reopened for late passengers")),
+#              (DELAYCODE, (" 121", "12",
+#                           "Check-in not completed by flight closure time")),
+#              (DELAYCODE, (" 132", "13",
+#                           "Error with passenger or baggage details"))
+#             ])
+
+#------------------------------------------------------------------------------
+
+class DelayCodeTable(DelayCodeTableBase):
+    """The delay code table."""
+    def __init__(self):
+        """Construct the delay code table."""
+        super(DelayCodeTable, self).__init__()
+
+        self._delayCodeData = None
+
+        self._treeView = gtk.TreeView(gtk.ListStore(str, str))
+        self._treeView.set_rules_hint(True)
+
+        self.pack_start(self._treeView, False, False, 0)
+
+        self._alignments = []
+        self._checkButtons = []
+
+        self._eventBox = gtk.EventBox()
+
+        self._table = None
+
+        self._viewport = self._createViewport()
+        self._viewport.add(self._eventBox)
+        self._viewport.set_shadow_type(SHADOW_NONE)
+
+        self.pack_start(self._viewport, True, True, 0)
+
+        self._previousWidth = 0
+
+    @property
+    def delayCodes(self):
+        """Get a list of the delay codes checked by the user."""
+        codes = []
+
+        if self._delayCodeData is not None:
+            codeExtractor = self._delayCodeData[0]
+            for checkButton in self._checkButtons:
+                if checkButton.get_active():
+                    codes.append(codeExtractor(checkButton.delayCodeRow))
+
+        return codes
+
+    def allocate_column_sizes(self, allocation):
+        """Allocate the column sizes."""
+        if allocation.width!=self._previousWidth:
+            self._previousWidth = allocation.width
+            index = 0
+            lastIndex = len(self._alignments) - 1
+            for alignment in self._alignments:
+                column = self._treeView.get_column(index)
+                width = alignment.allocatedWidth
+                width += 8 if (index==0 or index==lastIndex) else 16
+                column.set_fixed_width(width)
+                index += 1
+
+    def setType(self, aircraftType):
+        """Setup the delay code table according to the given aircraft type."""
+        self._delayCodeData = data = getTable(aircraftType)
+        if data is None:
+            return
+
+        columns = self._treeView.get_columns()
+        for column in columns:
+            self._treeView.remove_column(column)
+
+        (_extractor, headers, rows) = data
+        numColumns = len(headers) + 1
+        numRows = len(rows)
+
+        column = gtk.TreeViewColumn("", gtk.CellRendererText())
+        column.set_sizing(TREE_VIEW_COLUMN_FIXED)
+        self._treeView.append_column(column)
+
+        for header in headers:
+            column = gtk.TreeViewColumn(header, gtk.CellRendererText())
+            column.set_sizing(TREE_VIEW_COLUMN_FIXED)
+            self._treeView.append_column(column)
+
+        self._table = gtk.Table(numRows, numColumns)
+        self._table.set_homogeneous(False)
+        self._table.set_col_spacings(16)
+        self._table.set_row_spacings(4)
+        self._eventBox.add(self._table)
+
+        self._alignments = []
+        self._checkButtons = []
+
+        firstDelayCodeRow = True
+        for i in range(0, numRows):
+            (type, elements) = rows[i]
+            if type==CAPTION:
+                alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
+                                          xscale = 1.0)
+                label = gtk.Label("<b>" + elements + "</b>")
+                label.set_use_markup(True)
+                label.set_alignment(0.0, 0.5)
+                alignment.add(label)
+                self._table.attach(alignment, 1, numColumns, i, i+1,
+                                   yoptions = FILL)
+                self._table.set_row_spacing(i, 8)
+            elif type==DELAYCODE:
+                checkButton = CheckButton(elements)
+                self._checkButtons.append(checkButton)
+                alignment = Alignment(xalign = 0.5, yalign = 0.5, xscale = 1.0)
+                alignment.add(checkButton)
+                self._table.attach(alignment, 0, 1, i, i+1,
+                                   xoptions = FILL, yoptions = FILL)
+                if firstDelayCodeRow:
+                    self._alignments.append(alignment)
+
+                for j in range(0, numColumns-1):
+                    label = gtk.Label(elements[j])
+                    label.set_alignment(0.0, 0.5)
+                    alignment = Alignment(xalign = 0.5, yalign = 0.5,
+                                          xscale = 1.0)
+                    alignment.add(label)
+                    xoptions = FILL
+                    if j==(numColumns-2): xoptions |= EXPAND
+                    self._table.attach(alignment, j+1, j+2, i, i+1,
+                                       xoptions = xoptions, yoptions = FILL)
+                    if firstDelayCodeRow:
+                        self._alignments.append(alignment)
+                firstDelayCodeRow = False
+
+        self._previousWidth = 0
+        self.show_all()
+
+    def reset(self):
+        """Reset the delay code table."""
+        columns = self._treeView.get_columns()
+        for column in columns:
+            self._treeView.remove_column(column)
+        self._eventBox.remove(self._table)
+        self._table = None
+        self.show_all()
+
+#------------------------------------------------------------------------------
Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 413)
+++ src/mlx/gui/flight.py	(revision 436)
@@ -368,5 +368,5 @@
     def _loginClicked(self, button):
         """Called when the login button was clicked."""
-        print "mlx.flight.LoginPage: logged in"
+        print "mlx.flight.LoginPage: logging in"
         self._wizard.login(self._handleLoginResult,
                            self._pilotID.get_text(),
@@ -591,5 +591,5 @@
         flight = self._getSelectedFlight()
         self._wizard._bookedFlight = flight
-        self._wizard.gui.enableFlightInfo()
+        self._wizard.gui.enableFlightInfo(flight.aircraftType)
 
         self._updateDepartureGate()
Index: src/mlx/gui/gui.py
===================================================================
--- src/mlx/gui/gui.py	(revision 393)
+++ src/mlx/gui/gui.py	(revision 436)
@@ -486,7 +486,7 @@
             self.reset()
 
-    def enableFlightInfo(self):
+    def enableFlightInfo(self, aircraftType):
         """Enable the flight info tab."""
-        self._flightInfo.enable()
+        self._flightInfo.enable(aircraftType)
 
     def cancelFlight(self):
Index: src/mlx/gui/info.py
===================================================================
--- src/mlx/gui/info.py	(revision 349)
+++ src/mlx/gui/info.py	(revision 441)
@@ -1,4 +1,6 @@
 
 from common import *
+
+from mlx.gui.delaycodes import DelayCodeTable
 
 from mlx.i18n import xstr
@@ -21,18 +23,4 @@
     """The flight info tab."""
     @staticmethod
-    def _delayCodes():
-        """Get an array of delay codes."""
-        return [ (const.DELAYCODE_LOADING, xstr("info_delay_loading")),
-                 (const.DELAYCODE_VATSIM, xstr("info_delay_vatsim")),
-                 (const.DELAYCODE_NETWORK, xstr("info_delay_net")),
-                 (const.DELAYCODE_CONTROLLER, xstr("info_delay_atc")),
-                 (const.DELAYCODE_SYSTEM, xstr("info_delay_system")),
-                 (const.DELAYCODE_NAVIGATION, xstr("info_delay_nav")),
-                 (const.DELAYCODE_TRAFFIC, xstr("info_delay_traffic")),
-                 (const.DELAYCODE_APRON, xstr("info_delay_apron")),
-                 (const.DELAYCODE_WEATHER, xstr("info_delay_weather")),
-                 (const.DELAYCODE_PERSONAL, xstr("info_delay_personal")) ]
-
-    @staticmethod
     def _createCommentArea(label):
         """Create a comment area.
@@ -52,11 +40,7 @@
 
         scroller = gtk.ScrolledWindow()
-        # FIXME: these should be constants
-        scroller.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
-                            else gtk.POLICY_AUTOMATIC,
-                            gtk.PolicyType.AUTOMATIC if pygobject
-                            else gtk.POLICY_AUTOMATIC)
-        scroller.set_shadow_type(gtk.ShadowType.IN if pygobject
-                                 else gtk.SHADOW_IN)
+        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scroller.set_shadow_type(SHADOW_IN)
+
         comments = gtk.TextView()
         comments.set_wrap_mode(WRAP_WORD)
@@ -94,32 +78,23 @@
 
         alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                  xscale = 0.0, yscale = 0.0)
+                                  xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
                               padding_left = 8, padding_right = 8)
 
-        self._delayTable = table = gtk.Table(5, 2)
-        table.set_col_spacings(16)
+        self._delayCodeTable = table = DelayCodeTable()
+        self._delayWindow = scrolledWindow = gtk.ScrolledWindow()
+        scrolledWindow.add(table)
+        scrolledWindow.set_size_request(-1, 185)
+        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(SHADOW_IN)
 
-        row = 0
-        column = 0
-
-        self._delayCodeWidgets = []
-        for (_code, label) in FlightInfo._delayCodes():
-            button = gtk.CheckButton(label)
-            button.set_use_underline(True)
-            table.attach(button, column, column + 1, row, row + 1)
-            self._delayCodeWidgets.append(button)
-            if column==0:
-                column += 1
-            else:
-                row += 1
-                column = 0
-
-        alignment.add(table)
+        alignment.add(scrolledWindow)
         frame.add(alignment)
 
         self._delayAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                             xscale = 0.0, yscale = 0.0)
+                                             xscale = 1.0, yscale = 1.0)
         self._delayAlignment.add(frame)
+        self._delayAlignment.set_padding(padding_top = 0, padding_bottom = 0,
+                                         padding_left = 8, padding_right = 8)
 
         self.pack_start(self._delayAlignment, False, False, 8)
@@ -147,16 +122,13 @@
     def delayCodes(self):
         """Get the list of delay codes checked by the user."""
-        codes =  []
-        delayCodes = FlightInfo._delayCodes()
-        for index in range(0, len(delayCodes)):
-            if self._delayCodeWidgets[index].get_active():
-                codes.append(delayCodes[index][0])
-        return codes
+        return self._delayCodeTable.delayCodes
 
-    def enable(self):
+    def enable(self, aircraftType):
         """Enable the flight info tab."""
         self._comments.set_sensitive(True)
         self._flightDefects.set_sensitive(True)
-        self._delayTable.set_sensitive(True)
+        self._delayCodeTable.setType(aircraftType)
+        self._delayWindow.set_sensitive(True)
+        self._delayCodeTable.setStyle()
 
     def disable(self):
@@ -164,5 +136,6 @@
         self._comments.set_sensitive(False)
         self._flightDefects.set_sensitive(False)
-        self._delayTable.set_sensitive(False)
+        self._delayWindow.set_sensitive(False)
+        self._delayCodeTable.setStyle()
 
     def reset(self):
@@ -170,7 +143,5 @@
         self._comments.get_buffer().set_text("")
         self._flightDefects.get_buffer().set_text("")
-
-        for widget in self._delayCodeWidgets:
-            widget.set_active(False)
+        self._delayCodeTable.reset()
 
     def _commentsChanged(self, textbuffer):
Index: src/mlx/gui/pirep.py
===================================================================
--- src/mlx/gui/pirep.py	(revision 303)
+++ src/mlx/gui/pirep.py	(revision 437)
@@ -241,5 +241,5 @@
         for code in pirep.delayCodes:
             if delayCodes: delayCodes += ", "
-            delayCodes += PIREP.delayCodeNames[code]
+            delayCodes += code
         
         self._delayCodes.get_buffer().set_text(delayCodes)        
Index: src/mlx/pirep.py
===================================================================
--- src/mlx/pirep.py	(revision 401)
+++ src/mlx/pirep.py	(revision 437)
@@ -19,15 +19,4 @@
 class PIREP(object):
     """A pilot's report of a flight."""
-    delayCodeNames = { const.DELAYCODE_LOADING : "Loading Problems",
-                       const.DELAYCODE_NETWORK : "Net Problems",
-                       const.DELAYCODE_SYSTEM : "System Crash/Freezing",
-                       const.DELAYCODE_TRAFFIC : "Traffic Problems",
-                       const.DELAYCODE_WEATHER : "Weather Problems",
-                       const.DELAYCODE_VATSIM : "VATSIM Problem",
-                       const.DELAYCODE_CONTROLLER : "Controller's Fault",
-                       const.DELAYCODE_NAVIGATION : "Navigation Problem",
-                       const.DELAYCODE_APRON : "Apron Navigation Problems",
-                       const.DELAYCODE_PERSONAL : "Personal Reasons" }
-
     @staticmethod
     def _formatLine(timeStr, line):
@@ -140,5 +129,5 @@
             for code in self.delayCodes:
                 if s: s += ", "
-                s += PIREP.delayCodeNames[code]
+                s += code
             return s
 
Index: src/mlx/pyuipc_sim.py
===================================================================
--- src/mlx/pyuipc_sim.py	(revision 408)
+++ src/mlx/pyuipc_sim.py	(revision 443)
@@ -158,4 +158,7 @@
     ENGINE_3 = 2
 
+    ## Engine index: engine #4
+    ENGINE_4 = 3
+
     ## The number of hotkey entries
     HOTKEY_SIZE = 56
@@ -295,6 +298,6 @@
         self.visibility = 10000
 
-        self.n1 = [0.0, 0.0, 0.0]
-        self.throttles = [0.0, 0.0, 0.0]
+        self.n1 = [0.0, 0.0, 0.0, 0.0]
+        self.throttles = [0.0, 0.0, 0.0, 0.0]
 
         self.payloadCount = 1
@@ -328,4 +331,5 @@
         self.eng2DeIce = False
         self.eng3DeIce = False
+        self.eng4DeIce = False
         self.propDeIce = False
         self.structDeIce = False
@@ -427,4 +431,8 @@
         elif offset==0x09e2:       # Engine #3 de-ice
             return 1 if self.eng3DeIce else 0
+        elif offset==0x0a54:       # Engine #4 throttle
+            return self._getThrottle(self.ENGINE_4)
+        elif offset==0x0a7a:       # Engine #4 de-ice
+            return 1 if self.eng4DeIce else 0
         elif offset==0x0af4:       # Fuel weight
             return int(self.fuelWeight * 256.0)
@@ -533,4 +541,6 @@
             return self.n1[self.ENGINE_2]
         elif offset==0x2200:       # Engine #3 N1
+            return self.n1[self.ENGINE_3]
+        elif offset==0x2300:       # Engine #4 N1
             return self.n1[self.ENGINE_3]
         elif offset==0x2ea0:       # Elevator trim
@@ -695,4 +705,8 @@
         elif offset==0x09e2:       # Engine #3 de-ice
             self.eng3DeIce = value!=0
+        elif offset==0x0a54:       # Engine #4 throttle
+            self._setThrottle(self.ENGINE_4, value)
+        elif offset==0x0a7a:       # Engine #4 de-ice
+            self.eng4DeIce = value!=0
         elif offset==0x0af4:       # Fuel weight
             self.fuelWeight = value / 256.0
@@ -796,4 +810,6 @@
         elif offset==0x2200:       # Engine #3 N1
             self.n1[self.ENGINE_3] = value
+        elif offset==0x2300:       # Engine #4 N1
+            self.n1[self.ENGINE_4] = value
         elif offset==0x2ea0:       # Elevator trim
             self.elevatorTrim = value * 180.0 / math.pi
@@ -1413,4 +1429,6 @@
         self._valueHandlers["n1_3"] = ([(0x2200, "f")], lambda value: value,
                                        lambda word: float(word))
+        self._valueHandlers["n1_4"] = ([(0x2300, "f")], lambda value: value,
+                                       lambda word: float(word))
 
         self._valueHandlers["throttle_1"] = ([(0x088c, "H")],
@@ -1421,4 +1439,7 @@
                                              CLI.throttle2pyuipc)
         self._valueHandlers["throttle_3"] = ([(0x09bc, "H")],
+                                             CLI.pyuipc2throttle,
+                                             CLI.throttle2pyuipc)
+        self._valueHandlers["throttle_4"] = ([(0x0a54, "H")],
                                              CLI.pyuipc2throttle,
                                              CLI.throttle2pyuipc)
@@ -1490,4 +1511,6 @@
                                             CLI.bool2str, CLI.str2bool)
         self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")],
+                                            CLI.bool2str, CLI.str2bool)
+        self._valueHandlers["eng4Deice"] = ([(0x0a7a, "H")],
                                             CLI.bool2str, CLI.str2bool)
         self._valueHandlers["propDeice"] = ([(0x337c, "b")],
Index: src/mlx/web.py
===================================================================
--- src/mlx/web.py	(revision 401)
+++ src/mlx/web.py	(revision 443)
@@ -63,5 +63,6 @@
                       "TU3"  : const.AIRCRAFT_T134,
                       "TU5"  : const.AIRCRAFT_T154,
-                      "YK4"  : const.AIRCRAFT_YK40 }
+                      "YK4"  : const.AIRCRAFT_YK40,
+                      "146"  : const.AIRCRAFT_B462 }
 
     TYPE2TYPECODE = { const.AIRCRAFT_B736  : "736",
@@ -80,5 +81,6 @@
                       const.AIRCRAFT_T134  : "TU3",
                       const.AIRCRAFT_T154  : "TU5",
-                      const.AIRCRAFT_YK40  : "YK4" }
+                      const.AIRCRAFT_YK40  : "YK4",
+                      const.AIRCRAFT_B462  : "146" }
 
     @staticmethod
@@ -115,5 +117,5 @@
         departureTime = readline(f)
         self.departureTime = BookedFlight.getDateTime(date, departureTime)
-                                               
+
         arrivalTime = readline(f)
         self.arrivalTime = BookedFlight.getDateTime(date, arrivalTime)
@@ -130,11 +132,11 @@
         departureTime = None
         arrivalTime = None
-        
+
         line = f.readline()
-        lineNumber = 0    
+        lineNumber = 0
         while line:
             lineNumber += 1
             line = line.strip()
-            
+
             hashIndex = line.find("#")
             if hashIndex>=0: line = line[:hashIndex]
@@ -142,9 +144,9 @@
                 equalIndex = line.find("=")
                 lineOK = equalIndex>0
-                
+
                 if lineOK:
-                    key = line[:equalIndex].strip()                    
+                    key = line[:equalIndex].strip()
                     value = line[equalIndex+1:].strip().replace("\:", ":")
-                    
+
                     lineOK = key and value
 
@@ -196,5 +198,5 @@
             self.aircraftTypeName = \
                 BookedFlight.TYPE2TYPECODE[self.aircraftType]
-            
+
     def writeIntoFile(self, f):
         """Write the flight into a file."""
@@ -235,5 +237,5 @@
         else:
             raise Exception("Invalid aircraft type code: '" + typeCode + "'")
-        
+
     def __repr__(self):
         """Get a representation of the flight."""
@@ -248,5 +250,5 @@
         s += ">"
         return s
-        
+
 #------------------------------------------------------------------------------
 
@@ -279,5 +281,5 @@
     def __repr__(self):
         """Get the representation of the plane object."""
-        s = "<Plane: %s %s" % (self.tailNumber, 
+        s = "<Plane: %s %s" % (self.tailNumber,
                                "home" if self.status==const.PLANE_HOME else \
                                "away" if self.status==const.PLANE_AWAY else \
@@ -288,5 +290,5 @@
         s += ">"
         return s
-        
+
 
 #------------------------------------------------------------------------------
@@ -323,5 +325,5 @@
                 gateNumbers.add(p.gateNumber)
         return gateNumbers
-    
+
     def updatePlane(self, tailNumber, status, gateNumber = None):
         """Update the status of the given plane."""
@@ -330,10 +332,10 @@
             plane.status = status
             plane.gateNumber = gateNumber
-    
+
     def __iter__(self):
         """Get an iterator over the planes."""
         for plane in self._planes.itervalues():
             yield plane
-        
+
     def __getitem__(self, tailNumber):
         """Get the plane with the given tail number.
@@ -345,5 +347,5 @@
         """Get the representation of the fleet object."""
         return self._planes.__repr__()
-        
+
 #------------------------------------------------------------------------------
 
@@ -371,5 +373,5 @@
         s += ">"
         return s
-    
+
 #------------------------------------------------------------------------------
 
@@ -389,16 +391,16 @@
            "E" not in attrs or not attrs["E"]:
             return
-        
+
         icao = attrs["A"]
         if icao not in self._notams:
             return
-        
+
         begin = datetime.datetime.strptime(attrs["B"], "%Y-%m-%d %H:%M:%S")
 
         c = attrs["C"] if "C" in attrs else None
         end = datetime.datetime.strptime(c, "%Y-%m-%d %H:%M:%S") if c else None
-        
+
         permanent = attrs["C_flag"]=="PERM" if "C_flag" in attrs else False
-        
+
         repeatCycle = attrs["D"] if "D" in attrs else None
 
@@ -473,5 +475,5 @@
     """A login request."""
     iso88592decoder = codecs.getdecoder("iso-8859-2")
-    
+
     def __init__(self, callback, pilotID, password, entranceExam):
         """Construct the login request with the given pilot ID and
@@ -488,5 +490,5 @@
         md5.update(self._pilotID)
         pilotID = md5.hexdigest()
-        
+
         md5 = hashlib.md5()
         md5.update(self._password)
@@ -524,5 +526,5 @@
                 result.pilotName = self.iso88592decoder(readline(f))[0]
                 result.exams = readline(f)
-                
+
                 while True:
                     line = readline(f)
@@ -540,10 +542,10 @@
 
         return result
-        
+
 #------------------------------------------------------------------------------
 
 class GetFleet(Request):
     """Request to get the fleet from the website."""
-    
+
     def __init__(self, callback):
         """Construct the fleet request."""
@@ -558,5 +560,5 @@
         result.fleet = Fleet(f)
         f.close()
-        
+
         return result
 
@@ -585,13 +587,13 @@
                                  ("status", status),
                                  ("kapu", gateNumber)])
-        
+
         f = urllib2.urlopen(url, data, timeout = 10.0)
         line = readline(f)
-        
+
         result = Result()
         result.success = line == "OK"
 
         return result
-            
+
 #------------------------------------------------------------------------------
 
@@ -628,5 +630,5 @@
 
 class GetMETARs(Request):
-    """Get the METARs from the NOAA website for certain airport ICAOs."""    
+    """Get the METARs from the NOAA website for certain airport ICAOs."""
 
     def __init__(self, callback, airports):
@@ -639,5 +641,5 @@
         url = "http://www.aviationweather.gov/adds/dataserver_current/httpparam?"
         data = urllib.urlencode([ ("dataSource" , "metars"),
-                                  ("requestType",  "retrieve"), 
+                                  ("requestType",  "retrieve"),
                                   ("format", "csv"),
                                   ("stationString", " ".join(self._airports)),
@@ -652,5 +654,5 @@
                 if len(line)>5 and line[4]==' ':
                     icao = line[0:4]
-                    if icao in self._airports:                        
+                    if icao in self._airports:
                         result.metars[icao] = line.strip().split(",")[0]
         finally:
@@ -696,5 +698,5 @@
         data["bag"] = str(pirep.bagWeight)
         data["mail"] = str(pirep.mailWeight)
-        
+
         data["flttype"] = SendPIREP._flightTypes[pirep.flightType]
         data["onoff"] = "1" if pirep.online else "0"
@@ -742,5 +744,5 @@
             f.close()
 
-        return result    
+        return result
 #------------------------------------------------------------------------------
 
@@ -757,5 +759,5 @@
         """Perform the sending of the ACARS."""
         print "Sending the online ACARS"
-        
+
         url = "http://www.virtualairlines.hu/acars2/acarsonline.php"
 
@@ -766,10 +768,10 @@
         data["pid"] = acars.pid
         data["pilot"] = SendACARS._latin2Encoder(acars.pilotName)[0]
-    
+
         data["pass"] = str(bookedFlight.numPassengers)
         data["callsign"] = bookedFlight.callsign
         data["airplane"] = bookedFlight.aircraftTypeName
         data["from"] = bookedFlight.departureICAO
-        data["to"] = bookedFlight.arrivalICAO        
+        data["to"] = bookedFlight.arrivalICAO
         data["lajstrom"] = bookedFlight.tailNumber
 
@@ -779,5 +781,5 @@
         data["altitude"] = str(acars.state.altitude)
         data["speed"] = str(acars.state.groundSpeed)
-        
+
         data["event"] = acars.getEventText()
 
@@ -788,5 +790,5 @@
             f.close()
 
-        return result    
+        return result
 
 #------------------------------------------------------------------------------
@@ -813,7 +815,7 @@
         """Enqueue a fleet retrieval request."""
         self._addRequest(GetFleet(callback))
-        
+
     def updatePlane(self, callback, tailNumber, status, gateNumber = None):
-        """Update the status of the given plane."""        
+        """Update the status of the given plane."""
         self._addRequest(UpdatePlane(callback, tailNumber, status, gateNumber))
 
@@ -821,5 +823,5 @@
         """Get the NOTAMs for the given two airports."""
         self._addRequest(GetNOTAMs(callback, departureICAO, arrivalICAO))
-        
+
     def getMETARs(self, callback, airports):
         """Get the METARs for the given airports."""
@@ -833,5 +835,5 @@
         """Send the given ACARS"""
         self._addRequest(SendACARS(callback, acars))
-        
+
     def run(self):
         """Process the requests."""
@@ -844,5 +846,5 @@
 
             request.perform()
-    
+
     def _addRequest(self, request):
         """Add the given request to the queue."""
@@ -855,8 +857,8 @@
 if __name__ == "__main__":
     import time
-    
+
     def callback(returned, result):
         print returned, unicode(result)
-        
+
     handler = Handler()
     handler.start()
@@ -866,5 +868,5 @@
     # Plane: HA-LEG home (gate 67)
     #handler.updatePlane(callback, "HA-LQC", const.PLANE_AWAY, "72")
-    #time.sleep(3)    
+    #time.sleep(3)
     #handler.getFleet(callback)
     #time.sleep(3)
@@ -873,7 +875,7 @@
     #handler.getMETARs(callback, ["LHBP", "EPWA"])
     #time.sleep(5)
-    
+
     handler.updatePlane(callback, "HA-LON", const.PLANE_AWAY, "")
-    time.sleep(3)    
-
-#------------------------------------------------------------------------------
+    time.sleep(3)
+
+#------------------------------------------------------------------------------
