- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r620 r652 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() 446 self._acars.start() 432 447 433 448 singleton.raiseCallback = self.raiseCallback 434 449 gtk.main() 435 450 singleton.raiseCallback = None 451 452 cef.finalize() 436 453 437 454 self._disconnect() … … 687 704 (event.new_window_state&WINDOW_STATE_ICONIFIED)==0: 688 705 self._mainWindow.present() 706 707 def _handleLeaveNotify(self, widget, event): 708 """Handle the leave-notify event. 709 710 Here we reset the focus to the main window as CEF might have acquired 711 it earlier.""" 712 self._mainWindow.get_window().focus() 689 713 690 714 def raiseCallback(self):
Note:
See TracChangeset
for help on using the changeset viewer.