Changeset 76:f5b2b0022cdf for src/mlx
- Timestamp:
- 04/14/12 05:24:38 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r44 r76 20 20 21 21 MESSAGETYPE_ERROR = gtk.MESSAGE_ERROR 22 MESSAGETYPE_QUESTION = gtk.MESSAGE_QUESTION 22 23 BUTTONSTYPE_OK = gtk.BUTTONS_OK 24 BUTTONSTYPE_YES_NO = gtk.BUTTONS_YES_NO 25 RESPONSETYPE_YES = gtk.RESPONSE_YES 23 26 else: 24 27 print "Using PyGObject" … … 30 33 from gi.repository import Pango as pango 31 34 appIndicator = True 32 35 33 36 MESSAGETYPE_ERROR = gtk.MessageType.ERROR 37 MESSAGETYPE_QUESTION = gtk.MessageType.QUESTION 34 38 BUTTONSTYPE_OK = gtk.ButtonsType.OK 39 BUTTONSTYPE_YES_NO = gtk.ButtonsType.YES_NO 40 RESPONSETYPE_YES = gtk.ResponseType.YES 35 41 36 42 import cairo -
src/mlx/gui/flight.py
r75 r76 1346 1346 self._starButton = gtk.CheckButton() 1347 1347 self._starButton.connect("clicked", self._starButtonClicked) 1348 self._starButton.set_active(True)1349 1348 table.attach(self._starButton, 0, 1, 0, 1) 1350 1349 … … 1364 1363 self._transitionButton = gtk.CheckButton() 1365 1364 self._transitionButton.connect("clicked", self._transitionButtonClicked) 1366 self._transitionButton.set_active(True)1367 1365 table.attach(self._transitionButton, 0, 1, 1, 2) 1368 1366 … … 1400 1398 self._approachType.set_width_chars(10) 1401 1399 self._approachType.set_tooltip_text("The type of the approach, e.g. ILS or VISUAL.") 1402 self._ runway.connect("changed", self._updateForwardButton)1400 self._approachType.connect("changed", self._updateForwardButton) 1403 1401 table.attach(self._approachType, 2, 3, 3, 4) 1404 1402 label.set_mnemonic_widget(self._approachType) … … 1428 1426 self._button.set_use_stock(True) 1429 1427 self._button.connect("clicked", self._forwardClicked) 1428 1429 # These are needed for correct size calculations 1430 self._starButton.set_active(True) 1431 self._transitionButton.set_active(True) 1430 1432 1431 1433 def activate(self): -
src/mlx/gui/gui.py
r71 r76 843 843 def _quit(self, what = None): 844 844 """Quit from the application.""" 845 self._statusIcon.destroy() 846 return gtk.main_quit() 845 dialog = gtk.MessageDialog(type = MESSAGETYPE_QUESTION, 846 buttons = BUTTONSTYPE_YES_NO, 847 message_format = 848 "Are you sure to quit the logger?") 849 result = dialog.run() 850 dialog.hide() 851 852 if result==RESPONSETYPE_YES: 853 self._statusIcon.destroy() 854 return gtk.main_quit() 847 855 848 856 def _notebookPageSwitch(self, notebook, page, page_num): -
src/mlx/gui/statusicon.py
r38 r76 39 39 self._showHideMenuItem.show() 40 40 menu.append(self._showHideMenuItem) 41 42 self._quitMenuItem = gtk.MenuItem() 43 self._quitMenuItem.set_label("Quit") 44 self._quitMenuItem.show() 45 self._quitMenuItem.connect("activate", self._gui._quit) 46 menu.append(self._quitMenuItem) 41 47 42 48 menu.show()
Note:
See TracChangeset
for help on using the changeset viewer.