Fixes for the web browser. 5_0_x

Mon, 24 May 2010 14:05:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 May 2010 14:05:36 +0200
branch
5_0_x
changeset 277
c1a90bd43161
parent 273
f82feae3ccf8
child 279
6bd7019b8fb1

Fixes for the web browser.

Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Helpviewer.Network.NetworkReply.html file | annotate | diff | comparison | revisions
Helpviewer/DownloadDialog.py file | annotate | diff | comparison | revisions
Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
Helpviewer/Network/NetworkReply.py file | annotate | diff | comparison | revisions
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Source/eric5.Helpviewer.Network.NetworkReply.html	Sun May 23 14:16:18 2010 +0200
+++ b/Documentation/Source/eric5.Helpviewer.Network.NetworkReply.html	Mon May 24 14:05:36 2010 +0200
@@ -114,7 +114,7 @@
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-string containing the data (string)
+string containing the data (bytes)
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
--- a/Helpviewer/DownloadDialog.py	Sun May 23 14:16:18 2010 +0200
+++ b/Helpviewer/DownloadDialog.py	Mon May 24 14:05:36 2010 +0200
@@ -128,7 +128,7 @@
             res = QMessageBox.question(None,
                 self.trUtf8("Downloading"),
                 self.trUtf8("""<p>You are about to download the file <b>{0}</b>.</p>"""
-                            """<p>What do you want to do?</p>""").format(baseName),
+                            """<p>What do you want to do?</p>""").format(fileName),
                 QMessageBox.StandardButtons(\
                     QMessageBox.Open | \
                     QMessageBox.Save | \
@@ -140,7 +140,7 @@
             
             self.__autoOpen = res == QMessageBox.Open
             fileName = QDesktopServices.storageLocation(QDesktopServices.TempLocation) + \
-                        '/' + baseName
+                        '/' + fileName
         
         if not self.__autoOpen and self.__requestFilename:
             fileName = QFileDialog.getSaveFileName(
@@ -317,12 +317,12 @@
         """
         self.__bytesReceived = received
         if total == -1:
+            self.progressBar.setMaximum(0)
             self.progressBar.setValue(0)
-            self.progressBar.setMaximum(0)
             self.setWindowTitle(self.__windowTitleTemplate.format(""))
         else:
+            self.progressBar.setMaximum(total)
             self.progressBar.setValue(received)
-            self.progressBar.setMaximum(total)
             pc = "{0}%".format(received * 100 // total)
             self.setWindowTitle(self.__windowTitleTemplate.format(pc))
         self.__updateInfoLabel()
--- a/Helpviewer/HelpBrowserWV.py	Sun May 23 14:16:18 2010 +0200
+++ b/Helpviewer/HelpBrowserWV.py	Mon May 24 14:05:36 2010 +0200
@@ -924,6 +924,7 @@
         if reply.error() == QNetworkReply.NoError:
             if reply.url().isEmpty():
                 return
+            parent = QUrl(reply.url().toString().rsplit("/", 1)[0] + "/")
             size = reply.header(QNetworkRequest.ContentLengthHeader)
             if size == 0:
                 return
@@ -935,6 +936,7 @@
                 self.connect(dlg, SIGNAL("done()"), self.__downloadDone)
                 self.__downloadWindows.append(dlg)
                 dlg.show()
+            self.setUrl(parent)
         else:
             replyUrl = reply.url()
             if replyUrl.isEmpty():
--- a/Helpviewer/Network/NetworkReply.py	Sun May 23 14:16:18 2010 +0200
+++ b/Helpviewer/Network/NetworkReply.py	Mon May 24 14:05:36 2010 +0200
@@ -58,7 +58,7 @@
         Protected method to retrieve data from the reply object.
         
         @param maxlen maximum number of bytes to read (integer)
-        @return string containing the data (string)
+        @return string containing the data (bytes)
         """
         len_ = min(maxlen, self.__data.length())
         buffer = bytes(self.__data[:len_])

eric ide

mercurial