Ignore:
Files:
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • MLXMANIFEST

    r513 r510  
    77library/fnmatch.pyc     3414    4d50000f78e903598af06ef1c5cfb3ef
    88library/libexpat-1.dll  143096  701659d3689bf4a8265b669b7d774255
    9 library/gtk/_gtk.pyc    549     0d0a77cca8e542a13b7f8ed84ae3a547
     9library/gtk/_gtk.pyc    549     375cff8defe663bc7e8a404bafdbf319
    1010library/encodings/cp858.pyc     7591    02054a0b8e91b9758826eb70cddf096f
    1111library/mlx/pirep.pyc   4623    2a008f269c900fb604b94b4e427f61b5
     
    1313library/encodings/unicode_internal.pyc  2022    1e902113491e0c334b44deb0c8940e01
    1414library/libpango-1.0-0.dll      333729  5a14efd93ee27cfe960220fe4a904911
    15 library/mlx/gui/gui.pyc 51077   c54af5d2051a31bc3c46a7d690cd1552
     15library/mlx/gui/gui.pyc 50869   73790abccc30d5cbea66bd3801346221
    1616library/stat.pyc        2503    d3b6dc7a54e705219f04d0be75a212de
    1717library/posixpath.pyc   10734   d694316c239784c444b252c801c97efa
     
    2222doc/manual/hu/bugreport.png     12385   c71c7db56f19870ae5d6bb7f533d3679
    2323library/share/locale/hu/LC_MESSAGES/gtk20.mo    58794   6ee4491ae7bc9d3dfb778578eb29a0b3
    24 library/gobject/_gobject.pyc    573     92d29c5d8b466d18acef25eaa9cba97f
    25 locale/en/LC_MESSAGES/mlx.mo    61639   aa73425f6f3c43fa83be90b9909f369e
     24library/gobject/_gobject.pyc    573     15a834f99f84e8c25ded4c9b4f444d56
     25locale/en/LC_MESSAGES/mlx.mo    61484   921f96175cd9e4afd7c6b2317bc90cc0
    2626library/encodings/utf_7.pyc     1747    2beeb059236527197d6c640396476ce8
    2727doc/manual/hu/pirepViewer.png   26835   267e4325e550ed14ed22f86a2c7e8e9d
     
    6363library/encodings/utf_8.pyc     1806    4b8dee0284ea2f55c4142fcde7463524
    6464library/unicodedata.pyd 688128  c856c31a03dc892e4f2aee93d0bfee44
    65 locale/hu/LC_MESSAGES/mlx.mo    66240   db0a23e9f1d4657562180946ae340f22
     65locale/hu/LC_MESSAGES/mlx.mo    66076   971aaf421fda1cb5174dbf68b87aa8a7
    6666library/encodings/mac_roman.pyc 2716    4b4745eccfcb77860b70b374ac07fbcc
    6767library/copy_reg.pyc    4893    7a58bc441232056d1c123cd3375b3774
     
    7676library/_hashlib.pyd    287232  a1a18de0644f481749fcbcf26005eeaf
    7777doc/manual/en/monitorWindow.png 20886   42e08d10c758e21209c4c021f391dee7
    78 library/_hashlib.pyc    549     ec9a5e38a98eaf491bd44048fe3f8d16
     78library/_hashlib.pyc    549     3e6c18da5d87853e1652c77d4f40cf4e
    7979library/libpng14-14.dll 230529  f3a15497e25baaa721f96638d7a4d2f8
    8080library/copy.pyc        11674   30d1745c5e38ab170f8a0486fbebf305
     
    9090library/traceback.pyc   11223   50ace5c2c6c040a923082442da94cd78
    9191library/_weakrefset.pyc 9290    a56e87c491c0511cd329a3c8c4cd9563
    92 library/mlx/flight.pyc  17473   8b37fd80c11c3a89738f5e4e1cda5578
     92library/mlx/flight.pyc  17303   96ca499dc0257e7051e5895ca5a7a265
    9393library/urllib2.pyc     43566   7eb57ea0dcd1086d1d9073a5cefb0903
    9494doc/manual/en/flightSelection.png       29847   7817c8f5ed8d7fe64cf72d0addaf3e4a
     
    117117library/encodings/mac_latin2.pyc        4717    564dbaf5c296a147203eb821dc2466ba
    118118library/encodings/utf_16_be.pyc 1854    84a1d1465453727af051eaeeb853782f
    119 library/mlx/fsuipc.pyc  72456   eafa9e3e0e9bdff01306dfb2863de12b
     119library/mlx/fsuipc.pyc  72548   b2c4676aa9976a2f425ab624682e39aa
    120120library/xml/sax/__init__.pyc    3579    c78222ad1fd4f3dbdea06666fe74e84e
    121121doc/manual/en/connect.png       27436   5406dfe5408569cb95499c057bf0185b
     
    135135sounds/767taxi.mp3      160496  4cb43cda6e1214fbe15328a716827345
    136136doc/manual/en/prefsAdvanced.png 16169   64c14e0842c413cac98b92926279f3e0
    137 library/cairo/_cairo.pyc        561     6ac388cead1acc49e51e05d06033ad23
    138 library/win32file.pyc   552     e12cc4667c80e4f5fb88cf46ec92d734
     137library/cairo/_cairo.pyc        561     70beff493bb08d983e44f832660acb73
     138library/win32file.pyc   552     39519cf7cf18c04fc7b8b8010490f7dd
    139139library/encodings/cp865.pyc     7868    7d40a7ba053ac23339218be8799e5397
    140140library/lib/gtk-2.0/2.10.0/engines/libwimp.dll  97984   a5bbbe46e1363aba9020a76f2d58e9d6
     
    145145library/share/locale/hu/LC_MESSAGES/gtk20-properties.mo 167125  cd1b1b3693c1e3c74bfcea20be640cc6
    146146conn_red.png    914     860388cb7c3b26b2f348fdbee40780ce
    147 library/bz2.pyc 534     5595f0a4a8ffd0b63f7542fddc918028
     147library/bz2.pyc 534     4a83ab9de101cd0ce5b9b866f5661e85
    148148library/xml/sax/expatreader.pyc 13563   4f64c0efb2f1f8dbba84cdb5c6036f2d
    149149library/email/utils.pyc 8840    a7be428df6fddee6121cfce55382d1f8
     
    161161library/mlx/gui/statusbar.pyc   4812    87773f7d0bd28ed6250acf1972110ca8
    162162library/warnings.pyc    12666   9788b5f45765e8204e04c820f2711094
    163 mlxupdate.exe   18944   b8bf9f3d22348aa1f78727f81d967f93
    164 library/mlx/const.pyc   6710    2187949c18be095bada1927f3127d0cf
     163mlxupdate.exe   19456   e9a978949f7755311ad9e0db55f1e63c
     164library/mlx/const.pyc   6707    9375ae285d18c54e13107e5775868192
    165165library/email/errors.pyc        3229    cdb78ab237e195ad69f059128bc03b1d
    166166library/linecache.pyc   3091    666e6f81b0ea9a7637f8068493f738d5
     
    175175library/shlex.pyc       7282    cbe1a4823894c97c87d01f9d9faf5b8f
    176176library/cairo/__init__.pyc      142     010dd7cc8485565d5782d60e92e4ba34
    177 library/_ssl.pyc        537     d7b3b5f87a333acdf28a28f52c5c8ce7
     177library/_ssl.pyc        537     2cb40e7a5123a20f42dca69bbda9b17c
    178178library/encodings/iso8859_8.pyc 2717    f3ad6ce58cfac9e3ca86cf5c2fef092b
    179179library/encodings/iso2022_jp_1.pyc      1699    faed9d5747e982cec9fa8b3ad8e1de26
     
    196196library/encodings/cp1252.pyc    2676    b4c43cc72650c911cf3654dbaf565df9
    197197library/share/locale/hu/LC_MESSAGES/atk10.mo    8465    e3f3466da367215aad971d7b0394229d
    198 library/unicodedata.pyc 558     9570da5a79cb8e2156f6577185461f85
    199 library/select.pyc      543     ad5bc4844763975968138f81e1e9ac65
     198library/unicodedata.pyc 558     b3e806269dfb39ac4ab81ba5049f2458
     199library/select.pyc      543     0608a6239838009159f223f473ae2a6a
    200200library/encodings/uu_codec.pyc  4646    5282a5fcb676851224d2924aa3e48a9e
    201201library/ConfigParser.pyc        23857   1d17020dd0000ce0f73de812effa152f
     
    217217library/mlx/singleton.pyc       9184    3b71000d428959ab355db2658cea9557
    218218library/locale.pyc      48754   a51d20267132acc6bc66ac6252cf870f
    219 library/xplra.pyc       32012   50a1d9f19c0cc88783d264909ad1c678
    220219library/socket.pyc      15488   35f8eb455d6d8df8e19826d1dd7193f2
    221220sounds/notify.wav       119384  108025b17f67e61946df5d7fbf713cdb
     
    229228doc/manual/hu/flightInfoTab.png 28786   3e8af27775131f02696b0912ca441f36
    230229library/encodings/utf_8_sig.pyc 4625    1b1405db186e5819fa271ff96c1ca2c5
    231 library/pangocairo.pyc  555     33065d79493949ba073d7fc7b165004b
     230library/pangocairo.pyc  555     5ef32a4f4e2c28fa162011c342e3b789
    232231library/encodings/cp1255.pyc    2697    b265913c887f2e1c8736632b652c0093
    233232library/encodings/zlib_codec.pyc        4308    319c9073aff840436a03cc1fa0b08fb5
     
    236235doc/manual/hu/connect.png       28822   929f3eb85ee3cad019e12017c923f664
    237236library/encodings/palmos.pyc    2876    9284ad53dcfd82dfae0a79923b1cf91d
    238 library/mlx/web.pyc     30343   0cab98a640fd3937828d24c2fe8ef0ef
     237library/mlx/web.pyc     30343   d2e330da2cffcb9f4abc5f3b9941b2cb
    239238library/mlx/gui/gates.pyc       5384    9f6acad03872832505e31406a1b6762b
    240239library/email/feedparser.pyc    10682   4de6a63da8dc270c9881edb9c2f28508
     
    242241library/intl.dll        152489  eb2d4c4d4a527bc88a69a16cc99afcf5
    243242library/encodings/mbcs.pyc      1883    2213911a7dd0deada6799b63e18b695b
    244 library/pyuipc.pyc      543     c194030ac361f97edfcf756a91a949f1
     243library/pyuipc.pyc      543     bb664c97a351eb86af6fc2889e2cf07a
    245244sounds/TOC.mp3  273032  fae1be2ad25c8b54806bd1d759919705
    246245library/encodings/iso8859_4.pyc 2678    16f2fe7994051752360c533c052b892b
     
    266265doc/manual/hu/flightSelection.png       30815   e8bcdda6079c6b16ffa72ca62c21ca85
    267266library/win32pipe.pyd   24064   de374eded459293b2a7eb8ed8fb38eaa
    268 library/win32pipe.pyc   552     79ce5d61fe62ec37a212e8a854f2807b
     267library/win32pipe.pyc   552     3525d9ce759fb173fb5949768955a43c
    269268doc/manual/hu/cruise.png        27460   a2610173563e45baae1b0f9e63007ebd
    270269doc/manual/hu/logTab.png        28706   f48004202310bd2a1cb2f873d8064e93
    271270library/encodings/iso2022_jp_2004.pyc   1723    66376e788f3819e781897268c1100986
    272 library/win32event.pyc  555     63b964537d2e2157645cab4a6b90e68d
     271library/win32event.pyc  555     062a638079612d30bbf679ada15dd79b
    273272library/encodings/cp866.pyc     8103    f36418dcf93b17b3ced63bd544f44159
    274 library/gio/_gio.pyc    549     41b7fad0fabe6f41db16a6e05d415848
     273library/gio/_gio.pyc    549     332e8e3dcee26679a37beb64db0bc90b
    275274library/encodings/cp437.pyc     7874    63f1278c0a66129c6fb4f504d6b61b66
    276275doc/manual/hu/helpTab.png       27961   8e7cc4aeb8d7f40fcf186c7caf53583b
     
    295294library/mlx/gui/pirep.pyc       16749   7a295b28dbdad43b33c52d814be60792
    296295library/mimetypes.pyc   17806   927ce6a7079707aaee925e855ed23454
    297 library/_ctypes.pyc     546     d4c47f95473dc9d7b363d62b26db0a7e
     296library/_ctypes.pyc     546     e0cd0d88a4af0cd4307b0da1351b7c55
    298297sounds/F70taxi.mp3      154854  51332dc691d3519355f61ed06c959d8d
    299298library/encodings/cp857.pyc     7611    1b46c8959ac097b73e1c680d464cdc32
     
    313312library/repr.pyc        5045    82f0d89c685c3dacd941e01e4b2f31ef
    314313library/quopri.pyc      6352    87c42d94f753dd4c8a761cfa79453bb8
    315 library/mlx/gui/monitor.pyc     12214   6814c319b26ad7213e0759cf909c788d
     314library/mlx/gui/monitor.pyc     12021   71dd3fb4b634cb6ac20ee889ca3a09c0
    316315library/encodings/latin_1.pyc   2111    52427573ccbfd06220b67d5a9dd1376e
    317316library/mlx/update.pyc  16952   b4c0e85d094410aa0b7075476962730d
     
    322321doc/manual/en/gatesTab.png      29585   00ebc96a2b4a7473dbb6a3162a04192f
    323322library/bdb.pyc 17708   9a8fdcaa65f595c842689247847879d9
    324 library/mlx/gui/flight.pyc      112899  536e12fba696bbc0781e2b5e73e8ea54
     323library/mlx/gui/flight.pyc      111770  6991ddb672d43b8de56d6e8c30694ae7
    325324library/unittest/case.pyc       37758   1d2235e74c246b562c5c00ddf73c621a
    326325library/subprocess.pyc  38648   c9f749db06dfc9fb32079de51d6efd01
     
    338337library/encodings/cp863.pyc     7868    fc7ff06dab536b93c68fcb8e7bac713f
    339338library/xml/parsers/__init__.pyc        294     83f6a77ed8cd962b3c75c4779dc557ac
    340 library/pyexpat.pyc     546     3868a2225d9e99907f2cd9d97ef9a300
     339library/pyexpat.pyc     546     90f96a71a10eb1e06fe279e95e0dc139
    341340doc/manual/hu/gateSelection.png 29237   bac37e7001261a40a84e4202247f6052
    342341logo.png        69816   4a7517b22cfd75cc9c15e3fc1b7ebeec
     
    364363library/_socket.pyd     38400   5d273be76603399e88cf57f2605004bf
    365364sounds/ding.wav 80856   18e639792d3767436ac6955eb60e4f54
    366 library/_socket.pyc     546     e4eede84eacb1ffb8a725cfda432fb76
     365library/_socket.pyc     546     4f16cf07fdd8412d1ea8228238b1556c
    367366library/encodings/hex_codec.pyc 3520    a8b8d5b7c8810379c7007bcbc253951c
    368 library/mlx/checks.pyc  58567   d6c6eebab7a0a19c5f33007ce8b4c3e5
     367library/mlx/checks.pyc  58364   c7c535545956d5f434e36c67d398db5f
    369368doc/manual/en/statusIcon2.png   5875    71fc121823dee0a4c00715fac1b5665c
    370 library/mlx/sound.pyc   10001   78655c3a51de983d8e550934c05e1f30
     369library/mlx/sound.pyc   6326    19c542e4f40270f46e42ac087a3532b3
    371370doc/manual/en/pirepViewer.png   25098   7c545e70b995ac0f9fcae93fe5d0e899
    372371library/encodings/aliases.pyc   8750    75c22196420d0157fec085d285947a71
    373 library/glib/_glib.pyc  555     465b8ddc57386c9f7ef448d9cb802abd
     372library/glib/_glib.pyc  555     d24c8e5801a398eab8516b8707049127
    374373library/libpangowin32-1.0-0.dll 108945  d07f128828225b7cc38e9e590eb3ba8a
    375374library/encodings/iso8859_10.pyc        2693    5e6cc8f721486ddbc1c99da285e13191
    376 library/win32api.pyc    549     efb111e7d3dae80fd15bf47d026e6114
     375library/win32api.pyc    549     a5622f32da0646859ff8379bcc24a3b4
    377376library/gobject/constants.pyc   1957    2e9cdc605e7c449ef4fc23f56128acec
    378377library/libgtk-win32-2.0-0.dll  4938115 cc6dca192aca6f91bd96a5b5f86e036d
    379378doc/manual/hu/calloutsEditor.png        16026   fede870894a85e5d21ca16a026aa6a98
    380 library/mlx/xplane.pyc  66878   9ee20e3efd68fd414ca3b4716c1f2985
    381379library/ssl.pyc 13785   d90c880699ecbedb3182f556b9733868
    382380library/tempfile.pyc    18526   e2cc2d63c29e15f20ee9325e790643a3
     
    421419library/libgthread-2.0-0.dll    44287   7ad6f303082b382bff7bafbab246c61f
    422420library/glib._glib.pyd  58368   0de636503e43c4eb00e80927bc9bda97
    423 library/mlx/config.pyc  30521   406992cc40c69fc2054e02d516088ba9
    424 library/atk.pyc 534     7e987d4ee2de16ac0050d9e1944a860a
     421library/mlx/config.pyc  29918   fca1bd8ff8948570ce4ff0a673cd99e3
     422library/atk.pyc 534     58aa8ee24d8a61d0e2b15eb6b9200897
    425423library/gio._gio.pyd    263168  acb8c95fdc391079bebdf7d8685b0dbc
    426424library/encodings/cp861.pyc     7868    c97a8970ce4d9f40cbafbea6576fbdca
     
    432430library/__future__.pyc  4177    43d264d951ac2085334c7b9dd4558595
    433431library/logging/__init__.pyc    54813   7bcdf2e8da474f5e94d8e499f6fc3ed4
    434 runmlx.exe      63488   3060aa0ed73648edc26992e224568352
     432runmlx.exe      64000   7e0ddfc5d67212ce2da74aa6b1b5b08e
    435433library/optparse.pyc    51253   39594a40bc1222173d57b7d5740e3d92
    436 library/mlx/fs.pyc      11803   268cda55420c4ce0750029ea203155e6
     434library/mlx/fs.pyc      11756   a758a6bd0c7cc28dbc9e3c0a33fe18d1
    437435doc/manual/en/takeoff.png       26128   63fb0227347eba88fe4f108d730dc8c0
    438436library/unittest/result.pyc     7444    aefbb3cc79c0ff17787ce84faed7f5e8
     
    445443library/glib/option.pyc 11891   bd90183c75d8f473ecf653e3d63a27f9
    446444library/StringIO.pyc    11100   f4eb4a2bb3d6fb0af925681c5375c673
    447 library/pango.pyc       540     1b3d8d42905b120b95525147e2fd4b0a
     445library/pango.pyc       540     52e336c3a5a39745e9a075b943482f9c
    448446Microsoft.VC90.CRT/msvcp90.dll  568832  6de5c66e434a9c1729575763d891c6c2
    449447library/sre_parse.pyc   18380   fe2376a101668be1124f9ee316662bab
  • locale/en/mlx.po

    r513 r512  
    470470msgid "connect_gate"
    471471msgstr "Gate:"
    472 
    473 msgid "connect_sim"
    474 msgstr "Simulator:"
    475 
    476 msgid "connect_sim_msfs"
    477 msgstr "_MS FS"
    478 
    479 msgid "connect_sim_xplane"
    480 msgstr "_X-Plane"
    481472
    482473msgid "button_connect"
  • locale/hu/mlx.po

    r513 r512  
    473473msgstr "Kapu:"
    474474
    475 msgid "connect_sim"
    476 msgstr "Szimulátor:"
    477 
    478 msgid "connect_sim_msfs"
    479 msgstr "_MS FS"
    480 
    481 msgid "connect_sim_xplane"
    482 msgstr "_X-Plane"
    483 
    484475msgid "button_connect"
    485476msgstr "K_apcsolódás"
  • setup.py

    r497 r378  
    6666      package_dir = { "" : "src" },
    6767      packages = ["mlx", "mlx.gui"],
    68       requires = ["pyuipc", "xplra"],
     68      requires = ["pyuipc"],
    6969      windows = [{ "script" : "runmlx.py",
    7070                   "icon_resources" : [(1, "logo.ico")]},
  • src/mlx/checks.py

    r496 r480  
    957957        """Check if the fault condition holds."""
    958958        if flight.stage==const.STAGE_CRUISE:
    959             isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \
    960                            (flight.fsType==const.SIM_XPLANE10 or
    961                             flight.fsType==const.SIM_XPLANE9)
    962             bankLimit = 35 if isDH8DXplane else 30
     959            bankLimit = 30
    963960        elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB,
    964961                              const.STAGE_DESCENT, const.STAGE_LANDING]:
     
    971968    def logFault(self, flight, aircraft, logger, oldState, state):
    972969        """Log the fault."""
    973         message = "Bank too steep (%.1f)" % (state.bank,)
    974970        flight.handleFault(BankChecker, state.timestamp,
    975                            FaultChecker._appendDuring(flight, message),
     971                           FaultChecker._appendDuring(flight, "Bank too steep"),
    976972                           2)
    977973
  • src/mlx/config.py

    r503 r486  
    236236        self._pirepAutoSave = False
    237237
    238         self._defaultMSFS = os.name=="nt"
    239 
    240238        self._enableSounds = not secondaryInstallation
    241239
     
    473471        if pirepAutoSave!=self._pirepAutoSave:
    474472            self._pirepAutoSave = pirepAutoSave
    475             self._modified = True
    476 
    477     @property
    478     def defaultMSFS(self):
    479         """Get if the default simulator type is MS FS."""
    480         return self._defaultMSFS
    481 
    482     @defaultMSFS.setter
    483     def defaultMSFS(self, defaultMSFS):
    484         """Set if the default simulator type is MS FS."""
    485         if defaultMSFS!=self._defaultMSFS:
    486             self._defaultMSFS = defaultMSFS
    487473            self._modified = True
    488474
     
    718704                ApproachCallouts.fromConfig(config, aircraftType)
    719705
    720         self._defaultMSFS = self._getBoolean(config, "general",
    721                                              "defaultMSFS", os.name=="nt")
    722 
    723706        self._modified = False
    724707
     
    763746                   "yes" if self._pirepAutoSave else "no")
    764747
    765         config.set("general", "defaultMSFS",
    766                    "yes" if self._defaultMSFS else "no")
    767 
    768748        config.add_section(Config._messageTypesSection)
    769749        for messageType in const.messageTypes:
     
    910890        print "  pirepAutoSave:", self._pirepAutoSave
    911891
    912         print "  defaultMSFS:", self._defaultMSFS
    913 
    914892        print "  enableSounds:", self._enableSounds
    915893
  • src/mlx/const.py

    r516 r514  
    1111
    1212## The version of the program
    13 VERSION="0.20xpl"
     13VERSION="0.20"
    1414
    1515#-------------------------------------------------------------------------------
  • src/mlx/flight.py

    r430 r391  
    8686        """Get the flight stage."""
    8787        return self._stage
    88 
    89     @property
    90     def fsType(self):
    91         """Get the flight simulator type."""
    92         return self._gui.fsType
    9388
    9489    @property
  • src/mlx/fs.py

    r501 r408  
    33from sound import startSound
    44
    5 import os
    6 
    75import fsuipc
    8 import xplane
    9 
    106import threading
    117import time
     
    6056    FIXME: add info
    6157    """
    62     if type in [const.SIM_MSFS9, const.SIM_MSFSX]:
    63         return fsuipc.Simulator(connectionListener, connectAttempts = 3)
    64     elif type in [const.SIM_XPLANE9, const.SIM_XPLANE10]:
    65         return xplane.Simulator(connectionListener, connectAttempts = 3)
    66     else:
    67         "Only MS Flight Simulator 2004 and X or X-Plane 9 and 10 are supported"
     58    assert type in [const.SIM_MSFS9, const.SIM_MSFSX], \
     59           "Only MS Flight Simulator 2004 and X are supported"
     60    return fsuipc.Simulator(connectionListener, connectAttempts = 3)
    6861
    6962#-------------------------------------------------------------------------------
     
    9790        with self._requestCondition:
    9891            self._toQuit = True
    99             self._requestCondition.notify()
     92            self._requestCondition.notifty()
    10093        self.join()
    10194
  • src/mlx/gui/flight.py

    r513 r512  
    880880                                          completedHelp = xstr("connect_chelp"))
    881881
    882         self._selectSimulator = os.name=="nt" or "FORCE_SELECT_SIM" in os.environ
    883 
    884882        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
    885883                                  xscale = 0.0, yscale = 0.0)
    886884
    887         table = gtk.Table(7 if self._selectSimulator else 5, 2)
     885        table = gtk.Table(5, 2)
    888886        table.set_row_spacings(4)
    889887        table.set_col_spacings(16)
     
    951949        labelAlignment.add(self._departureGate)
    952950        table.attach(labelAlignment, 1, 2, 4, 5)
    953 
    954         if self._selectSimulator:
    955             labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0, yalign=0.5)
    956             label = gtk.Label(xstr("connect_sim"))
    957             labelAlignment.add(label)
    958             table.attach(labelAlignment, 0, 1, 5, 7)
    959 
    960             selectAlignment = gtk.Alignment(xalign=0.0, xscale=0.0, yalign=0.5)
    961 
    962             selectBox = gtk.HBox()
    963             if pygobject:
    964                 self._selectMSFS = \
    965                   gtk.RadioButton.new_with_mnemonic_from_widget(None,
    966                                                                 xstr("connect_sim_msfs"))
    967             else:
    968                 self._selectMSFS = gtk.RadioButton(None,
    969                                                    xstr("connect_sim_msfs"))
    970 
    971             selectBox.pack_start(self._selectMSFS, False, False, 0);
    972 
    973             if pygobject:
    974                 self._selectXPlane = \
    975                   gtk.RadioButton.new_with_mnemonic_from_widget(self._selectMSFS,
    976                                                                 xstr("connect_sim_xplane"))
    977             else:
    978                 self._selectXPlane = gtk.RadioButton(self._selectMSFS,
    979                                                      xstr("connect_sim_xplane"))
    980 
    981             selectBox.pack_start(self._selectXPlane, False, False, 8);
    982 
    983             selectAlignment.add(selectBox)
    984             table.attach(selectAlignment, 1, 2, 5, 7)
    985 
    986951
    987952        self.addCancelFlightButton()
     
    1017982        self._departureGate.set_markup(gate)
    1018983
    1019         if self._selectSimulator:
    1020             config = self._wizard.gui.config
    1021             self._selectMSFS.set_active(config.defaultMSFS)
    1022             self._selectXPlane.set_active(not config.defaultMSFS)
    1023 
    1024984    def finalize(self):
    1025985        """Finalize the page."""
     
    1036996    def _connectClicked(self, button):
    1037997        """Called when the Connect button is pressed."""
    1038         if self._selectSimulator:
    1039             simulatorType = const.SIM_MSFS9 if self._selectMSFS.get_active() \
    1040                                             else const.SIM_XPLANE10
    1041         else:
    1042             simulatorType = const.SIM_MSFS9 if os.name=="nt" \
    1043               else const.SIM_XPLANE10
    1044 
    1045         config = self._wizard.gui.config
    1046         config.defaultMSFS = simulatorType == const.SIM_MSFS9
    1047         config.save()
    1048 
    1049         self._wizard._connectSimulator(simulatorType)
     998        self._wizard._connectSimulator()
    1050999
    10511000    def _forwardClicked(self, button):
     
    36243573        self.gui.rtoToggled(indicated)
    36253574
    3626     def _connectSimulator(self, simulatorType):
     3575    def _connectSimulator(self):
    36273576        """Connect to the simulator."""
    3628         self.gui.connectSimulator(self._bookedFlight.aircraftType,
    3629                                   simulatorType)
     3577        self.gui.connectSimulator(self._bookedFlight.aircraftType)
    36303578
    36313579    def _arrivalMETARCallback(self, returned, result):
  • src/mlx/gui/gui.py

    r501 r491  
    6969        self._flight = None
    7070        self._simulator = None
    71         self._fsType = None
    7271        self._monitoring = False
    7372
     
    209208
    210209    @property
    211     def fsType(self):
    212         """Get the flight simulator type."""
    213         return self._fsType
    214 
    215     @property
    216210    def entranceExam(self):
    217211        """Get whether an entrance exam is about to be taken."""
     
    434428            self._wizard.connected(fsType, descriptor)
    435429        self._reconnecting = False
    436         self._fsType = fsType
    437430        self._listenHotkeys()
    438431
     
    519512        """Reset the GUI."""
    520513        self._disconnect()
    521 
    522         self._simulator = None
    523514
    524515        self._flightInfo.reset()
     
    896887            self._stdioStartingLine = False
    897888
    898     def connectSimulator(self, aircraftType, simulatorType):
     889    def connectSimulator(self, aircraftType):
    899890        """Connect to the simulator for the first time."""
    900891        self._logger.reset()
     
    907898
    908899        if self._simulator is None:
    909             self._simulator = fs.createSimulator(simulatorType, self)
     900            self._simulator = fs.createSimulator(const.SIM_MSFS9, self)
    910901            fs.setupMessageSending(self.config, self._simulator)
    911902            self._setupTimeSync()
  • src/mlx/gui/monitor.py

    r496 r480  
    226226        table.attach(label, 0, 1, 8, 9)
    227227        table.attach(self._qnh, 1, 2, 8, 9)
    228 
    229         (label, self._cog) = self._createLabeledEntry("CoG:", 7)
    230         table.attach(label, 2, 3, 8, 9)
    231         table.attach(self._cog, 3, 4, 8, 9)
    232228
    233229        alignment.add(table)
     
    316312            self._adf2.set_text("-")
    317313            self._qnh.set_text("-")
    318             self._cog.set_text("-")
    319314        else:
    320315            self._timestamp.set_text(time.strftime("%H:%M:%S",
     
    391386            self._gearControlDown.set_sensitive(aircraftState.gearControlDown)
    392387            self._gearsDown.set_sensitive(aircraftState.gearsDown)
    393             self._spoilersArmed.set_sensitive(aircraftState.spoilersArmed is True)
     388            self._spoilersArmed.set_sensitive(aircraftState.spoilersArmed)
    394389            self._spoilersExtension.set_text("%.0f" % (aircraftState.spoilersExtension,))
    395390            self._windSpeed.set_text("%.0f" % (aircraftState.windSpeed,))
     
    409404            self._adf1.set_text("-" if aircraftState.adf1 is None else aircraftState.adf1)
    410405            self._adf2.set_text("-" if aircraftState.adf2 is None else aircraftState.adf2)
    411             self._cog.set_text("%.2f%%" % (aircraftState.cog*100.0,))
    412406
    413407#------------------------------------------------------------------------------
  • src/mlx/sound.py

    r422 r401  
    166166    def startSound(name, finishCallback = None, extra = None):
    167167        """Start playing back the given sound.
    168 
     168       
    169169        name should be the name of a sound file relative to the sound directory
    170170        given in initializeSound."""
    171171        _thread.requestSound(name, finishCallback = finishCallback,
    172172                             extra = extra)
    173 
     173       
    174174#------------------------------------------------------------------------------
    175175
    176176else: # os.name!="nt"
    177     import threading
    178     try:
    179         import pyglet
    180 
    181         class SoundThread(threading.Thread):
    182             """A thread executing the pyglet event loop that directs the
    183             playback of the sound files."""
    184             class Player(pyglet.media.ManagedSoundPlayer):
    185                 """Player which handles the end-of-stream condition
    186                 properly."""
    187 
    188                 def __init__(self, finishCallback, extra):
    189                     """Construct the player with the given data."""
    190                     super(SoundThread.Player, self).__init__()
    191 
    192                     self._finishCallback = finishCallback
    193                     self._extra = extra
    194 
    195                 def _on_eos(self):
    196                     if self._finishCallback is not None:
    197                         self._finishCallback(True, self._extra)
    198                     return super(SoundThread.Player, self)._on_eos()
    199 
    200             class EventLoop(pyglet.app.EventLoop):
    201                 """Own implementation of the event loop that collects the
    202                 requested sound files and plays them."""
    203 
    204                 def __init__(self, soundsDirectory):
    205                     """Construct the event loop."""
    206                     super(SoundThread.EventLoop, self).__init__()
    207 
    208                     self._soundsDirectory = soundsDirectory
    209 
    210                     self._lock = threading.Lock()
    211                     self._requestedSounds = []
    212 
    213                 def startSound(self, name, finishCallback, extra):
    214                     """Add the sound with the given name"""
    215                     with self._lock:
    216                         path = os.path.join(self._soundsDirectory, name)
    217                         self._requestedSounds.append( (path,
    218                                                        finishCallback, extra) )
    219 
    220                 def idle(self):
    221                     """The idle callback."""
    222                     with self._lock:
    223                         requestedSounds = self._requestedSounds
    224                         self._requestedSounds = []
    225 
    226                     for (path, finishCallback, extra) in requestedSounds:
    227                         try:
    228                             media = pyglet.media.load(path)
    229                             player = SoundThread.Player(finishCallback, extra)
    230                             player.queue(media)
    231                             player.play()
    232                         except Exception, e:
    233                             print "mlx.SoundThread.EventLoop.idle: " + str(e)
    234                             if finishCallback is not None:
    235                                 finishCallback(False, extra)
    236 
    237                     timeout = super(SoundThread.EventLoop, self).idle()
    238                     return 0.1 if timeout is None else min(timeout, 0.1)
    239 
    240             def __init__(self, soundsDirectory):
    241                 """Construct the sound playing thread with the given
    242                 directory."""
    243                 super(SoundThread, self).__init__()
    244 
    245                 self.daemon = True
    246                 self.eventLoop = SoundThread.EventLoop(soundsDirectory)
    247 
    248             def run(self):
    249                 """Run the event loop."""
    250                 self.eventLoop.run()
    251 
    252             def startSound(self, name, finishCallback = None, extra = None):
    253                 """Start the playback of the given sound."""
    254                 self.eventLoop.startSound(name, finishCallback, extra)
    255 
    256         _thread = None
    257 
    258         def initializeSound(soundsDirectory):
    259             """Initialize the sound handling with the given directory containing
    260             the sound files."""
    261             global _thread
    262             _thread = SoundThread(soundsDirectory)
    263             _thread.start()
    264 
    265 
    266         def startSound(name, finishCallback = None, extra = None):
    267             """Start playing back the given sound."""
    268             _thread.startSound(name, finishCallback = finishCallback,
    269                                extra = extra)
    270 
    271     except:
    272         print "The pyglet library is missing from your system. It is needed for sound playback on Linux"
    273         def initializeSound(soundsDirectory):
    274             """Initialize the sound handling with the given directory containing
    275             the sound files."""
    276             pass
    277 
    278         def startSound(name, finishCallback = None, extra = None):
    279             """Start playing back the given sound.
    280 
    281             FIXME: it does not do anything currently, but it should."""
    282             print "sound.startSound:", name
     177    def initializeSound(soundsDirectory):
     178        """Initialize the sound handling with the given directory containing
     179        the sound files."""
     180        pass
     181
     182    def startSound(name, finishCallback = None, extra = None):
     183        """Start playing back the given sound.
     184
     185        FIXME: it does not do anything currently, but it should."""
     186        print "sound.startSound:", name
    283187
    284188#------------------------------------------------------------------------------
     
    288192    def callback(result, extra):
    289193        print "callback", result, extra
    290 
     194   
    291195    initializeSound("e:\\home\\vi\\tmp")
    292196    startSound("malev.mp3", finishCallback = callback, extra="malev.mp3")
Note: See TracChangeset for help on using the changeset viewer.