37 """ |
38 """ |
38 while not self.atEnd(): |
39 while not self.atEnd(): |
39 self.readNext() |
40 self.readNext() |
40 if self.isStartElement(): |
41 if self.isStartElement(): |
41 if self.name() == "Plugins": |
42 if self.name() == "Plugins": |
42 self.version = self.attribute("version", |
43 self.version = self.attribute("version", |
43 pluginRepositoryFileFormatVersion) |
44 pluginRepositoryFileFormatVersion) |
44 if self.version not in self.supportedVersions: |
45 if self.version not in self.supportedVersions: |
45 self.raiseUnsupportedFormatVersion(self.version) |
46 self.raiseUnsupportedFormatVersion(self.version) |
46 elif self.name() == "RepositoryUrl": |
47 elif self.name() == "RepositoryUrl": |
47 url = self.readElementText() |
48 url = self.readElementText() |
55 |
56 |
56 def __readPlugin(self): |
57 def __readPlugin(self): |
57 """ |
58 """ |
58 Private method to read the plug-in info. |
59 Private method to read the plug-in info. |
59 """ |
60 """ |
60 pluginInfo = {"name" : "", |
61 pluginInfo = {"name": "", |
61 "short" : "", |
62 "short": "", |
62 "description" : "", |
63 "description": "", |
63 "url" : "", |
64 "url": "", |
64 "author" : "", |
65 "author": "", |
65 "version" : "", |
66 "version": "", |
66 "filename" : "", |
67 "filename": "", |
67 } |
68 } |
68 pluginInfo["status"] = self.attribute("status", "unknown") |
69 pluginInfo["status"] = self.attribute("status", "unknown") |
69 |
70 |
70 while not self.atEnd(): |
71 while not self.atEnd(): |
71 self.readNext() |
72 self.readNext() |
72 if self.isEndElement() and self.name() == "Plugin": |
73 if self.isEndElement() and self.name() == "Plugin": |
73 self.dlg.addEntry(pluginInfo["name"], pluginInfo["short"], |
74 self.dlg.addEntry(pluginInfo["name"], pluginInfo["short"], |
74 pluginInfo["description"], pluginInfo["url"], |
75 pluginInfo["description"], pluginInfo["url"], |
75 pluginInfo["author"], pluginInfo["version"], |
76 pluginInfo["author"], pluginInfo["version"], |
76 pluginInfo["filename"], pluginInfo["status"]) |
77 pluginInfo["filename"], pluginInfo["status"]) |
77 break |
78 break |
78 |
79 |
79 if self.isStartElement(): |
80 if self.isStartElement(): |