Changeset 1177
- Timestamp:
- 03/05/10 17:14:13 (5 months ago)
- Location:
- trunk/camelot/view
- Files:
-
- 2 modified
-
application_admin.py (modified) (2 diffs)
-
mainwindow.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/camelot/view/application_admin.py
r1135 r1177 132 132 """:return: the name of the application""" 133 133 return self.name 134 134 135 def get_version(self): 136 """:return: string representing version of the application""" 137 return '1.0' 138 135 139 def get_icon(self): 136 140 """:return: the QIcon that should be used for the application""" … … 153 157 from PyQt4.QtCore import QUrl 154 158 return QUrl('http://www.conceptive.be/projects/camelot/') 155 159 160 def get_whats_new(self): 161 """:return: a widget that has a show() method """ 162 return None 163 156 164 def get_stylesheet(self): 157 165 """ -
trunk/camelot/view/mainwindow.py
r1109 r1177 114 114 QtGui.QMessageBox.about(self, _('About'), _(abtmsg)) 115 115 logger.debug('about message closed') 116 116 117 def whats_new(self): 118 widget = self.app_admin.get_whats_new() 119 if widget: 120 widget.exec_() 121 117 122 def readSettings(self): 118 123 # TODO: improve settings reading … … 254 259 slot=self.about, 255 260 tip=_("Show the application's About box") 261 ) 262 263 self.whats_new_action = createAction( 264 parent=self, 265 text=_('&What\'s new'), 266 slot=self.whats_new, 267 tip=_("Show the What's New box") 256 268 ) 257 269 … … 535 547 536 548 self.helpMenu = self.menuBar().addMenu(_('&Help')) 537 addActions(self.helpMenu, (self.helpAct, self.aboutAct)) 549 if self.app_admin.get_whats_new(): 550 addActions(self.helpMenu, (self.helpAct, self.aboutAct, self.whats_new_action)) 551 else: 552 addActions(self.helpMenu, (self.helpAct, self.aboutAct)) 538 553 539 554 def updateMenus(self):
