Skip to content
Permalink
Browse files

Merge pull request #5511 from borysiasty/settings

Move plugin installer's settings to the [app] section
  • Loading branch information
borysiasty committed Nov 2, 2017
2 parents ac12258 + 4b6228d commit 151fb08734b68f3dabdcc5d67b1a03461a2f19b7
Showing with 9 additions and 7 deletions.
  1. +5 −6 python/pyplugin_installer/installer_data.py
  2. +4 −1 resources/2to3migration.txt
@@ -98,9 +98,8 @@

translatableAttributes = ["name", "description", "about", "tags"]

reposGroup = "/Qgis/plugin-repos"
settingsGroup = "/Qgis/plugin-installer"
seenPluginGroup = "/Qgis/plugin-seen"
settingsGroup = "app/plugin_installer"
reposGroup = "app/plugin_repositories"

officialRepo = (QCoreApplication.translate("QgsPluginInstaller", "QGIS Official Plugin Repository"), "https://plugins.qgis.org/plugins/plugins.xml")

@@ -790,7 +789,7 @@ def rebuild(self):
def markNews(self):
""" mark all new plugins as new """
settings = QgsSettings()
seenPlugins = settings.value(seenPluginGroup, list(self.mPlugins.keys()), type=str)
seenPlugins = settings.value(settingsGroup + '/seen_plugins', list(self.mPlugins.keys()), type=str)
if len(seenPlugins) > 0:
for i in list(self.mPlugins.keys()):
if seenPlugins.count(i) == 0 and self.mPlugins[i]["status"] == "not installed":
@@ -800,11 +799,11 @@ def markNews(self):
def updateSeenPluginsList(self):
""" update the list of all seen plugins """
settings = QgsSettings()
seenPlugins = settings.value(seenPluginGroup, list(self.mPlugins.keys()), type=str)
seenPlugins = settings.value(settingsGroup + '/seen_plugins', list(self.mPlugins.keys()), type=str)
for i in list(self.mPlugins.keys()):
if seenPlugins.count(i) == 0:
seenPlugins += [i]
settings.setValue(seenPluginGroup, seenPlugins)
settings.setValue(settingsGroup + '/seen_plugins', seenPlugins)

# ----------------------------------------- #
def isThereAnythingNew(self):
@@ -1,4 +1,4 @@
# version=1
# version=2
# If you update this file make sure you bump the above version number it must be higher then the last run.
#oldkey;newkey

@@ -17,3 +17,6 @@ Qgis/compileExpressions;*
variables/names;*
variables/values;*

#Plugin installer
Qgis/plugin-installer/*;app/plugin_installer/*
Qgis/plugin-repos/*;app/plugin_repositories/*

0 comments on commit 151fb08

Please sign in to comment.
You can’t perform that action at this time.