41 |
41 |
42 self.__plugin = plugin |
42 self.__plugin = plugin |
43 self.__project = project |
43 self.__project = project |
44 |
44 |
45 self.__e5project = e5App().getObject("Project") |
45 self.__e5project = e5App().getObject("Project") |
46 # TODO: move virtual env stuff to Project |
|
47 self.__virtualEnvManager = e5App().getObject("VirtualEnvManager") |
|
48 |
46 |
49 self.__hooksInstalled = False |
47 self.__hooksInstalled = False |
50 |
48 |
51 def initActions(self): |
49 def initActions(self): |
52 """ |
50 """ |
229 Private method to check, if the 'flask-babel' package is available. |
227 Private method to check, if the 'flask-babel' package is available. |
230 |
228 |
231 @return flag indicating the availability of 'flask-babel' |
229 @return flag indicating the availability of 'flask-babel' |
232 @rtype bool |
230 @rtype bool |
233 """ |
231 """ |
234 venvName = self.__plugin.getPreferences("VirtualEnvironmentNamePy3") |
232 interpreter = self.__project.getVirtualenvInterpreter() |
235 interpreter = self.__virtualEnvManager.getVirtualenvInterpreter( |
|
236 venvName) |
|
237 if interpreter and Utilities.isinpath(interpreter): |
233 if interpreter and Utilities.isinpath(interpreter): |
238 detector = os.path.join( |
234 detector = os.path.join( |
239 os.path.dirname(__file__), "FlaskBabelDetector.py") |
235 os.path.dirname(__file__), "FlaskBabelDetector.py") |
240 proc = QProcess() |
236 proc = QProcess() |
241 proc.setProcessChannelMode(QProcess.MergedChannels) |
237 proc.setProcessChannelMode(QProcess.MergedChannels) |