Sat, 12 Jul 2014 17:02:12 +0200
Ported to PyQt5 and eric6.
diff -r 8c3fb315342c -r c475669c478a .hgignore --- a/.hgignore Sat Apr 26 16:23:02 2014 +0200 +++ b/.hgignore Sat Jul 12 17:02:12 2014 +0200 @@ -1,3 +1,5 @@ +glob:.eric6project +glob:_eric6project glob:.eric5project glob:_eric5project glob:.eric4project
diff -r 8c3fb315342c -r c475669c478a ChangeLog --- a/ChangeLog Sat Apr 26 16:23:02 2014 +0200 +++ b/ChangeLog Sat Jul 12 17:02:12 2014 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 2.0.0: +- ported for eric6 using PyQt5 + Version 1.0.0: - first stable release
diff -r 8c3fb315342c -r c475669c478a PluginWizardDataUriEncoder.e4p --- a/PluginWizardDataUriEncoder.e4p Sat Apr 26 16:23:02 2014 +0200 +++ b/PluginWizardDataUriEncoder.e4p Sat Jul 12 17:02:12 2014 +0200 @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Project SYSTEM "Project-5.1.dtd"> -<!-- eric5 project file for project PluginWizardDataUriEncoder --> +<!-- eric6 project file for project PluginWizardDataUriEncoder --> +<!-- Copyright (C) 2014 Detlev Offenbach, detlevqdie-offenbachs.de --> <Project version="5.1"> <Language>en_US</Language> <Hash>2144bd61ef339d39bc1790af5e236aaa2a8828ac</Hash> <ProgLanguage mixed="0">Python3</ProgLanguage> - <ProjectType>E4Plugin</ProjectType> + <ProjectType>E6Plugin</ProjectType> <Description>Plug-in implementing a wizard for the generation of code for base64 encoded data URIs.</Description> - <Version>0.1</Version> + <Version>2.x</Version> <Author>Detlev Offenbach</Author> <Email>detlevqdie-offenbachs.de</Email> <TranslationPattern>WizardDataUriEncoder/i18n/datauriencoder_%language%.ts</TranslationPattern> @@ -172,7 +173,7 @@ <string>cssFile</string> </key> <value> - <string>%PYTHON%/eric5/CSSs/default.css</string> + <string>%PYTHON%/eric6/CSSs/default.css</string> </value> <key> <string>ignoreDirectories</string> @@ -184,6 +185,8 @@ <string>.ropeproject</string> <string>_eric5project</string> <string>_ropeproject</string> + <string>.eric6project</string> + <string>_eric6project</string> </list> </value> <key>
diff -r 8c3fb315342c -r c475669c478a PluginWizardDataUriEncoder.py --- a/PluginWizardDataUriEncoder.py Sat Apr 26 16:23:02 2014 +0200 +++ b/PluginWizardDataUriEncoder.py Sat Jul 12 17:02:12 2014 +0200 @@ -11,8 +11,8 @@ import os -from PyQt4.QtCore import QObject, QTranslator -from PyQt4.QtGui import QDialog +from PyQt5.QtCore import QObject, QTranslator +from PyQt5.QtWidgets import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action @@ -23,7 +23,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "1.0.0" +version = "2.0.0" className = "WizardDataUriEncoderPlugin" packageName = "WizardDataUriEncoder" shortDescription = "Wizard for the creation of code for a base64 data URI." @@ -106,18 +106,18 @@ Private method to initialize the action. """ self.__action = E5Action( - self.trUtf8('Base64 Data Uri Encoder Wizard'), - self.trUtf8('Base&64 Data Uri Encoder Wizard...'), + self.tr('Base64 Data Uri Encoder Wizard'), + self.tr('Base&64 Data Uri Encoder Wizard...'), 0, 0, self, 'wizards_datauriencoder') - self.__action.setStatusTip(self.trUtf8( + self.__action.setStatusTip(self.tr( 'Base64 Data Uri Encoder Wizard')) - self.__action.setWhatsThis(self.trUtf8( + self.__action.setWhatsThis(self.tr( """<b>Base64 Data Uri Encoder Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create code for a base64 encoded data URI.</p>""" )) - self.__action.triggered[()].connect(self.__handle) + self.__action.triggered.connect(self.__handle) self.__ui.addE5Actions([self.__action], 'wizards') @@ -138,8 +138,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: from WizardDataUriEncoder.DataUriEncoderWizardDialog import \ DataUriEncoderWizardDialog
diff -r 8c3fb315342c -r c475669c478a PluginWizardDataUriEncoder.zip Binary file PluginWizardDataUriEncoder.zip has changed
diff -r 8c3fb315342c -r c475669c478a WizardDataUriEncoder/DataUriEncoderWizardDialog.py --- a/WizardDataUriEncoder/DataUriEncoderWizardDialog.py Sat Apr 26 16:23:02 2014 +0200 +++ b/WizardDataUriEncoder/DataUriEncoderWizardDialog.py Sat Jul 12 17:02:12 2014 +0200 @@ -12,8 +12,9 @@ import getpass import datetime -from PyQt4.QtCore import pyqtSlot -from PyQt4.QtGui import QDialog, QDialogButtonBox, QApplication, QInputDialog +from PyQt5.QtCore import pyqtSlot +from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QApplication, \ + QInputDialog from E5Gui.E5Completers import E5FileCompleter from E5Gui import E5FileDialog, E5MessageBox @@ -104,9 +105,9 @@ self.__getStartDir() inputFile = E5FileDialog.getOpenFileName( self, - self.trUtf8("Data URI Encoder"), + self.tr("Data URI Encoder"), start, - self.trUtf8( + self.tr( "Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;" "Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp" " *.xpm);;" @@ -143,8 +144,8 @@ if os.path.getsize(filepath) // 1024 // 1024 >= 1: res = E5MessageBox.warning( self, - self.trUtf8("Data URI Encoder"), - self.trUtf8( + self.tr("Data URI Encoder"), + self.tr( """The file size is > 1 Megabyte. Encoding this will""" """ take some time depending on your CPU processing""" """ power!"""), @@ -166,8 +167,8 @@ except (IOError, OSError) as err: E5MessageBox.critical( self, - self.trUtf8("Data URI Encoder"), - self.trUtf8( + self.tr("Data URI Encoder"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""" """<p>Reason: {1}</p>""").format(filepath, str(err))) return @@ -236,8 +237,8 @@ index = 0 mimetype, ok = QInputDialog.getItem( self, - self.trUtf8("Data URI Encoder"), - self.trUtf8("Enter a mime type:"), + self.tr("Data URI Encoder"), + self.tr("Enter a mime type:"), mimetypesList, index, True) if ok: