Changeset 501:2fd9b3270f6d
- Timestamp:
- 04/07/13 07:09:14 (12 years ago)
- Branch:
- xplane
- Phase:
- public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r491 r501 470 470 msgid "connect_gate" 471 471 msgstr "Gate:" 472 473 msgid "connect_sim" 474 msgstr "Simulator:" 475 476 msgid "connect_sim_msfs" 477 msgstr "FS_9/FSX" 478 479 msgid "connect_sim_xplane" 480 msgstr "_X-Plane 9/10" 472 481 473 482 msgid "button_connect" -
locale/hu/mlx.po
r491 r501 473 473 msgstr "Kapu:" 474 474 475 msgid "connect_sim" 476 msgstr "Szimulátor:" 477 478 msgid "connect_sim_msfs" 479 msgstr "FS_9/FSX" 480 481 msgid "connect_sim_xplane" 482 msgstr "_X-Plane 9/10" 483 475 484 msgid "button_connect" 476 485 msgstr "K_apcsolódás" -
src/mlx/fs.py
r499 r501 97 97 with self._requestCondition: 98 98 self._toQuit = True 99 self._requestCondition.notif ty()99 self._requestCondition.notify() 100 100 self.join() 101 101 -
src/mlx/gui/flight.py
r436 r501 880 880 completedHelp = xstr("connect_chelp")) 881 881 882 self._selectSimulator = os.name=="nt" or "FORCE_SELECT_SIM" in os.environ 883 882 884 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 883 885 xscale = 0.0, yscale = 0.0) 884 886 885 table = gtk.Table( 5, 2)887 table = gtk.Table(7 if self._selectSimulator else 5, 2) 886 888 table.set_row_spacings(4) 887 889 table.set_col_spacings(16) … … 949 951 labelAlignment.add(self._departureGate) 950 952 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 951 986 952 987 self.addCancelFlightButton() … … 982 1017 self._departureGate.set_markup(gate) 983 1018 1019 if self._selectSimulator: 1020 self._selectMSFS.set_active(os.name=="nt") 1021 self._selectXPlane.set_active(os.name!="nt") 1022 984 1023 def finalize(self): 985 1024 """Finalize the page.""" … … 996 1035 def _connectClicked(self, button): 997 1036 """Called when the Connect button is pressed.""" 998 self._wizard._connectSimulator() 1037 if self._selectSimulator: 1038 simulatorType = const.SIM_MSFS9 if self._selectMSFS.get_active() \ 1039 else const.SIM_XPLANE10 1040 else: 1041 simulatorType = const.SIM_MSFS9 if os.name=="nt" \ 1042 else const.SIM_XPLANE10 1043 self._wizard._connectSimulator(simulatorType) 999 1044 1000 1045 def _forwardClicked(self, button): … … 3494 3539 self.gui.rtoToggled(indicated) 3495 3540 3496 def _connectSimulator(self ):3541 def _connectSimulator(self, simulatorType): 3497 3542 """Connect to the simulator.""" 3498 self.gui.connectSimulator(self._bookedFlight.aircraftType) 3543 self.gui.connectSimulator(self._bookedFlight.aircraftType, 3544 simulatorType) 3499 3545 3500 3546 def _arrivalMETARCallback(self, returned, result): -
src/mlx/gui/gui.py
r496 r501 520 520 self._disconnect() 521 521 522 self._simulator = None 523 522 524 self._flightInfo.reset() 523 525 self._flightInfo.disable() … … 894 896 self._stdioStartingLine = False 895 897 896 def connectSimulator(self, aircraftType ):898 def connectSimulator(self, aircraftType, simulatorType): 897 899 """Connect to the simulator for the first time.""" 898 900 self._logger.reset() … … 905 907 906 908 if self._simulator is None: 907 self._simulator = fs.createSimulator( const.SIM_MSFS9, self)909 self._simulator = fs.createSimulator(simulatorType, self) 908 910 fs.setupMessageSending(self.config, self._simulator) 909 911 self._setupTimeSync()
Note:
See TracChangeset
for help on using the changeset viewer.