26 # Start-of-Header |
26 # Start-of-Header |
27 name = "Pyramid Project Plugin" |
27 name = "Pyramid Project Plugin" |
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
29 autoactivate = True |
29 autoactivate = True |
30 deactivateable = True |
30 deactivateable = True |
31 version = "2.3.3" |
31 version = "2.3.4" |
32 className = "ProjectPyramidPlugin" |
32 className = "ProjectPyramidPlugin" |
33 packageName = "ProjectPyramid" |
33 packageName = "ProjectPyramid" |
34 shortDescription = "Project support for Pyramid projects." |
34 shortDescription = "Project support for Pyramid projects." |
35 longDescription = \ |
35 longDescription = \ |
36 """This plugin implements project support for Pyramid projects.""" |
36 """This plugin implements project support for Pyramid projects.""" |
153 |
153 |
154 self.__e5project = e5App().getObject("Project") |
154 self.__e5project = e5App().getObject("Project") |
155 |
155 |
156 self.__supportedVariants = [] |
156 self.__supportedVariants = [] |
157 |
157 |
158 def __checkVersions(self): |
|
159 """ |
|
160 Private function to check that the eric6 version is ok. |
|
161 |
|
162 @return flag indicating version is ok (boolean) |
|
163 """ |
|
164 global error |
|
165 |
|
166 if self.__ui.versionIsNewer('5.99.99', '20140701'): |
|
167 error = "" |
|
168 else: |
|
169 error = self.tr( |
|
170 "eric6 version is too old, {0}, {1} or newer needed.")\ |
|
171 .format("6.0.0", "20140701") |
|
172 return False |
|
173 |
|
174 return True |
|
175 |
|
176 def activate(self): |
158 def activate(self): |
177 """ |
159 """ |
178 Public method to activate this plugin. |
160 Public method to activate this plugin. |
179 |
161 |
180 @return tuple of None and activation status (boolean) |
162 @return tuple of None and activation status (boolean) |
181 """ |
163 """ |
182 if not self.__checkVersions(): |
|
183 return None, False |
|
184 |
|
185 global pyramidPluginObject |
164 global pyramidPluginObject |
186 pyramidPluginObject = self |
165 pyramidPluginObject = self |
187 |
166 |
188 self.__object = Project(self, self.__ui) |
167 self.__object = Project(self, self.__ui) |
189 self.__object.initActions() |
168 self.__object.initActions() |