diff options
| author | Paweł Jastrzębski <[email protected]> | 2014-01-17 19:37:35 +0100 |
|---|---|---|
| committer | Paweł Jastrzębski <[email protected]> | 2014-01-17 19:37:35 +0100 |
| commit | 66b867c1ca7d28d394a9312d07da01e4afd05724 (patch) | |
| tree | 642e418c61201190fc23f981a8d44f021256566c | |
| parent | Drag & drop for OSX and Linux (diff) | |
| download | kcc-66b867c1ca7d28d394a9312d07da01e4afd05724.tar.gz kcc-66b867c1ca7d28d394a9312d07da01e4afd05724.tar.bz2 kcc-66b867c1ca7d28d394a9312d07da01e4afd05724.zip | |
Various multi-os tweaks
| -rw-r--r-- | kcc-c2e.py | 16 | ||||
| -rw-r--r-- | kcc-c2p.py | 16 | ||||
| -rw-r--r-- | kcc.py | 20 | ||||
| -rw-r--r-- | kcc/KCC_gui.py | 5 |
4 files changed, 32 insertions, 25 deletions
diff --git a/kcc-c2e.py b/kcc-c2e.py index 76dcf81..54b2e03 100644 --- a/kcc-c2e.py +++ b/kcc-c2e.py @@ -43,12 +43,16 @@ try: except ImportError: missing.append('Pillow 2.3.0+') if len(missing) > 0: - print('ERROR: ' + ', '.join(missing) + ' is not installed!') - import tkinter - import tkinter.messagebox - importRoot = tkinter.Tk() - importRoot.withdraw() - tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + try: + # noinspection PyUnresolvedReferences + import tkinter + # noinspection PyUnresolvedReferences + import tkinter.messagebox + importRoot = tkinter.Tk() + importRoot.withdraw() + tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + except ImportError: + print('ERROR: ' + ', '.join(missing) + ' is not installed!') exit(1) import sys diff --git a/kcc-c2p.py b/kcc-c2p.py index a8463d4..8b3feaa 100644 --- a/kcc-c2p.py +++ b/kcc-c2p.py @@ -33,12 +33,16 @@ try: except ImportError: missing.append('Pillow 2.3.0+') if len(missing) > 0: - print('ERROR: ' + ', '.join(missing) + ' is not installed!') - import tkinter - import tkinter.messagebox - importRoot = tkinter.Tk() - importRoot.withdraw() - tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + try: + # noinspection PyUnresolvedReferences + import tkinter + # noinspection PyUnresolvedReferences + import tkinter.messagebox + importRoot = tkinter.Tk() + importRoot.withdraw() + tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + except ImportError: + print('ERROR: ' + ', '.join(missing) + ' is not installed!') exit(1) import sys diff --git a/kcc.py b/kcc.py index 74a02e6..95f927e 100644 --- a/kcc.py +++ b/kcc.py @@ -48,12 +48,16 @@ try: except ImportError: missing.append('Pillow 2.3.0+') if len(missing) > 0: - print('ERROR: ' + ', '.join(missing) + ' is not installed!') - import tkinter - import tkinter.messagebox - importRoot = tkinter.Tk() - importRoot.withdraw() - tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + try: + # noinspection PyUnresolvedReferences + import tkinter + # noinspection PyUnresolvedReferences + import tkinter.messagebox + importRoot = tkinter.Tk() + importRoot.withdraw() + tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + except ImportError: + print('ERROR: ' + ', '.join(missing) + ' is not installed!') exit(1) import sys @@ -95,10 +99,6 @@ class QApplicationMessaging(QtWidgets.QApplication): self._server.newConnection.connect(self.handleMessage) self._server.listen(self._key) - def __del__(self): - if self._memory.isAttached(): - self._memory.detach() - def isRunning(self): return self._running diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index afe4d7e..0cc6057 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -1021,13 +1021,11 @@ class KCCGUI(KCC_ui.Ui_KCC): elif sys.platform.startswith('linux'): self.listFontSize = 8 self.statusBarFontSize = 8 - self.statusBarStyle = 'QLabel{padding-top:5px;padding-bottom:3px;border-top:2px solid #C2C7CB}' - self.tray.show() + self.statusBarStyle = 'QLabel{padding-top:2px;padding-bottom:3px;border-top:2px solid #C2C7CB}' else: self.listFontSize = 9 self.statusBarFontSize = 8 self.statusBarStyle = 'QLabel{padding-top:3px;padding-bottom:3px;border-top:2px solid #C2C7CB}' - self.tray.show() self.profiles = { "Kindle Paperwhite": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0, @@ -1212,3 +1210,4 @@ class KCCGUI(KCC_ui.Ui_KCC): MW.setWindowTitle("Kindle Comic Converter " + __version__) MW.show() MW.raise_() + self.tray.show() |