1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

Code cleanup

This commit is contained in:
Paweł Jastrzębski
2017-11-02 10:28:43 +01:00
parent 7c0b78350d
commit a695a4c151
8 changed files with 109 additions and 132 deletions

View File

@@ -156,8 +156,8 @@ class VersionThread(QtCore.QThread):
'(<a href="https://github.com/ciromattia/kcc/releases/">'
'Changelog</a>)', 'warning', False)
def setAnswer(self, dialogAnswer):
self.answer = dialogAnswer
def setAnswer(self, dialoganswer):
self.answer = dialoganswer
def getNewVersion(self):
while self.answer is None:
@@ -180,8 +180,8 @@ class VersionThread(QtCore.QThread):
MW.hideProgressBar.emit()
MW.modeConvert.emit(1)
def getNewVersionTick(self, size, blockSize, totalSize):
progress = int((size / (totalSize // blockSize)) * 100)
def getNewVersionTick(self, size, blocksize, totalsize):
progress = int((size / (totalsize // blocksize)) * 100)
if size == 0:
MW.progressBarTick.emit('100')
if progress > self.barProgress:
@@ -667,10 +667,10 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">'
'List of supported Non-Kindle devices.</a>', 'info')
def changeFormat(self, outputFormat=None):
def changeFormat(self, outputformat=None):
profile = GUI.profiles[str(GUI.deviceBox.currentText())]
if outputFormat is not None:
GUI.formatBox.setCurrentIndex(outputFormat)
if outputformat is not None:
GUI.formatBox.setCurrentIndex(outputformat)
else:
GUI.formatBox.setCurrentIndex(profile['DefaultFormat'])
if not GUI.webtoonBox.isChecked():
@@ -881,10 +881,10 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
else:
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
def __init__(self, KCCAplication, KCCWindow):
def __init__(self, kccapp, kccwindow):
global APP, MW, GUI
APP = KCCAplication
MW = KCCWindow
APP = kccapp
MW = kccwindow
GUI = self
self.setupUi(MW)
self.editor = KCCGUI_MetaEditor()