Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/GuiManager.py

    rd1955d67 re90988c  
    8686        # Set up the status bar 
    8787        self.statusBarSetup() 
    88         # Show the Welcome panel 
    89         self.welcomePanel = WelcomePanel() 
    90         self._workspace.workspace.addSubWindow(self.welcomePanel) 
    91  
    92         # Current help file 
    93         self._helpView = QWebView() 
     88 
    9489        # Needs URL like path, so no path.join() here 
    9590        self._helpLocation = GuiUtils.HELP_DIRECTORY_LOCATION + "/index.html" 
     
    9994                                              "_downloads", 
    10095                                              "Tutorial.pdf")) 
     96 
    10197    def addWidgets(self): 
    10298        """ 
     
    131127        self.ackWidget = Acknowledgements() 
    132128        self.aboutWidget = AboutBox() 
     129        self.welcomePanel = WelcomePanel() 
    133130 
    134131        # Add calculators - floating for usability 
     
    165162        """ 
    166163        pass 
     164 
     165    def showHelp(self, url): 
     166        """ 
     167        Open a local url in the default browser 
     168        """ 
     169        location = GuiUtils.HELP_DIRECTORY_LOCATION + url 
     170        try: 
     171            webbrowser.open('file://' + os.path.realpath(location)) 
     172        except webbrowser.Error as ex: 
     173            logging.warning("Cannot display help. %s" % ex) 
    167174 
    168175    def workspace(self): 
     
    334341            msg += " Please try again later." 
    335342            self.communicate.statusBarUpdateSignal.emit(msg) 
     343 
     344    def showWelcomeMessage(self): 
     345        """ Show the Welcome panel """ 
     346        self._workspace.workspace.addSubWindow(self.welcomePanel) 
     347        self.welcomePanel.show() 
    336348 
    337349    def addCallbacks(self): 
     
    714726        TODO: use QNetworkAccessManager to assure _helpLocation is valid 
    715727        """ 
    716         self._helpView.load(QUrl(self._helpLocation)) 
    717         self._helpView.show() 
     728        self.showHelp(self._helpLocation) 
    718729 
    719730    def actionTutorial(self): 
Note: See TracChangeset for help on using the changeset viewer.