Changeset 136:6d206b573dee for src/mlx
- Timestamp:
- 04/30/12 15:21:44 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r134 r136 155 155 elif newStage==const.STAGE_TAXIAFTERLAND: 156 156 bookedFlight = self._flight.bookedFlight 157 if bookedFlight.arrivalICAO=="LHBP" and \ 158 self._flight.config.isMessageTypeFS(const.MESSAGETYPE_GATE_SYSTEM): 157 config = self._flight.config 158 if config.onlineGateSystem and \ 159 bookedFlight.arrivalICAO=="LHBP" and \ 160 config.isMessageTypeFS(const.MESSAGETYPE_GATE_SYSTEM): 159 161 self._flight.getFleet(callback = self._fleetRetrieved, 160 162 force = True) -
src/mlx/config.py
r134 r136 37 37 38 38 self._language = "" 39 self._onlineGateSystem = True 39 40 self._flareTimeFromFS = False 40 41 … … 92 93 if language!=self._language: 93 94 self._language = language 95 self._modified = True 96 97 @property 98 def onlineGateSystem(self): 99 """Get whether the online gate system should be used.""" 100 return self._onlineGateSystem 101 102 @onlineGateSystem.setter 103 def onlineGateSystem(self, onlineGateSystem): 104 """Set whether the online gate system should be used.""" 105 if onlineGateSystem!=self._onlineGateSystem: 106 self._onlineGateSystem = onlineGateSystem 94 107 self._modified = True 95 108 … … 163 176 164 177 self._language = self._get(config, "general", "language", "") 178 self._onlineGateSystem = self._getBoolean(config, "general", 179 "onlineGateSystem", 180 True) 165 181 self._flareTimeFromFS = self._getBoolean(config, "general", 166 182 "flareTimeFromFS", … … 194 210 if self._language: 195 211 config.set("general", "language", self._language) 212 config.set("general", "onlineGateSystem", 213 "yes" if self._onlineGateSystem else "no") 196 214 config.set("general", "flareTimeFromFS", 197 215 "yes" if self._flareTimeFromFS else "no") -
src/mlx/gui/flight.py
r130 r136 413 413 """Update the departure gate for the booked flight.""" 414 414 flight = self._wizard._bookedFlight 415 if flight.departureICAO=="LHBP": 416 self._wizard.getFleet(self._fleetRetrieved) 415 if self._wizard.gui.config.onlineGateSystem: 416 if flight.departureICAO=="LHBP": 417 self._wizard.getFleet(self._fleetRetrieved) 418 else: 419 self._wizard.updatePlane(self._planeUpdated, 420 flight.tailNumber, 421 const.PLANE_AWAY) 417 422 else: 418 self._ wizard.updatePlane(self._planeUpdated,419 flight.tailNumber,420 const.PLANE_AWAY)423 self._nextDistance = 2 424 self._wizard.jumpPage(2) 425 421 426 def _fleetRetrieved(self, fleet): 422 427 """Called when the fleet has been retrieved.""" … … 1669 1674 def _forwardClicked(self, button): 1670 1675 """Called when the forward button is clicked.""" 1671 if not self._completed and \ 1676 if self._wizard.gui.config.onlineGateSystem and \ 1677 not self._completed and \ 1672 1678 self._wizard.bookedFlight.arrivalICAO=="LHBP": 1673 1679 self._wizard.getFleet(callback = self._fleetRetrieved, … … 1868 1874 1869 1875 self._gatesModel.clear() 1870 if self._wizard.bookedFlight.arrivalICAO=="LHBP": 1876 if self._wizard.gui.config.onlineGateSystem and \ 1877 self._wizard.bookedFlight.arrivalICAO=="LHBP": 1871 1878 occupiedGates = self._wizard._fleet.getOccupiedGateNumbers() 1872 1879 for gateNumber in const.lhbpGateNumbers: … … 1945 1952 dialog.hide() 1946 1953 1947 if returned and result.success:1954 if self._wizard.gui.config.onlineGateSystem and returned and result.success: 1948 1955 bookedFlight = self._wizard.bookedFlight 1949 1956 if bookedFlight.arrivalICAO=="LHBP": -
src/mlx/gui/prefs.py
r132 r136 67 67 """Setup the dialog from the given configuration.""" 68 68 self._setLanguage(config.language) 69 self._onlineGateSystem.set_active(config.onlineGateSystem) 69 70 self._flareTimeFromFS.set_active(config.flareTimeFromFS) 70 71 … … 89 90 """Setup the given config from the settings in the dialog.""" 90 91 config.language = self._getLanguage() 92 config.onlineGateSystem = self._onlineGateSystem.get_active() 91 93 config.flareTimeFromFS = self._flareTimeFromFS.get_active() 92 94 … … 142 144 self._warnedRestartNeeded = False 143 145 146 self._onlineGateSystem = gtk.CheckButton(xstr("prefs_onlineGateSystem")) 147 self._onlineGateSystem.set_use_underline(True) 148 self._onlineGateSystem.set_tooltip_text(xstr("prefs_onlineGateSystem_tooltip")) 149 mainBox.pack_start(self._onlineGateSystem, False, False, 4) 150 144 151 self._flareTimeFromFS = gtk.CheckButton(xstr("prefs_flaretimeFromFS")) 145 152 self._flareTimeFromFS.set_use_underline(True) 146 153 self._flareTimeFromFS.set_tooltip_text(xstr("prefs_flaretimeFromFS_tooltip")) 147 148 154 mainBox.pack_start(self._flareTimeFromFS, False, False, 4) 149 155 -
src/mlx/i18n.py
r132 r136 560 560 self.add("prefs_lang_en_GB", "English") 561 561 self.add("prefs_lang_hu_HU", "Hungarian") 562 self.add("prefs_onlineGateSystem", 563 "_Use the Online Gate System") 564 self.add("prefs_onlineGateSystem_tooltip", 565 "If this is checked, the logger will query and update the " 566 "LHBP Online Gate System.") 562 567 self.add("prefs_flaretimeFromFS", 563 568 "Take flare _time from the simulator") … … 1055 1060 self.add("prefs_lang_en_GB", "angol") 1056 1061 self.add("prefs_lang_hu_HU", "magyar") 1062 self.add("prefs_onlineGateSystem", 1063 "Az Online _Gate System használata") 1064 self.add("prefs_onlineGateSystem_tooltip", 1065 "Ha ezt bejelölöd, a logger lekérdezi és frissíti az " 1066 "LHBP Online Gate System adatait.") 1057 1067 self.add("prefs_flaretimeFromFS", 1058 1068 "A ki_lebegtetés idejét vedd a szimulátorból")
Note:
See TracChangeset
for help on using the changeset viewer.