about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--kcc/KCC_gui.py4
-rwxr-xr-xkcc/comic2ebook.py25
-rw-r--r--kcc/shared.py3
3 files changed, 5 insertions, 27 deletions
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index c773529..22052bb 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -603,7 +603,9 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
             GUI.upscaleBox.setEnabled(False)
             GUI.upscaleBox.setChecked(True)
         else:
-            GUI.qualityBox.setEnabled(True)
+            profile = GUI.profiles[str(GUI.deviceBox.currentText())]
+            if profile['Quality']:
+                GUI.qualityBox.setEnabled(True)
             GUI.mangaBox.setEnabled(True)
             GUI.rotateBox.setEnabled(True)
             GUI.upscaleBox.setEnabled(True)
diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py
index a303739..52c6343 100755
--- a/kcc/comic2ebook.py
+++ b/kcc/comic2ebook.py
@@ -336,29 +336,6 @@ def buildOPF(dstdir, title, filelist, cover=None):
         f.write("</manifest>\n<spine page-progression-direction=\"rtl\" toc=\"ncx\">\n")
     else:
         f.write("</manifest>\n<spine page-progression-direction=\"ltr\" toc=\"ncx\">\n")
-    # if options.iskindle and options.profile != 'Custom':
-    #     if options.righttoleft:
-    #         nextflow = 'right'
-    #     else:
-    #         nextflow = 'left'
-    #     for entry in reflist:
-    #         if '-kcc-b' in entry:
-    #             if options.righttoleft:
-    #                 f.write("<itemref idref=\"page_" + entry + "\" properties=\"page-spread-right\"/>\n")
-    #             else:
-    #                 f.write("<itemref idref=\"page_" + entry + "\" properties=\"page-spread-left\"/>\n")
-    #         elif '-kcc-c' in entry:
-    #             if options.righttoleft:
-    #                 f.write("<itemref idref=\"page_" + entry + "\" properties=\"page-spread-left\"/>\n")
-    #             else:
-    #                 f.write("<itemref idref=\"page_" + entry + "\" properties=\"page-spread-right\"/>\n")
-    #         else:
-    #             f.write("<itemref idref=\"page_" + entry + "\" properties=\"facing-page-" + nextflow + "\"/>\n")
-    #             if nextflow == 'right':
-    #                 nextflow = 'left'
-    #             else:
-    #                 nextflow = 'right'
-    # else:
     for entry in reflist:
         f.write("<itemref idref=\"page_" + entry + "\"/>\n")
     f.write("</spine>\n</package>\n")
@@ -1184,7 +1161,6 @@ def makeBook(source, qtGUI=None):
     if not GUI and options.format == 'MOBI':
         print("Creating MOBI files...")
         work = []
-        k = kindle.Kindle()
         for i in filepath:
             work.append([i])
         output = makeMOBI(work, GUI)
@@ -1193,6 +1169,7 @@ def makeBook(source, qtGUI=None):
                 print('Error: KindleGen failed to create MOBI!')
                 print(errors)
                 return filepath
+        k = kindle.Kindle()
         if k.path and k.coverSupport:
             print("Kindle detected. Uploading covers...")
         for i in filepath:
diff --git a/kcc/shared.py b/kcc/shared.py
index c149502..88d1782 100644
--- a/kcc/shared.py
+++ b/kcc/shared.py
@@ -144,8 +144,7 @@ def removeFromZIP(zipfname, *filenames):
 
 def sanitizeTrace(traceback):
     return ''.join(format_tb(traceback))\
-        .replace('C:\\Users\\pawel\\Documents\\Projekty\\KCC\\', '') \
-        .replace('C:\\Users\\Paweł\\Documents\\Projekty\\KCC\\', '') \
+        .replace('C:\\Users\\Pawel\\Documents\\Projekty\\KCC\\', '') \
         .replace('C:\\Python35\\', '')\
         .replace('c:\\python35\\', '')