Skip to content

Commit

Permalink
Applied patch from Borys Jurgiel to correct some plugin manager wobbl…
Browse files Browse the repository at this point in the history
…ies. See #4621
  • Loading branch information
timlinux committed Dec 9, 2011
1 parent 079713d commit 6fbad32
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/plugins/plugin_installer/installer_data.py
Expand Up @@ -70,7 +70,7 @@ def setIface(qgisIface):

# Repositories: (name, url, possible depreciated url)
officialRepo = ("QGIS Official Repository", "http://pyqgis.org/repo/official","")
officialRepo2 = ("QGIS Official Repository 2", "http://plugins.qgis.org/plugins","")
officialRepo2 = ("QGIS Official Repository 2", "http://plugins.qgis.org/plugins/plugins.xml","http://plugins.qgis.org/plugins")
contribRepo = ("QGIS Contributed Repository", "http://pyqgis.org/repo/contributed","")
authorRepos = [("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com", ""),
("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml", ""),
Expand Down Expand Up @@ -338,7 +338,13 @@ def load(self):
if url == officialRepo[1]:
officialRepoPresent = True
if url == officialRepo2[1]:
officialRepoPresent2 = True
if url == officialRepo[2]:
settings.setValue(key+"/url", QVariant(officialRepo[1])) # correct a depreciated url
officialRepoPresent = True
if url == officialRepo2[2]:
settings.setValue(key+"/url", QVariant(officialRepo2[1])) # correct a depreciated url
officialRepoPresent2 = True
for authorRepo in authorRepos:
if url == authorRepo[2]:
settings.setValue(key+"/url", QVariant(authorRepo[1])) # correct a depreciated url
Expand Down Expand Up @@ -658,7 +664,7 @@ def rebuild(self):
# check if the plugin is allowed and if there isn't any better one added already.
if (allowed != 1 or plugin["repository"] == officialRepo[0]) and (allowed == 3 or not plugin["experimental"]) \
and not (self.mPlugins.has_key(key) and self.mPlugins[key]["version_avail"] and compareVersions(self.mPlugins[key]["version_avail"], plugin["version_avail"]) < 2):
# The mPlugins doct contains now locally installed plugins.
# The mPlugins dict contains now locally installed plugins.
# Now, add the available one if not present yet or update it if present already.
if not self.mPlugins.has_key(key):
self.mPlugins[key] = plugin # just add a new plugin
Expand Down

0 comments on commit 6fbad32

Please sign in to comment.