Changeset f82ab8c in sasview for src/sas/qtgui/GuiManager.py
- Timestamp:
- Jun 29, 2016 10:04:43 AM (8 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 481ff26
- Parents:
- 9e426c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiManager.py
r9e426c1 rf82ab8c 18 18 from GuiUtils import * 19 19 from UI.AcknowledgementsUI import Acknowledgements 20 from AboutBox import AboutBox 20 21 21 22 # Perspectives … … 60 61 # Add FileDialog widget as docked 61 62 self.filesWidget = DataExplorerWindow(parent, self) 62 #flags = (QtCore.Qt.Window | QtCore.Qt.WindowTitleHint | QtCore.Qt.CustomizeWindowHint) 63 64 self.dockedFilesWidget = QtGui.QDockWidget("File explorer", self._workspace) 63 #flags = (QtCore.Qt.Window | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinimizeButtonHint) 64 flags = (QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinMaxButtonsHint ) 65 66 self.dockedFilesWidget = QtGui.QDockWidget("Data explorer", self._workspace, flags=flags) 65 67 self.dockedFilesWidget.setWidget(self.filesWidget) 66 68 self._workspace.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockedFilesWidget) 67 69 68 70 self.ackWidget = Acknowledgements() 71 self.aboutWidget = AboutBox() 69 72 70 73 # Disable the close button (?) … … 95 98 def fileRead(self, data): 96 99 """ 100 Callback for fileDataReceivedSignal 97 101 """ 98 102 pass … … 197 201 # Exit if yes 198 202 reactor.callFromThread(reactor.stop) 199 reactor.stop200 203 sys.exit() 201 204 … … 220 223 self.processVersion(version_info) 221 224 222 def processVersion(self, version_info , standalone=False):225 def processVersion(self, version_info): 223 226 """ 224 227 Call-back method for the process of checking for updates. … … 228 231 229 232 :param version: version string 230 :param standalone: True of the update is being checked in231 the background, False otherwise.232 233 233 """ 234 234 try: … … 242 242 elif cmp(version, LocalConfig.__version__) > 0: 243 243 msg = "Version %s is available! " % str(version) 244 if not standalone: 245 if "download_url" in version_info: 246 webbrowser.open(version_info["download_url"]) 247 else: 248 webbrowser.open(LocalConfig.__download_page__) 244 if "download_url" in version_info: 245 webbrowser.open(version_info["download_url"]) 249 246 else: 250 msg += "See the help menu to download it."247 webbrowser.open(LocalConfig.__download_page__) 251 248 self.communicate.statusBarUpdateSignal.emit(msg) 252 249 else: … … 258 255 msg += " version number\n %s" % sys.exc_value 259 256 logging.error(msg) 260 if not standalone: 261 msg = "Could not connect to the application server." 262 msg += " Please try again later." 263 self.communicate.statusBarUpdateSignal.emit(msg) 257 msg = "Could not connect to the application server." 258 msg += " Please try again later." 259 self.communicate.statusBarUpdateSignal.emit(msg) 264 260 265 261 def addCallbacks(self): … … 629 625 Open the About box 630 626 """ 631 632 print("actionAbout TRIGGERED") 633 pass 627 # Update the about box with current version and stuff 628 629 # TODO: proper sizing 630 self.aboutWidget.show() 634 631 635 632 def actionCheck_for_update(self):
Note: See TracChangeset
for help on using the changeset viewer.