PluginCxFreeze.py

changeset 113
696a9105939d
parent 108
13fb1d9e7049
child 115
f2dd7703b9c2
equal deleted inserted replaced
112:031d64d92dc8 113:696a9105939d
24 # Start-of-Header 24 # Start-of-Header
25 name = "CxFreeze Plugin" 25 name = "CxFreeze Plugin"
26 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 26 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
27 autoactivate = True 27 autoactivate = True
28 deactivateable = True 28 deactivateable = True
29 version = "6.0.9" 29 version = "6.0.10"
30 className = "CxFreezePlugin" 30 className = "CxFreezePlugin"
31 packageName = "CxFreeze" 31 packageName = "CxFreeze"
32 shortDescription = "Show the CxFreeze dialogs." 32 shortDescription = "Show the CxFreeze dialogs."
33 longDescription = \ 33 longDescription = \
34 """This plugin implements the CxFreeze dialogs.""" \ 34 """This plugin implements the CxFreeze dialogs.""" \
243 def __initialize(self): 243 def __initialize(self):
244 """ 244 """
245 Private slot to (re)initialize the plugin. 245 Private slot to (re)initialize the plugin.
246 """ 246 """
247 self.__projectAct = None 247 self.__projectAct = None
248 self.__projectSeparator = None
248 249
249 def activate(self): 250 def activate(self):
250 """ 251 """
251 Public method to activate this plugin. 252 Public method to activate this plugin.
252 253
278 """ files and directories must be given absolute or""" 279 """ files and directories must be given absolute or"""
279 """ relative to the project directory.</p>""" 280 """ relative to the project directory.</p>"""
280 )) 281 ))
281 self.__projectAct.triggered.connect(self.__cxfreeze) 282 self.__projectAct.triggered.connect(self.__cxfreeze)
282 project.addE5Actions([self.__projectAct]) 283 project.addE5Actions([self.__projectAct])
284 self.__projectSeparator = menu.addSeparator()
283 menu.addAction(self.__projectAct) 285 menu.addAction(self.__projectAct)
284 project.showMenu.connect(self.__projectShowMenu) 286 project.showMenu.connect(self.__projectShowMenu)
285 287
286 error = "" 288 error = ""
287 return None, True 289 return None, True
294 if menu: 296 if menu:
295 if self.__projectAct: 297 if self.__projectAct:
296 menu.removeAction(self.__projectAct) 298 menu.removeAction(self.__projectAct)
297 e5App().getObject("Project").removeE5Actions( 299 e5App().getObject("Project").removeE5Actions(
298 [self.__projectAct]) 300 [self.__projectAct])
301 if self.__projectSeparator:
302 menu.removeAction(self.__projectSeparator)
303
299 self.__initialize() 304 self.__initialize()
300 305
301 def __projectShowMenu(self, menuName, menu): 306 def __projectShowMenu(self, menuName, menu):
302 """ 307 """
303 Private slot called, when the the project menu or a submenu is 308 Private slot called, when the the project menu or a submenu is

eric ide

mercurial