Thu, 07 Jan 2010 19:03:58 +0000
Fixed a few porting issues.
--- a/E4Gui/E4TreeView.py Thu Jan 07 15:22:29 2010 +0000 +++ b/E4Gui/E4TreeView.py Thu Jan 07 19:03:58 2010 +0000 @@ -38,7 +38,7 @@ return selectedRows = self.selectionModel().selectedRows() - for idx in reversed(selectedRows): + for idx in reversed(sorted(selectedRows)): self.model().removeRow(idx.row(), idx.parent()) def removeAll(self):
--- a/Helpviewer/Bookmarks/BookmarksManager.py Thu Jan 07 15:22:29 2010 +0000 +++ b/Helpviewer/Bookmarks/BookmarksManager.py Thu Jan 07 19:03:58 2010 +0000 @@ -375,14 +375,20 @@ """ Public method to export the bookmarks. """ - fileName = QFileDialog.getSaveFileName( + fileName, selectedFilter = QFileDialog.getSaveFileNameAndFilter( None, self.trUtf8("Export Bookmarks"), "eric5_bookmarks.xbel", - self.trUtf8("XBEL bookmarks") + " (*.xbel, *.xml)") + self.trUtf8("XBEL bookmarks (*.xbel);;XBEL bookmarks (*.xml")) if not fileName: return + ext = QFileInfo(fileName).suffix() + if not ext: + ex = selectedFilter.split("(*")[1].split(")")[0] + if ex: + fileName += ex + writer = XbelWriter() if not writer.write(fileName, self.__bookmarkRootNode): QMessageBox.critical(None, @@ -527,4 +533,4 @@ self._node.title = self._newValue else: self._node.url = self._newValue - self._bookmarksManager.emit(SIGNAL("entryChanged"), self._node) \ No newline at end of file + self._bookmarksManager.emit(SIGNAL("entryChanged"), self._node)
--- a/Helpviewer/CookieJar/CookieModel.py Thu Jan 07 15:22:29 2010 +0000 +++ b/Helpviewer/CookieJar/CookieModel.py Thu Jan 07 19:03:58 2010 +0000 @@ -82,7 +82,7 @@ if col == 0: return cookie.domain() elif col == 1: - return cookie.name() + return bytes(cookie.name()).decode() elif col == 2: return cookie.path() elif col == 3:
--- a/Helpviewer/CookieJar/CookiesDialog.py Thu Jan 07 15:22:29 2010 +0000 +++ b/Helpviewer/CookieJar/CookiesDialog.py Thu Jan 07 19:03:58 2010 +0000 @@ -75,6 +75,9 @@ header += buffer self.cookiesTable.horizontalHeader().resizeSection(section, header) self.cookiesTable.horizontalHeader().setStretchLastSection(True) + self.cookiesTable.model().sort( + self.cookiesTable.horizontalHeader().sortIndicatorSection(), + Qt.AscendingOrder) self.__detailsDialog = None @@ -99,8 +102,8 @@ path = model.data(model.index(row, 2)) secure = model.data(model.index(row, 3)) expires = model.data(model.index(row, 4)).toString("yyyy-MM-dd hh:mm") - value = str( - QByteArray.fromPercentEncoding(model.data(model.index(row, 5)))) + value = bytes( + QByteArray.fromPercentEncoding(model.data(model.index(row, 5)))).decode() if self.__detailsDialog is None: self.__detailsDialog = CookieDetailsDialog(self)
--- a/Helpviewer/HelpWindow.py Thu Jan 07 15:22:29 2010 +0000 +++ b/Helpviewer/HelpWindow.py Thu Jan 07 19:03:58 2010 +0000 @@ -1611,8 +1611,6 @@ printer.setPrinterName(Preferences.getPrinter("PrinterName")) printDialog = QPrintDialog(printer, self) - if browser.hasSelection(): - printDialog.addEnabledOption(QAbstractPrintDialog.PrintSelection) if printDialog.exec_() == QDialog.Accepted: try: frame.print_(printer) @@ -2668,7 +2666,7 @@ """ Private slot to show the search engines configuration dialog. """ - from OpenSearch.OpenSearchDialog import OpenSearchDialog + from .OpenSearch.OpenSearchDialog import OpenSearchDialog dlg = OpenSearchDialog(self) dlg.exec_() @@ -2685,7 +2683,7 @@ """ Private slot to show the passwords management dialog. """ - from Passwords.PasswordsDialog import PasswordsDialog + from .Passwords.PasswordsDialog import PasswordsDialog dlg = PasswordsDialog(self) dlg.exec_() @@ -2822,4 +2820,4 @@ if cls._adblockManager is None: cls._adblockManager = AdBlockManager() - return cls._adblockManager \ No newline at end of file + return cls._adblockManager
--- a/Helpviewer/OpenSearch/OpenSearchEngine.py Thu Jan 07 15:22:29 2010 +0000 +++ b/Helpviewer/OpenSearch/OpenSearchEngine.py Thu Jan 07 19:03:58 2010 +0000 @@ -79,7 +79,7 @@ result = result.replace("{inputEncoding}", "UTF-8") result = result.replace("{outputEncoding}", "UTF-8") result = result.replace("{searchTerms}", - str(QUrl.toPercentEncoding(searchTerm))) + bytes(QUrl.toPercentEncoding(searchTerm)).decode()) result = re.sub(r"""\{([^\}]*:|)source\??\}""", Program, result) return result @@ -408,7 +408,8 @@ return if self.__suggestionsReply is not None: - self.__suggestionsReply.disconnect(self) + self.disconnect(self.__suggestionsReply, SIGNAL("finished()"), + self.__suggestionsObtained) self.__suggestionsReply.abort() self.__suggestionsReply = None
--- a/Utilities/__init__.py Thu Jan 07 15:22:29 2010 +0000 +++ b/Utilities/__init__.py Thu Jan 07 19:03:58 2010 +0000 @@ -1164,7 +1164,7 @@ pop = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,;:-_!$?*+#" marker = "CE4" rpw = "".join(random.sample(pop, 32)) + pw + "".join(random.sample(pop, 32)) - return marker + base64.b64encode(rpw) + return marker + base64.b64encode(rpw.encode()).decode() def pwDecode(epw): """ @@ -1176,7 +1176,7 @@ if not epw.startswith("CE4"): return epw # it was not encoded using pwEncode - return base64.b64decode(epw[3:])[32:-32] + return base64.b64decode(epw[3:].encode())[32:-32].decode() ################################################################################ # posix compatibility functions below
--- a/eric5.py Thu Jan 07 15:22:29 2010 +0000 +++ b/eric5.py Thu Jan 07 19:03:58 2010 +0000 @@ -43,7 +43,7 @@ sys.argv.remove(arg) break -# make ThirdParty package available as a packages repository +# make Third-Party package available as a packages repository try: import pygments except ImportError: @@ -250,4 +250,4 @@ raise err if __name__ == '__main__': - main() \ No newline at end of file + main()