Changeset 249:d055e454a7ea for src/mlx/gui
- Timestamp:
- 06/19/12 14:52:44 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r246 r249 83 83 window.set_icon_from_file(os.path.join(iconDirectory, "logo.ico")) 84 84 window.set_resizable(False) 85 window.connect("delete-event", 86 lambda a, b: self.hideMainWindow()) 85 window.connect("delete-event", self.deleteMainWindow) 87 86 window.connect("window-state-event", self._handleMainWindowState) 88 87 accelGroup = gtk.AccelGroup() … … 568 567 self.showMainWindow() 569 568 self._mainWindow.present() 569 570 def deleteMainWindow(self, window, event): 571 """Handle the delete event for the main window.""" 572 if self.config.quitOnClose: 573 self._quit() 574 else: 575 self.hideMainWindow() 576 return True 570 577 571 578 def hideMainWindow(self, savePosition = True): -
src/mlx/gui/prefs.py
r233 r249 225 225 self._setLanguage(config.language) 226 226 self._hideMinimizedWindow.set_active(config.hideMinimizedWindow) 227 self._quitOnClose.set_active(config.quitOnClose) 227 228 self._onlineGateSystem.set_active(config.onlineGateSystem) 228 229 self._onlineACARS.set_active(config.onlineACARS) … … 270 271 config.language = self._getLanguage() 271 272 config.hideMinimizedWindow = self._hideMinimizedWindow.get_active() 273 config.quitOnClose = self._quitOnClose.get_active() 272 274 config.onlineGateSystem = self._onlineGateSystem.get_active() 273 275 config.onlineACARS = self._onlineACARS.get_active() … … 347 349 self._hideMinimizedWindow.set_tooltip_text(xstr("prefs_hideMinimizedWindow_tooltip")) 348 350 guiBox.pack_start(self._hideMinimizedWindow, False, False, 4) 351 352 self._quitOnClose = gtk.CheckButton(xstr("prefs_quitOnClose")) 353 self._quitOnClose.set_use_underline(True) 354 self._quitOnClose.set_tooltip_text(xstr("prefs_quitOnClose_tooltip")) 355 guiBox.pack_start(self._quitOnClose, False, False, 4) 349 356 350 357 onlineBox = self._createFrame(mainBox, xstr("prefs_frame_online"))
Note:
See TracChangeset
for help on using the changeset viewer.