Helpviewer/HelpTabWidget.py

changeset 1670
6fd889391d2c
parent 1665
b248526d3a1b
child 1673
06eeffc8c97d
equal deleted inserted replaced
1667:02ad912c8645 1670:6fd889391d2c
280 self.__mainWindow.closeAct.setEnabled(True) 280 self.__mainWindow.closeAct.setEnabled(True)
281 self.__mainWindow.closeAllAct.setEnabled(True) 281 self.__mainWindow.closeAllAct.setEnabled(True)
282 self.__closeButton.setEnabled(True) 282 self.__closeButton.setEnabled(True)
283 self.__navigationButton.setEnabled(True) 283 self.__navigationButton.setEnabled(True)
284 284
285 if not linkName and not requestData and \ 285 if not linkName and not requestData:
286 Preferences.getHelp("StartupBehavior") == 0: 286 if Preferences.getHelp("StartupBehavior") == 0:
287 linkName = Preferences.getHelp("HomePage") 287 linkName = Preferences.getHelp("HomePage")
288 elif Preferences.getHelp("StartupBehavior") == 1:
289 linkName = "eric:speeddial"
288 290
289 if linkName: 291 if linkName:
290 browser.setSource(QUrl(linkName)) 292 browser.setSource(QUrl(linkName))
291 if not browser.documentTitle(): 293 if not browser.documentTitle():
292 self.setTabText(index, self.__elide(linkName, Qt.ElideMiddle)) 294 self.setTabText(index, self.__elide(linkName, Qt.ElideMiddle))
355 urlbar = self.__stackedUrlBar.widget(index) 357 urlbar = self.__stackedUrlBar.widget(index)
356 self.__stackedUrlBar.removeWidget(urlbar) 358 self.__stackedUrlBar.removeWidget(urlbar)
357 del urlbar 359 del urlbar
358 360
359 browser = self.widget(index) 361 browser = self.widget(index)
362 if browser is None:
363 return
360 browser.home() 364 browser.home()
361 self.removeTab(index) 365 self.removeTab(index)
362 self.browserClosed.emit(browser) 366 self.browserClosed.emit(browser)
363 del browser 367 del browser
364 368
631 Private method to handle the loadFinished signal. 635 Private method to handle the loadFinished signal.
632 636
633 @param ok flag indicating the result (boolean) 637 @param ok flag indicating the result (boolean)
634 """ 638 """
635 browser = self.sender() 639 browser = self.sender()
640 if not isinstance(browser, HelpBrowser):
641 return
636 642
637 if browser is not None: 643 if browser is not None:
638 index = self.indexOf(browser) 644 index = self.indexOf(browser)
639 self.resetAnimation(index) 645 self.resetAnimation(index)
640 self.setTabIcon(index, browser.icon()) 646 self.setTabIcon(index, browser.icon())

eric ide

mercurial