Small cleanup

This commit is contained in:
Paweł Jastrzębski
2013-06-21 18:30:11 +02:00
parent 3e117f46d5
commit 02d1fe308d
6 changed files with 7 additions and 9 deletions
-1
View File
@@ -33,7 +33,6 @@ from image import ProfileData
from subprocess import call, Popen, STDOUT, PIPE from subprocess import call, Popen, STDOUT, PIPE
from PyQt4 import QtGui, QtCore from PyQt4 import QtGui, QtCore
from xml.dom.minidom import parse from xml.dom.minidom import parse
from string import split
class Icons: class Icons:
+1 -1
View File
@@ -2,7 +2,7 @@
# Resource object code # Resource object code
# #
# Created: Śr 19. cze 10:35:51 2013 # Created: Pt 21. cze 18:23:49 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4) # by: The Resource Compiler for PyQt (Qt v4.8.4)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
+1 -1
View File
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC.ui' # Form implementation generated from reading ui file 'KCC.ui'
# #
# Created: Wed Jun 19 11:39:49 2013 # Created: Fri Jun 21 18:23:19 2013
# by: PyQt4 UI code generator 4.10.1 # by: PyQt4 UI code generator 4.10.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
+1 -1
View File
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC-OSX.ui' # Form implementation generated from reading ui file 'KCC-OSX.ui'
# #
# Created: Wed Jun 19 13:56:35 2013 # Created: Fri Jun 21 18:23:35 2013
# by: PyQt4 UI code generator 4.10.1 # by: PyQt4 UI code generator 4.10.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
+3 -5
View File
@@ -627,10 +627,8 @@ def getWorkFolder(afile):
def slugify(value): def slugify(value):
""" # Normalizes string, converts to lowercase, removes non-alpha characters,
Normalizes string, converts to lowercase, removes non-alpha characters, # and converts spaces to hyphens.
and converts spaces to hyphens.
"""
import unicodedata import unicodedata
value = unicodedata.normalize('NFKD', unicode(value, 'latin1')).encode('ascii', 'ignore') value = unicodedata.normalize('NFKD', unicode(value, 'latin1')).encode('ascii', 'ignore')
value = re.sub('[^\w\s\.-]', '', value).strip().lower() value = re.sub('[^\w\s\.-]', '', value).strip().lower()
@@ -794,7 +792,7 @@ def checkOptions():
options.panelview = True options.panelview = True
options.landscapemode = False options.landscapemode = False
else: else:
# Virtual Panel View # Virtual Panel View or Panel View disabled
options.panelview = False options.panelview = False
# Older Kindle don't need higher resolution files due lack of Panel View. # Older Kindle don't need higher resolution files due lack of Panel View.
# Kindle Fire family have very high resolution. Bigger images are not needed. # Kindle Fire family have very high resolution. Bigger images are not needed.
+1
View File
@@ -181,6 +181,7 @@ class ComicPage:
size = (self.size[0], self.size[1]) size = (self.size[0], self.size[1])
else: else:
size = (self.panelviewsize[0], self.panelviewsize[1]) size = (self.panelviewsize[0], self.panelviewsize[1])
# Kindle Paperwhite - Force upscale of splited pages to increase readability
if isSplit and landscapeMode: if isSplit and landscapeMode:
upscale = True upscale = True
if self.image.size[0] <= self.size[0] and self.image.size[1] <= self.size[1]: if self.image.size[0] <= self.size[0] and self.image.size[1] <= self.size[1]: