Changeset 46:43e46847479a for src/mlx/gui/gui.py
- Timestamp:
- 03/18/12 19:18:36 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r42 r46 73 73 mainVBox.add(notebook) 74 74 75 notebook.append_page(Wizard(self), gtk.Label("Flight")) 75 self._wizard = Wizard(self) 76 label = gtk.Label("_Flight") 77 label.set_use_underline(True) 78 label.set_tooltip_text("Flight wizard") 79 notebook.append_page(self._wizard, label) 76 80 77 81 dataVBox = gtk.VBox() 78 notebook.append_page(dataVBox, gtk.Label("Data")) 82 label = gtk.Label("_Data") 83 label.set_use_underline(True) 84 label.set_tooltip_text("FSUIPC data access") 85 notebook.append_page(dataVBox, label) 79 86 80 87 setupFrame = self._buildSetupFrame() … … 87 94 88 95 logVBox = gtk.VBox() 89 notebook.append_page(logVBox, gtk.Label("Log")) 96 label = gtk.Label("_Log") 97 label.set_use_underline(True) 98 label.set_tooltip_text("Flight log") 99 notebook.append_page(logVBox, label) 90 100 91 101 logFrame = self._buildLogFrame() … … 98 108 mainVBox.pack_start(self._statusbar, False, False, 0) 99 109 100 window.show_all() 110 notebook.connect("switch-page", self._notebookPageSwitch) 111 112 window.show_all() 113 self._wizard.grabDefault() 101 114 102 115 self._mainWindow = window … … 374 387 setupBox.pack_start(gtk.VSeparator(), False, False, 8) 375 388 376 self._quitButton = gtk.Button(label = "Quit") 389 self._quitButton = gtk.Button(label = "_Quit", use_underline = True) 390 self._quitButton.set_can_default(True) 377 391 self._quitButton.set_tooltip_text("Quit the program.") 378 392 … … 707 721 return gtk.main_quit() 708 722 723 def _notebookPageSwitch(self, notebook, page, page_num): 724 """Called when the current page of the notebook has changed.""" 725 if page_num==0: 726 self._wizard.grabDefault() 727 elif page_num==1: 728 self._quitButton.grab_default() 729 else: 730 self._mainWindow.set_default(None) 731 709 732 class TrackerStatusIcon(gtk.StatusIcon): 710 733 def __init__(self):
Note:
See TracChangeset
for help on using the changeset viewer.