- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r503 r436 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): … … 3545 3494 self.gui.rtoToggled(indicated) 3546 3495 3547 def _connectSimulator(self , simulatorType):3496 def _connectSimulator(self): 3548 3497 """Connect to the simulator.""" 3549 self.gui.connectSimulator(self._bookedFlight.aircraftType, 3550 simulatorType) 3498 self.gui.connectSimulator(self._bookedFlight.aircraftType) 3551 3499 3552 3500 def _arrivalMETARCallback(self, returned, result):
Note:
See TracChangeset
for help on using the changeset viewer.