- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r620 r687 15 15 from mlx.gui.pirep import PIREPViewer 16 16 from mlx.gui.bugreport import BugReportDialog 17 from mlx.gui.acars import ACARS 18 import cef 17 19 18 20 import mlx.const as const … … 102 104 window.connect("delete-event", self.deleteMainWindow) 103 105 window.connect("window-state-event", self._handleMainWindowState) 106 if os.name=="nt": 107 window.connect("leave-notify-event", self._handleLeaveNotify) 104 108 accelGroup = gtk.AccelGroup() 105 109 window.add_accel_group(accelGroup) 110 window.realize() 106 111 107 112 mainVBox = gtk.VBox() … … 151 156 self._notebook.append_page(self._fleetGateStatus, label) 152 157 158 self._acars = ACARS(self) 159 label = gtk.Label("ACARS") 160 label.set_use_underline(True) 161 self._notebook.append_page(self._acars, label) 162 153 163 (self._debugLogWidget, self._debugLogView) = self._buildLogWidget() 154 164 self._debugLogWidget.show_all() … … 170 180 171 181 window.show_all() 182 if os.name=="nt": 183 window.get_window().focus() 172 184 173 185 self._wizard.grabDefault() … … 427 439 self._updater = Updater(self, 428 440 self._programDirectory, 429 self.config. updateURL,441 self.config.DEFAULT_UPDATE_URL, 430 442 self._mainWindow) 431 443 self._updater.start() 444 445 cef.initialize(self._programDirectory, self._cefInitialized) 432 446 433 447 singleton.raiseCallback = self.raiseCallback 434 448 gtk.main() 435 449 singleton.raiseCallback = None 450 451 cef.finalize() 436 452 437 453 self._disconnect() … … 688 704 self._mainWindow.present() 689 705 706 def _handleLeaveNotify(self, widget, event): 707 """Handle the leave-notify event. 708 709 Here we reset the focus to the main window as CEF might have acquired 710 it earlier.""" 711 self._mainWindow.get_window().focus() 712 690 713 def raiseCallback(self): 691 714 """Callback for the singleton handling code.""" … … 788 811 self._weightHelp.set_sensitive(False) 789 812 self._mainWindow.get_window().set_cursor(self._busyCursor) 813 self._statusbar.updateBusyState(message) 814 815 def updateBusyState(self, message): 816 """Update the busy state.""" 790 817 self._statusbar.updateBusyState(message) 791 818 … … 1464 1491 summary, description, email) 1465 1492 1493 def _cefInitialized(self): 1494 """Called when CEF has been initialized.""" 1495 self._acars.start() 1496 cef.initializeSimBrief() 1497 1466 1498 def _bugReportSentCallback(self, returned, result): 1467 1499 """Callback function for the bug report sending result."""
Note:
See TracChangeset
for help on using the changeset viewer.