about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <[email protected]>2018-04-21 09:26:48 +0200
committerPaweł Jastrzębski <[email protected]>2018-04-21 09:26:48 +0200
commita2a405e5f599f9bebd7487abf2756b1aff4ff81d (patch)
treeaea2d21ff40585b94b7bdadd8a5b3183bba53628
parentUse more standard __version__ rather than PILLOW_VERSION (diff)
parentMake file type error more informative (display file name) (diff)
downloadkcc-a2a405e5f599f9bebd7487abf2756b1aff4ff81d.tar.gz
kcc-a2a405e5f599f9bebd7487abf2756b1aff4ff81d.tar.bz2
kcc-a2a405e5f599f9bebd7487abf2756b1aff4ff81d.zip
Merge branch 'Gokuroro-master' into dev
-rw-r--r--kindlecomicconverter/KCC_gui.py15
-rw-r--r--kindlecomicconverter/startup.py8
2 files changed, 9 insertions, 14 deletions
diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py
index 7959b40..d3e6f10 100644
--- a/kindlecomicconverter/KCC_gui.py
+++ b/kindlecomicconverter/KCC_gui.py
@@ -812,16 +812,11 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
             if self.needClean:
                 self.needClean = False
                 GUI.jobList.clear()
+            formats = ['.cbz', '.zip', '.pdf']
             if self.UnRAR:
-                if self.sevenza:
-                    formats = ['.cbz', '.cbr', '.cb7', '.zip', '.rar', '.7z', '.pdf']
-                else:
-                    formats = ['.cbz', '.cbr', '.zip', '.rar', '.pdf']
-            else:
-                if self.sevenza:
-                    formats = ['.cbz', '.cb7', '.zip', '.7z', '.pdf']
-                else:
-                    formats = ['.cbz', '.zip', '.pdf']
+                formats.extend(['.cbr', '.rar'])
+            if self.sevenza:
+                formats.extend(['.cb7', '.7z'])
             if os.path.isdir(message):
                 GUI.jobList.addItem(message)
                 GUI.jobList.scrollToBottom()
@@ -831,7 +826,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
                     GUI.jobList.addItem(message)
                     GUI.jobList.scrollToBottom()
                 else:
-                    self.addMessage('This file type is unsupported!', 'error')
+                    self.addMessage('Unsupported file type for ' + message, 'error')
 
     def dragAndDrop(self, e):
         e.accept()
diff --git a/kindlecomicconverter/startup.py b/kindlecomicconverter/startup.py
index deb6313..158f520 100644
--- a/kindlecomicconverter/startup.py
+++ b/kindlecomicconverter/startup.py
@@ -30,15 +30,15 @@ def start():
     os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = "1"
     KCCAplication = KCC_gui.QApplicationMessaging(sys.argv)
     if KCCAplication.isRunning():
-        if len(sys.argv) > 1:
-            KCCAplication.sendMessage(sys.argv[1])
+        for i in range (1, len(sys.argv)):
+            KCCAplication.sendMessage(sys.argv[i])
         else:
             KCCAplication.sendMessage('ARISE')
     else:
         KCCWindow = KCC_gui.QMainWindowKCC()
         KCCUI = KCC_gui.KCCGUI(KCCAplication, KCCWindow)
-        if len(sys.argv) > 1:
-            KCCUI.handleMessage(sys.argv[1])
+        for i in range (1, len(sys.argv)):
+            KCCUI.handleMessage(sys.argv[i])
         sys.exit(KCCAplication.exec_())