Changeset 105:d1c3dd71da77 for src/mlx/gui/gui.py
- Timestamp:
- 04/22/12 14:21:23 (12 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r99 r105 57 57 58 58 window = gtk.Window() 59 window.set_title( "MAVA Logger X " + const.VERSION)59 window.set_title(WINDOW_TITLE_BASE) 60 60 window.set_icon_from_file(os.path.join(iconDirectory, "logo.ico")) 61 61 window.connect("delete-event", … … 119 119 else gdk.WATCH) 120 120 121 @property 122 def mainWindow(self): 123 """Get the main window of the GUI.""" 124 return self._mainWindow 125 121 126 @property 122 127 def logger(self): … … 286 291 self._statusbar.updateConnection(self._connecting, self._connected) 287 292 288 dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR, 293 dialog = gtk.MessageDialog(parent = self._mainWindow, 294 type = MESSAGETYPE_ERROR, 289 295 message_format = 290 "Cannot connect to the simulator." ,291 parent = self._mainWindow)296 "Cannot connect to the simulator.") 297 dialog.set_title(WINDOW_TITLE_BASE) 292 298 dialog.format_secondary_markup("Rectify the situation, and press <b>Try again</b> " 293 299 "to try the connection again, " … … 321 327 "The connection to the simulator failed unexpectedly.", 322 328 parent = self._mainWindow) 329 dialog.set_title(WINDOW_TITLE_BASE) 323 330 dialog.format_secondary_markup("If the simulator has crashed, restart it " 324 331 "and restore your flight as much as possible " 325 "to the state it was in before the crash. \n"332 "to the state it was in before the crash. " 326 333 "Then press <b>Reconnect</b> to reconnect.\n\n" 327 334 "If you want to cancel the flight, press <b>Cancel</b>.") … … 674 681 result=RESPONSETYPE_YES 675 682 else: 676 dialog = gtk.MessageDialog(type = MESSAGETYPE_QUESTION, 683 dialog = gtk.MessageDialog(parent = self._mainWindow, 684 type = MESSAGETYPE_QUESTION, 677 685 buttons = BUTTONSTYPE_YES_NO, 678 686 message_format = 679 687 "Are you sure to quit the logger?") 688 dialog.set_title(WINDOW_TITLE_BASE) 680 689 result = dialog.run() 681 690 dialog.hide()
Note:
See TracChangeset
for help on using the changeset viewer.