@@ -69,23 +69,27 @@ def setIface(qgisIface):
69
69
70
70
71
71
# Repositories: (name, url, possible depreciated url)
72
- officialRepo = ("QGIS Official Repository" , "http://pyqgis.org/repo/official" ,"" )
73
- officialRepo2 = ("QGIS Official Repository 2" , "http://plugins.qgis.org/plugins/plugins.xml" ,"http://plugins.qgis.org/plugins" )
74
- contribRepo = ("QGIS Contributed Repository" , "http://pyqgis.org/repo/contributed" ,"" )
75
- authorRepos = [("Aaron Racicot's Repository" , "http://qgisplugins.z-pulley.com" , "" ),
76
- ("Barry Rowlingson's Repository" , "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml" , "" ),
77
- # depreciated: ("Bob Bruce's Repository", "http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml", ""),
78
- # depreciated: ("Borys Jurgiel's Repository", "http://bwj.aster.net.pl/qgis/plugins.xml", "http://bwj.aster.net.pl/qgis-oldapi/plugins.xml"),
79
- ("Carson Farmer's Repository" , "http://www.ftools.ca/cfarmerQgisRepo.xml" , "http://www.ftools.ca/cfarmerQgisRepo_0.xx.xml" ),
80
- ("CatAIS Repository" , "http://www.catais.org/qgis/plugins.xml" , "" ),
81
- ("Faunalia Repository" , "http://www.faunalia.it/qgis/plugins.xml" , "http://faunalia.it/qgis/plugins.xml" ),
82
- ("GIS-Lab Repository" , "http://gis-lab.info/programs/qgis/qgis-repo.xml" , "" ),
83
- ("Kappasys Repository" , "http://www.kappasys.org/qgis/plugins.xml" , "" ),
84
- ("Martin Dobias' Sandbox" , "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml" , "" ),
85
- ("Marco Hugentobler's Repository" ,"http://karlinapp.ethz.ch/python_plugins/python_plugins.xml" , "" ),
86
- ("Sourcepole Repository" , "http://build.sourcepole.ch/qgis/plugins.xml" , "" ),
87
- #("Volkan Kepoglu's Repository","http://ggit.metu.edu.tr/~volkan/plugins.xml", "")
88
- ]
72
+ officialRepo = ("QGIS Official Repository" , "http://plugins.qgis.org/plugins/plugins.xml" ,"http://plugins.qgis.org/plugins" )
73
+ depreciatedRepos = [
74
+ ("Old QGIS Official Repository" , "http://pyqgis.org/repo/official" ),
75
+ ("Old QGIS Contributed Repository" ,"http://pyqgis.org/repo/contributed" ),
76
+ ("Aaron Racicot's Repository" , "http://qgisplugins.z-pulley.com" ),
77
+ ("Barry Rowlingson's Repository" , "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml" ),
78
+ ("Bob Bruce's Repository" , "http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml" ),
79
+ ("Borys Jurgiel's Repository" , "http://bwj.aster.net.pl/qgis/plugins.xml" ),
80
+ ("Borys Jurgiel's Repository 2" , "http://bwj.aster.net.pl/qgis-oldapi/plugins.xml" ),
81
+ ("Carson Farmer's Repository" , "http://www.ftools.ca/cfarmerQgisRepo.xml" ),
82
+ ("Carson Farmer's Repository 2" , "http://www.ftools.ca/cfarmerQgisRepo_0.xx.xml" ),
83
+ ("CatAIS Repository" , "http://www.catais.org/qgis/plugins.xml" ),
84
+ ("Faunalia Repository" , "http://www.faunalia.it/qgis/plugins.xml" ),
85
+ ("Faunalia Repository 2" , "http://faunalia.it/qgis/plugins.xml" ),
86
+ ("GIS-Lab Repository" , "http://gis-lab.info/programs/qgis/qgis-repo.xml" ),
87
+ ("Kappasys Repository" , "http://www.kappasys.org/qgis/plugins.xml" ),
88
+ ("Martin Dobias' Sandbox" , "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml" ),
89
+ ("Marco Hugentobler's Repository" , "http://karlinapp.ethz.ch/python_plugins/python_plugins.xml" ),
90
+ ("Sourcepole Repository" , "http://build.sourcepole.ch/qgis/plugins.xml" ),
91
+ ("Volkan Kepoglu's Repository" , "http://ggit.metu.edu.tr/~volkan/plugins.xml" )
92
+ ]
89
93
90
94
91
95
@@ -189,32 +193,27 @@ def __init__(self):
189
193
self .httpId = {} # {httpId : repoName}
190
194
191
195
192
- # ----------------------------------------- #
193
- def addKnownRepos (self ):
194
- """ add known 3rd party repositories to QSettings """
195
- presentURLs = []
196
- for i in self .all ().values ():
197
- presentURLs += [QString (i ["url" ])]
198
- settings = QSettings ()
199
- settings .beginGroup (reposGroup )
200
- # add the central repositories
201
- if presentURLs .count (officialRepo [1 ]) == 0 :
202
- settings .setValue (officialRepo [0 ]+ "/url" , QVariant (officialRepo [1 ]))
203
- settings .setValue (officialRepo [0 ]+ "/enabled" , QVariant (True ))
204
- if presentURLs .count (officialRepo2 [1 ]) == 0 :
205
- settings .setValue (officialRepo2 [0 ]+ "/url" , QVariant (officialRepo2 [1 ]))
206
- settings .setValue (officialRepo2 [0 ]+ "/enabled" , QVariant (True ))
207
- if presentURLs .count (contribRepo [1 ]) == 0 :
208
- settings .setValue (contribRepo [0 ]+ "/url" , QVariant (contribRepo [1 ]))
209
- settings .setValue (contribRepo [0 ]+ "/enabled" , QVariant (True ))
210
- # add author repositories
211
- for i in authorRepos :
212
- if i [1 ] and presentURLs .count (i [1 ]) == 0 :
213
- repoName = QString (i [0 ])
214
- if self .all ().has_key (repoName ):
215
- repoName = repoName + " (original)"
216
- settings .setValue (repoName + "/url" , QVariant (i [1 ]))
217
- settings .setValue (repoName + "/enabled" , QVariant (True ))
196
+ ## depreciated in qgis 1.8 until we use 3rd party repos again
197
+ ## ----------------------------------------- #
198
+ #def addKnownRepos(self):
199
+ #""" add known 3rd party repositories to QSettings """
200
+ #presentURLs = []
201
+ #for i in self.all().values():
202
+ #presentURLs += [QString(i["url"])]
203
+ #settings = QSettings()
204
+ #settings.beginGroup(reposGroup)
205
+ ## add the official repository
206
+ #if presentURLs.count(officialRepo[1]) == 0:
207
+ #settings.setValue(officialRepo[0]+"/url", QVariant(officialRepo[1]))
208
+ #settings.setValue(officialRepo[0]+"/enabled", QVariant(True))
209
+ ## add author repositories
210
+ #for i in authorRepos:
211
+ #if i[1] and presentURLs.count(i[1]) == 0:
212
+ #repoName = QString(i[0])
213
+ #if self.all().has_key(repoName):
214
+ #repoName = repoName + " (original)"
215
+ #settings.setValue(repoName+"/url", QVariant(i[1]))
216
+ #settings.setValue(repoName+"/enabled", QVariant(True))
218
217
219
218
220
219
# ----------------------------------------- #
@@ -328,31 +327,15 @@ def load(self):
328
327
settings .beginGroup (reposGroup )
329
328
# first, update repositories in QSettings if needed
330
329
officialRepoPresent = False
331
- officialRepo2Present = False
332
330
for key in settings .childGroups ():
333
331
url = settings .value (key + "/url" , QVariant ()).toString ()
334
- if url == contribRepo [1 ]:
335
- settings .setValue (key + "/valid" , QVariant (True )) # unlock the contrib repo in qgis 1.x
336
- else :
337
- settings .setValue (key + "/valid" , QVariant (True )) # unlock any other repo
338
332
if url == officialRepo [1 ]:
339
333
officialRepoPresent = True
340
- if url == officialRepo2 [1 ]:
341
- officialRepoPresent2 = True
342
334
if url == officialRepo [2 ]:
343
335
settings .setValue (key + "/url" , QVariant (officialRepo [1 ])) # correct a depreciated url
344
336
officialRepoPresent = True
345
- if url == officialRepo2 [2 ]:
346
- settings .setValue (key + "/url" , QVariant (officialRepo2 [1 ])) # correct a depreciated url
347
- officialRepoPresent2 = True
348
- for authorRepo in authorRepos :
349
- if url == authorRepo [2 ]:
350
- settings .setValue (key + "/url" , QVariant (authorRepo [1 ])) # correct a depreciated url
351
337
if not officialRepoPresent :
352
338
settings .setValue (officialRepo [0 ]+ "/url" , QVariant (officialRepo [1 ]))
353
- if not officialRepo2Present :
354
- settings .setValue (officialRepo2 [0 ]+ "/url" , QVariant (officialRepo2 [1 ]))
355
-
356
339
357
340
for key in settings .childGroups ():
358
341
self .mRepositories [key ] = {}
0 commit comments