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.2.1" |
31 version = "2.3.0" |
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.""" |
125 self.__defaults = { |
125 self.__defaults = { |
126 "VirtualEnvironmentPy2": "", |
126 "VirtualEnvironmentPy2": "", |
127 "VirtualEnvironmentPy3": "", |
127 "VirtualEnvironmentPy3": "", |
128 "Python2ConsoleType": "python", |
128 "Python2ConsoleType": "python", |
129 "Python3ConsoleType": "python", |
129 "Python3ConsoleType": "python", |
130 "PyramidDocUrl": "http://docs.pylonsproject.org/en/latest/" |
130 "PyramidDocUrl": "http://docs.pylonsproject.org/projects/" |
131 "docs/pyramid.html", |
131 "pyramid/en/latest/index.html", |
132 "TranslationsEditor": "", |
132 "TranslationsEditor": "", |
|
133 "UseExternalBrowser": False, |
133 } |
134 } |
134 if isWindowsPlatform(): |
135 if isWindowsPlatform(): |
135 self.__defaults["ConsoleCommand"] = "cmd.exe /c" |
136 self.__defaults["ConsoleCommand"] = "cmd.exe /c" |
136 elif isMacPlatform(): |
137 elif isMacPlatform(): |
137 self.__defaults["ConsoleCommand"] = "xterm -e" |
138 self.__defaults["ConsoleCommand"] = "xterm -e" |
351 """ |
352 """ |
352 if filename.endswith(".po"): |
353 if filename.endswith(".po"): |
353 filename = filename.replace(".po", ".mo") |
354 filename = filename.replace(".po", ".mo") |
354 return filename |
355 return filename |
355 |
356 |
356 def getPreferences(self, key): |
357 def getDefaultPreference(self, key): |
357 """ |
358 """ |
358 Public method to retrieve the various settings. |
359 Public method to get the default value for a setting. |
359 |
360 |
360 @param key the key of the value to get |
361 @param key the key of the value to get |
361 @return the requested setting |
362 @return the requested setting |
362 """ |
363 """ |
363 return Preferences.Prefs.settings.value( |
364 return self.__defaults[key] |
364 self.PreferencesKey + "/" + key, self.__defaults[key]) |
365 |
|
366 def getPreferences(self, key): |
|
367 """ |
|
368 Public method to retrieve the various settings. |
|
369 |
|
370 @param key the key of the value to get |
|
371 @return the requested setting |
|
372 """ |
|
373 if key in ["UseExternalBrowser"]: |
|
374 return Preferences.toBool(Preferences.Prefs.settings.value( |
|
375 self.PreferencesKey + "/" + key, self.__defaults[key])) |
|
376 else: |
|
377 return Preferences.Prefs.settings.value( |
|
378 self.PreferencesKey + "/" + key, self.__defaults[key]) |
365 |
379 |
366 def setPreferences(self, key, value): |
380 def setPreferences(self, key, value): |
367 """ |
381 """ |
368 Public method to store the various settings. |
382 Public method to store the various settings. |
369 |
383 |