mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
Save/restore window geometry for plugin installer repo fetching dialog
This commit is contained in:
parent
3037f22482
commit
b83415688a
@ -24,7 +24,9 @@
|
||||
***************************************************************************/
|
||||
"""
|
||||
|
||||
from qgis.PyQt.QtCore import QByteArray
|
||||
from qgis.PyQt.QtWidgets import QDialog, QTreeWidgetItem
|
||||
from qgis.core import QgsSettings
|
||||
|
||||
from .ui_qgsplugininstallerfetchingbase import Ui_QgsPluginInstallerFetchingDialogBase
|
||||
from .installer_data import repositories
|
||||
@ -52,6 +54,14 @@ class QgsPluginInstallerFetchingDialog(QDialog, Ui_QgsPluginInstallerFetchingDia
|
||||
repositories.repositoryFetched.connect(self.repositoryFetched)
|
||||
repositories.anythingChanged.connect(self.displayState)
|
||||
|
||||
settings = QgsSettings()
|
||||
self.restoreGeometry(settings.value("/Qgis/plugin-installer/fetching_geometry", QByteArray()))
|
||||
|
||||
def closeEvent(self, event):
|
||||
settings = QgsSettings()
|
||||
settings.setValue("/Qgis/plugin-installer/fetching_geometry", self.saveGeometry())
|
||||
super(QgsPluginInstallerFetchingDialog, self).closeEvent(event)
|
||||
|
||||
# ----------------------------------------- #
|
||||
def displayState(self, key, state, state2=None):
|
||||
messages = [self.tr("Success"), self.tr("Resolving host name..."), self.tr("Connecting..."), self.tr("Host connected. Sending request..."), self.tr("Downloading data..."), self.tr("Idle"), self.tr("Closing connection..."), self.tr("Error")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user