- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r513 r512 880 880 completedHelp = xstr("connect_chelp")) 881 881 882 self._selectSimulator = os.name=="nt" or "FORCE_SELECT_SIM" in os.environ883 884 882 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 885 883 xscale = 0.0, yscale = 0.0) 886 884 887 table = gtk.Table( 7 if self._selectSimulator else5, 2)885 table = gtk.Table(5, 2) 888 886 table.set_row_spacings(4) 889 887 table.set_col_spacings(16) … … 951 949 labelAlignment.add(self._departureGate) 952 950 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 986 951 987 952 self.addCancelFlightButton() … … 1017 982 self._departureGate.set_markup(gate) 1018 983 1019 if self._selectSimulator:1020 config = self._wizard.gui.config1021 self._selectMSFS.set_active(config.defaultMSFS)1022 self._selectXPlane.set_active(not config.defaultMSFS)1023 1024 984 def finalize(self): 1025 985 """Finalize the page.""" … … 1036 996 def _connectClicked(self, button): 1037 997 """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() 1050 999 1051 1000 def _forwardClicked(self, button): … … 3624 3573 self.gui.rtoToggled(indicated) 3625 3574 3626 def _connectSimulator(self , simulatorType):3575 def _connectSimulator(self): 3627 3576 """Connect to the simulator.""" 3628 self.gui.connectSimulator(self._bookedFlight.aircraftType, 3629 simulatorType) 3577 self.gui.connectSimulator(self._bookedFlight.aircraftType) 3630 3578 3631 3579 def _arrivalMETARCallback(self, returned, result):
Note:
See TracChangeset
for help on using the changeset viewer.