about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <[email protected]>2016-04-25 18:21:56 +0200
committerPaweł Jastrzębski <[email protected]>2016-04-25 18:21:56 +0200
commit4c56141b806466bc555cae42c8c9d42965fd4ab3 (patch)
tree22fe5cbb2adac280d0fc09d3fb9d13b51521c260
parentAdded Kindle Oasis profile (diff)
downloadkcc-4c56141b806466bc555cae42c8c9d42965fd4ab3.tar.gz
kcc-4c56141b806466bc555cae42c8c9d42965fd4ab3.tar.bz2
kcc-4c56141b806466bc555cae42c8c9d42965fd4ab3.zip
Save GUI size
-rw-r--r--kcc/KCC_gui.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index 3c3419c..f7ab992 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -751,6 +751,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
         self.settings.setValue('lastDevice', GUI.deviceBox.currentIndex())
         self.settings.setValue('currentFormat', GUI.formatBox.currentIndex())
         self.settings.setValue('startNumber', self.startNumber + 1)
+        self.settings.setValue('windowSize', str(MW.size().width()) + 'x' + str(MW.size().height()))
         self.settings.setValue('options', {'mangaBox': GUI.mangaBox.checkState(),
                                            'rotateBox': GUI.rotateBox.checkState(),
                                            'qualityBox': GUI.qualityBox.checkState(),
@@ -859,6 +860,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
         self.lastDevice = self.settings.value('lastDevice', 0, type=int)
         self.currentFormat = self.settings.value('currentFormat', 0, type=int)
         self.startNumber = self.settings.value('startNumber', 0, type=int)
+        self.windowSize = self.settings.value('windowSize', '0x0', type=str)
         self.options = self.settings.value('options', {'gammaSlider': 0})
         self.worker = WorkerThread()
         self.versionCheck = VersionThread()
@@ -1032,6 +1034,9 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
         self.versionCheck.start()
         self.tray.show()
 
+        if self.windowSize != '0x0':
+            x, y = self.windowSize.split('x')
+            MW.resize(int(x), int(y))
         MW.setWindowTitle("Kindle Comic Converter " + __version__)
         MW.show()
         MW.raise_()