eric6/WebBrowser/WebBrowserTabWidget.py

changeset 7514
0960c7c1f497
parent 7366
bd743eacfbca
child 7533
88261c96484b
equal deleted inserted replaced
7513:d8354f4d3dc7 7514:0960c7c1f497
29 import UI.PixmapCache 29 import UI.PixmapCache
30 30
31 import Utilities 31 import Utilities
32 import Preferences 32 import Preferences
33 import Globals 33 import Globals
34
35 from eric6config import getConfig
36 34
37 35
38 def isCupsAvailable(): 36 def isCupsAvailable():
39 """ 37 """
40 Static method to test the availability of CUPS. 38 Static method to test the availability of CUPS.
882 880
883 @param browser reference to the web browser 881 @param browser reference to the web browser
884 @type WebBrowserView 882 @type WebBrowserView
885 """ 883 """
886 index = self.indexOf(browser) 884 index = self.indexOf(browser)
887 anim = self.animationLabel( 885 anim = self.animationLabel(index, "loadingAnimation", 40)
888 index, os.path.join(getConfig("ericPixDir"), "loading.gif"),
889 100)
890 if not anim: 886 if not anim:
891 loading = QIcon(os.path.join(getConfig("ericPixDir"), 887 self.setTabIcon(index, UI.PixmapCache.getIcon("loading"))
892 "loading.gif"))
893 self.setTabIcon(index, loading)
894 else: 888 else:
895 self.setTabIcon(index, QIcon()) 889 self.setTabIcon(index, QIcon())
896 self.setTabText(index, self.tr("Loading...")) 890 self.setTabText(index, self.tr("Loading..."))
897 self.setTabToolTip(index, self.tr("Loading...")) 891 self.setTabToolTip(index, self.tr("Loading..."))
898 self.showMessage.emit(self.tr("Loading...")) 892 self.showMessage.emit(self.tr("Loading..."))

eric ide

mercurial