Add status bar messages that don't even work yet
This commit is contained in:
parent
8b72f60c93
commit
ad811cc9fc
@ -99,6 +99,7 @@ class browserWindow(QMainWindow):
|
|||||||
self.cDoc = browserDoc(self)
|
self.cDoc = browserDoc(self)
|
||||||
|
|
||||||
self.cStatusBar = QStatusBar(self)
|
self.cStatusBar = QStatusBar(self)
|
||||||
|
self.cStatusBar.showMessage("Please wait...")
|
||||||
|
|
||||||
self.cResizeElements()
|
self.cResizeElements()
|
||||||
self.show()
|
self.show()
|
||||||
@ -117,7 +118,6 @@ class browserWindow(QMainWindow):
|
|||||||
|
|
||||||
self.cStatusBar.move(0,self.cHeight - mb)
|
self.cStatusBar.move(0,self.cHeight - mb)
|
||||||
self.cStatusBar.resize(self.cWidth,mb)
|
self.cStatusBar.resize(self.cWidth,mb)
|
||||||
self.cStatusBar.showMessage("Status")
|
|
||||||
|
|
||||||
def resizeEvent(self,event):
|
def resizeEvent(self,event):
|
||||||
self.cWidth = self.width()
|
self.cWidth = self.width()
|
||||||
@ -127,6 +127,8 @@ class browserWindow(QMainWindow):
|
|||||||
def cNavigate(self,event = None):
|
def cNavigate(self,event = None):
|
||||||
try:
|
try:
|
||||||
#print(prettyJson(parseUrl(self.cUrlBar.text())))
|
#print(prettyJson(parseUrl(self.cUrlBar.text())))
|
||||||
|
self.cStatusBar.showMessage("Downloading...")
|
||||||
|
self.update()
|
||||||
start = time.time()
|
start = time.time()
|
||||||
response = downloadPage(self.cUrlBar.text(),{"User-Agent": self.cUserAgent})
|
response = downloadPage(self.cUrlBar.text(),{"User-Agent": self.cUserAgent})
|
||||||
end = time.time()
|
end = time.time()
|
||||||
@ -135,10 +137,14 @@ class browserWindow(QMainWindow):
|
|||||||
infoFetcher(response)
|
infoFetcher(response)
|
||||||
self.cDocumentInfo = response
|
self.cDocumentInfo = response
|
||||||
|
|
||||||
|
self.cStatusBar.showMessage("Rendering...")
|
||||||
|
self.update()
|
||||||
start = time.time()
|
start = time.time()
|
||||||
self.cDoc.cRenderHtml(response["body"].decode("utf-8",errors="ignore"))
|
self.cDoc.cRenderHtml(response["body"].decode("utf-8",errors="ignore"))
|
||||||
end = time.time()
|
end = time.time()
|
||||||
print("Rendering page: " +str(end - start))
|
print("Rendering page: " +str(end - start))
|
||||||
|
self.cStatusBar.showMessage("Ready")
|
||||||
|
self.update()
|
||||||
#print(prettyJson(response["headers"]))
|
#print(prettyJson(response["headers"]))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.cDoc.cRenderHtml(str(e))
|
self.cDoc.cRenderHtml(str(e))
|
||||||
|
Loading…
Reference in New Issue
Block a user