Skip to content

Commit 151fb08

Browse files
authoredNov 2, 2017
Merge pull request #5511 from borysiasty/settings
Move plugin installer's settings to the [app] section
2 parents ac12258 + 4b6228d commit 151fb08

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
 

‎python/pyplugin_installer/installer_data.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@
9898

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

101-
reposGroup = "/Qgis/plugin-repos"
102-
settingsGroup = "/Qgis/plugin-installer"
103-
seenPluginGroup = "/Qgis/plugin-seen"
101+
settingsGroup = "app/plugin_installer"
102+
reposGroup = "app/plugin_repositories"
104103

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

@@ -790,7 +789,7 @@ def rebuild(self):
790789
def markNews(self):
791790
""" mark all new plugins as new """
792791
settings = QgsSettings()
793-
seenPlugins = settings.value(seenPluginGroup, list(self.mPlugins.keys()), type=str)
792+
seenPlugins = settings.value(settingsGroup + '/seen_plugins', list(self.mPlugins.keys()), type=str)
794793
if len(seenPlugins) > 0:
795794
for i in list(self.mPlugins.keys()):
796795
if seenPlugins.count(i) == 0 and self.mPlugins[i]["status"] == "not installed":
@@ -800,11 +799,11 @@ def markNews(self):
800799
def updateSeenPluginsList(self):
801800
""" update the list of all seen plugins """
802801
settings = QgsSettings()
803-
seenPlugins = settings.value(seenPluginGroup, list(self.mPlugins.keys()), type=str)
802+
seenPlugins = settings.value(settingsGroup + '/seen_plugins', list(self.mPlugins.keys()), type=str)
804803
for i in list(self.mPlugins.keys()):
805804
if seenPlugins.count(i) == 0:
806805
seenPlugins += [i]
807-
settings.setValue(seenPluginGroup, seenPlugins)
806+
settings.setValue(settingsGroup + '/seen_plugins', seenPlugins)
808807

809808
# ----------------------------------------- #
810809
def isThereAnythingNew(self):

‎resources/2to3migration.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# version=1
1+
# version=2
22
# If you update this file make sure you bump the above version number it must be higher then the last run.
33
#oldkey;newkey
44

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

20+
#Plugin installer
21+
Qgis/plugin-installer/*;app/plugin_installer/*
22+
Qgis/plugin-repos/*;app/plugin_repositories/*

0 commit comments

Comments
 (0)
Please sign in to comment.