Fixed the icon handling in the help viewer. 5_1_x

Thu, 12 Jan 2012 19:14:01 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 12 Jan 2012 19:14:01 +0100
branch
5_1_x
changeset 1541
7fb08da8080a
parent 1540
3b0b478a3416
child 1542
bbda5cfe479e

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
@@ -580,6 +580,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
 
@@ -46,6 +46,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.
@@ -55,6 +61,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):
         """

eric ide

mercurial