PluginSelectionEncloser.py

changeset 26
cc3c2bf329ca
parent 24
da62f56bbb16
child 28
272ea41e7529
equal deleted inserted replaced
25:fd3d6ff6a09a 26:cc3c2bf329ca
22 # Start-Of-Header 22 # Start-Of-Header
23 name = "Selection Encloser Plug-in" 23 name = "Selection Encloser Plug-in"
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 24 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
25 autoactivate = True 25 autoactivate = True
26 deactivateable = True 26 deactivateable = True
27 version = "2.1.0" 27 version = "2.1.1"
28 className = "SelectionEncloserPlugin" 28 className = "SelectionEncloserPlugin"
29 packageName = "SelectionEncloser" 29 packageName = "SelectionEncloser"
30 shortDescription = "Enclose the selection with a string." 30 shortDescription = "Enclose the selection with a string."
31 longDescription = \ 31 longDescription = \
32 """This plug-in implements a tool to enclose the selection of""" \ 32 """This plug-in implements a tool to enclose the selection of""" \
260 if not menu.isEmpty(): 260 if not menu.isEmpty():
261 menu.addSeparator() 261 menu.addSeparator()
262 act = menu.addMenu(self.__menu) 262 act = menu.addMenu(self.__menu)
263 act.setEnabled(editor is not None and editor.hasSelectedText()) 263 act.setEnabled(editor is not None and editor.hasSelectedText())
264 elif name == "PluginTools" and self.__mainActions: 264 elif name == "PluginTools" and self.__mainActions:
265 self.__mainActions[-1].setEnabled(editor is not None and 265 self.__menu.setEnabled(editor is not None and
266 editor.hasSelectedText()) 266 editor.hasSelectedText())
267 267
268 def __editorOpened(self, editor): 268 def __editorOpened(self, editor):
269 """ 269 """
270 Private slot called, when a new editor was opened. 270 Private slot called, when a new editor was opened.
271 271

eric ide

mercurial