Thu, 12 Jan 2012 19:14:01 +0100
Fixed the icon handling in the help viewer.
Helpviewer/HelpTabWidget.py | file | annotate | diff | comparison | revisions | |
Helpviewer/UrlBar/FavIconLabel.py | file | annotate | diff | comparison | revisions |
--- a/Helpviewer/HelpTabWidget.py Thu Jan 12 19:12:39 2012 +0100 +++ b/Helpviewer/HelpTabWidget.py Thu Jan 12 19:14:01 2012 +0100 @@ -588,6 +588,10 @@ if not anim: loading = QIcon(os.path.join(getConfig("ericPixDir"), "loading.gif")) self.setTabIcon(index, loading) + else: + self.setTabIcon(index, QIcon()) + self.setTabText(index, self.trUtf8("Loading...")) + self.setTabToolTip(index, self.trUtf8("Loading...")) self.showMessage.emit(self.trUtf8("Loading...")) self.__mainWindow.setLoadingActions(True)
--- a/Helpviewer/UrlBar/FavIconLabel.py Thu Jan 12 19:12:39 2012 +0100 +++ b/Helpviewer/UrlBar/FavIconLabel.py Thu Jan 12 19:14:01 2012 +0100 @@ -8,7 +8,7 @@ """ from PyQt4.QtCore import Qt, QPoint, QUrl, QMimeData -from PyQt4.QtGui import QLabel, QApplication, QDrag +from PyQt4.QtGui import QLabel, QApplication, QDrag, QPixmap import Helpviewer.HelpWindow @@ -47,6 +47,12 @@ except RuntimeError: pass + def __clearIcon(self): + """ + Private slot to clear the icon. + """ + self.setPixmap(QPixmap()) + def setBrowser(self, browser): """ Public method to set the browser connection. @@ -56,6 +62,7 @@ self.__browser = browser self.__browser.loadFinished.connect(self.__browserIconChanged) self.__browser.iconChanged.connect(self.__browserIconChanged) + self.__browser.loadStarted.connect(self.__clearIcon) def mousePressEvent(self, evt): """