Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Draft: Python 3 [Help wanted] #45

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ celerybeat.pid
.env
.venv
env/
venv/
venv*/
ENV/
env.bak/
venv.bak/
Expand Down Expand Up @@ -145,6 +145,7 @@ cython_debug/
*.cbz
*.pdf

settings.json
*.bat
.idea/

Expand Down
16 changes: 13 additions & 3 deletions mangle.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

## TODO # Port to Python3, PyQt5 # TODO ##
# X run 2to3
# X change imports to PyQt5 and update PyQt method calls
# X test main functionality:
# X build comic with images and generate all formats for at least 2 types of Kindle
# X test load/save .mngl files and other menu bar buttons.
# - remove unused imports
# - remove print/ debug
# - test all functions

import sys

from PyQt4 import QtGui
from PyQt5 import QtGui, QtCore, uic, QtWidgets
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5.QtCore import *

from mangle.book import MainWindowBook


application = QtGui.QApplication(sys.argv)
application = QtWidgets.QApplication(sys.argv)
filename = sys.argv[1] if len(sys.argv) > 1 else None
window = MainWindowBook(filename)
window.show()
Expand Down
11 changes: 6 additions & 5 deletions mangle/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.


from PyQt4 import QtGui, uic
#from PyQt4 import QtGui, uic
from PyQt5 import QtWidgets, uic
# from PyQt5.QtCore import *

import util
from . import util


class DialogAbout(QtGui.QDialog):
class DialogAbout(QtWidgets.QDialog):
def __init__(self, parent):
QtGui.QDialog.__init__(self, parent)
QtWidgets.QDialog.__init__(self, parent)
uic.loadUi(util.buildResPath('mangle/ui/about.ui'), self)
Loading