Changeset 92:1ca250ec2aa0 for src/mlx/gui
- Timestamp:
- 04/19/12 15:10:20 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r91 r92 209 209 self._loginButton.set_sensitive(False) 210 210 self._loginButton.connect("clicked", self._loginClicked) 211 self._loginButton.set_tooltip_text("Click to log in.") 212 211 self._loginButton.set_tooltip_text("Click to log in.") 212 213 def activate(self): 214 """Activate the page.""" 213 215 config = self._wizard.gui.config 214 216 self._pilotID.set_text(config.pilotID) … … 747 749 self._cargoWeight.set_sensitive(True) 748 750 self._mailWeight.set_text(str(bookedFlight.mailWeight)) 751 self._simulatorZFW.set_text("-") 752 self._simulatorZFWValue = None 749 753 self._zfwButton.set_sensitive(True) 750 754 self._updateCalculatedZFW() … … 873 877 self._departure.set_text(str(bookedFlight.departureTime.time())) 874 878 self._arrival.set_text(str(bookedFlight.arrivalTime.time())) 879 self._simulatorTime.set_text("-") 875 880 876 881 def finalize(self): … … 950 955 self._cruiseLevel.set_increments(step = 10, page = 100) 951 956 self._cruiseLevel.set_range(min = 50, max = 500) 952 self._cruiseLevel.set_value(240)953 957 self._cruiseLevel.set_tooltip_text("The cruise flight level.") 954 958 self._cruiseLevel.set_numeric(True) … … 1009 1013 """Setup the route from the booked flight.""" 1010 1014 self._route.set_sensitive(True) 1015 self._cruiseLevel.set_value(240) 1011 1016 self._cruiseLevel.set_sensitive(True) 1012 1017 self._route.get_buffer().set_text(self._wizard._bookedFlight.route) … … 1188 1193 if notams is None: 1189 1194 buffer.set_text("Could not download NOTAMs") 1195 elif not notams: 1196 buffer.set_text("Could not download NOTAM for this airport") 1190 1197 else: 1191 1198 s = "" -
src/mlx/gui/gui.py
r91 r92 60 60 window.add(mainVBox) 61 61 62 notebook = gtk.Notebook()63 mainVBox.add( notebook)62 self._notebook = gtk.Notebook() 63 mainVBox.add(self._notebook) 64 64 65 65 self._wizard = Wizard(self) … … 67 67 label.set_use_underline(True) 68 68 label.set_tooltip_text("Flight wizard") 69 notebook.append_page(self._wizard, label)69 self._notebook.append_page(self._wizard, label) 70 70 71 71 self._flightInfo = FlightInfo(self) … … 73 73 label.set_use_underline(True) 74 74 label.set_tooltip_text("Flight information") 75 notebook.append_page(self._flightInfo, label)75 self._notebook.append_page(self._flightInfo, label) 76 76 77 77 logVBox = gtk.VBox() … … 79 79 label.set_use_underline(True) 80 80 label.set_tooltip_text("Flight log") 81 notebook.append_page(logVBox, label)81 self._notebook.append_page(logVBox, label) 82 82 83 83 logFrame = self._buildLogFrame() … … 90 90 mainVBox.pack_start(self._statusbar, False, False, 0) 91 91 92 notebook.connect("switch-page", self._notebookPageSwitch)92 self._notebook.connect("switch-page", self._notebookPageSwitch) 93 93 94 94 self._monitorWindow = MonitorWindow(self, iconDirectory) … … 240 240 """Reset the GUI.""" 241 241 self._disconnect() 242 self._wizard.reset() 242 243 243 self._flightInfo.reset() 244 244 self.resetFlightStatus() 245 245 246 self._wizard.reset() 247 self._notebook.set_current_page(0) 248 249 self._logView.get_buffer().set_text("") 250 246 251 def _disconnect(self): 247 252 """Disconnect from the simulator if connected.""" 253 self.stopMonitoring() 254 248 255 if self._connected: 249 self.stopMonitoring()250 256 self._flight.simulator.disconnect() 251 257 self._connected = False
Note:
See TracChangeset
for help on using the changeset viewer.