From ad811cc9fc7ef34efef83f59c3817ac9aa4ece30 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Fri, 19 Mar 2021 19:12:28 +0100 Subject: [PATCH] Add status bar messages that don't even work yet --- BirdyNet.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BirdyNet.py b/BirdyNet.py index 3165415..3eeb695 100644 --- a/BirdyNet.py +++ b/BirdyNet.py @@ -99,6 +99,7 @@ class browserWindow(QMainWindow): self.cDoc = browserDoc(self) self.cStatusBar = QStatusBar(self) + self.cStatusBar.showMessage("Please wait...") self.cResizeElements() self.show() @@ -117,7 +118,6 @@ class browserWindow(QMainWindow): self.cStatusBar.move(0,self.cHeight - mb) self.cStatusBar.resize(self.cWidth,mb) - self.cStatusBar.showMessage("Status") def resizeEvent(self,event): self.cWidth = self.width() @@ -127,6 +127,8 @@ class browserWindow(QMainWindow): def cNavigate(self,event = None): try: #print(prettyJson(parseUrl(self.cUrlBar.text()))) + self.cStatusBar.showMessage("Downloading...") + self.update() start = time.time() response = downloadPage(self.cUrlBar.text(),{"User-Agent": self.cUserAgent}) end = time.time() @@ -135,10 +137,14 @@ class browserWindow(QMainWindow): infoFetcher(response) self.cDocumentInfo = response + self.cStatusBar.showMessage("Rendering...") + self.update() start = time.time() self.cDoc.cRenderHtml(response["body"].decode("utf-8",errors="ignore")) end = time.time() print("Rendering page: " +str(end - start)) + self.cStatusBar.showMessage("Ready") + self.update() #print(prettyJson(response["headers"])) except Exception as e: self.cDoc.cRenderHtml(str(e))