Mon, 11 Oct 2010 09:36:44 +0200
Added code to save the position of the download manager window.
Helpviewer/Download/DownloadManager.py | file | annotate | diff | comparison | revisions | |
Preferences/__init__.py | file | annotate | diff | comparison | revisions |
--- a/Helpviewer/Download/DownloadManager.py Sun Oct 10 21:12:43 2010 +0200 +++ b/Helpviewer/Download/DownloadManager.py Mon Oct 11 09:36:44 2010 +0200 @@ -234,6 +234,7 @@ Preferences.setHelp("DownloadManagerRemovePolicy", self.__removePolicy) Preferences.setHelp("DownloadManagerSize", self.size()) + Preferences.setHelp("DownloadManagerPosition", self.pos()) if self.__removePolicy == DownloadManager.RemoveExit: return @@ -253,6 +254,9 @@ size = Preferences.getHelp("DownloadManagerSize") if size.isValid(): self.resize(size) + pos = Preferences.getHelp("DownloadManagerPosition") + self.move(pos) + downloads = Preferences.getHelp("DownloadManagerDownloads") for download in downloads: if not download[0].isEmpty() and \
--- a/Preferences/__init__.py Sun Oct 10 21:12:43 2010 +0200 +++ b/Preferences/__init__.py Mon Oct 11 09:36:44 2010 +0200 @@ -586,6 +586,7 @@ "ShowPreview" : True, "DownloadManagerRemovePolicy" : 0, # never delete downloads "DownloadManagerSize" : QtCore.QSize(400, 300), + "DownloadManagerPosition" : QtCore.QPoint(), "DownloadManagerDownloads" : [], } @@ -1810,8 +1811,6 @@ elif key in ["AdBlockSubscriptions"]: return toList(prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key])) - elif key in ["DownloadManagerSize"]: - return prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key]) else: return prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key])