diff --git a/kcc.py b/kcc.py index 4cc096a..b13b696 100644 --- a/kcc.py +++ b/kcc.py @@ -35,12 +35,12 @@ else: from kcc import KCC_ui freeze_support() -app = QtGui.QApplication(sys.argv) +APP = QtGui.QApplication(sys.argv) KCC = QtGui.QMainWindow() -ui = KCC_ui.Ui_KCC() -ui.setupUi(KCC) -gui = KCC_gui.Ui_KCC(ui, KCC) +UI = KCC_ui.Ui_KCC() +UI.setupUi(KCC) +GUI = KCC_gui.Ui_KCC(UI, KCC) KCC.setWindowTitle("Kindle Comic Converter " + __version__) KCC.show() KCC.raise_() -sys.exit(app.exec_()) +sys.exit(APP.exec_()) diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 8e99e00..467e80d 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -145,15 +145,13 @@ class WorkerThread(QtCore.QThread): continue if not errors: os.remove(mobiPath + '_tostrip') - self.emit(QtCore.SIGNAL("addMessage"), 'Removing SRCS header... Done!', - 'info', True) + self.emit(QtCore.SIGNAL("addMessage"), 'Removing SRCS header... Done!', 'info', True) else: shutil.move(mobiPath + '_tostrip', mobiPath) self.emit(QtCore.SIGNAL("addMessage"), 'KindleStrip failed to remove SRCS header!', 'warning') self.emit(QtCore.SIGNAL("addMessage"), - 'MOBI file will work correctly but it will be highly oversized.', - 'warning') + 'MOBI file will work correctly but it will be highly oversized.', 'warning') else: os.remove(outputPath) os.remove(outputPath.replace('.epub', '.mobi')) @@ -161,10 +159,8 @@ class WorkerThread(QtCore.QThread): self.emit(QtCore.SIGNAL("addMessage"), 'Try converting smaller batch.', 'error') else: os.remove(outputPath) - self.emit(QtCore.SIGNAL("addMessage"), 'Created EPUB file is too big for KindleGen!', - 'error') - self.emit(QtCore.SIGNAL("addMessage"), 'Try converting smaller batch.', - 'error') + self.emit(QtCore.SIGNAL("addMessage"), 'Created EPUB file is too big for KindleGen!', 'error') + self.emit(QtCore.SIGNAL("addMessage"), 'Try converting smaller batch.', 'error') self.parent.needClean = True self.emit(QtCore.SIGNAL("addMessage"), 'All jobs completed.', 'warning') self.emit(QtCore.SIGNAL("modeConvert"), True) @@ -347,9 +343,9 @@ class Ui_KCC(object): self.settings.setValue('lastDevice', GUI.DeviceBox.currentIndex()) self.settings.sync() - def __init__(self, ui, KCC): + def __init__(self, UI, KCC): global GUI, MainWindow - GUI = ui + GUI = UI MainWindow = KCC profiles = sorted(ProfileData.ProfileLabels.iterkeys()) self.icons = Icons()