Skip to content

Commit

Permalink
Move plugin installer's settings to the [app] section
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Nov 2, 2017
1 parent 5ffbb35 commit 4b6228d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 5 additions & 6 deletions python/pyplugin_installer/installer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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":
Expand All @@ -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):
Expand Down
5 changes: 4 additions & 1 deletion resources/2to3migration.txt
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 4b6228d

Please sign in to comment.