src/eric7/ViewManager/ViewManager.py

branch
eric7
changeset 10376
4146ac0fd307
parent 10373
093dcebe5ecb
child 10377
9f6ffcd1db54
equal deleted inserted replaced
10375:ac11b0e49504 10376:4146ac0fd307
6501 6501
6502 def __editToggleComment(self): 6502 def __editToggleComment(self):
6503 """ 6503 """
6504 Private method to handle the toggle comment action. 6504 Private method to handle the toggle comment action.
6505 """ 6505 """
6506 self.activeWindow().toggleCommentBlock() 6506 self.activeWindow().toggleComment()
6507 6507
6508 def __editComment(self): 6508 def __editComment(self):
6509 """ 6509 """
6510 Private method to handle the comment action. 6510 Private method to handle the comment action.
6511 """ 6511 """
7474 self.redoAct.setEnabled(editor.isRedoAvailable()) 7474 self.redoAct.setEnabled(editor.isRedoAvailable())
7475 self.gotoLastEditAct.setEnabled(editor.isLastEditPositionAvailable()) 7475 self.gotoLastEditAct.setEnabled(editor.isLastEditPositionAvailable())
7476 7476
7477 lex = editor.getLexer() 7477 lex = editor.getLexer()
7478 if lex is not None: 7478 if lex is not None:
7479 self.commentAct.setEnabled(lex.canBlockComment()) 7479 self.commentAct.setEnabled(
7480 self.uncommentAct.setEnabled(lex.canBlockComment()) 7480 lex.canBlockComment() or lex.canStreamComment()
7481 )
7482 self.uncommentAct.setEnabled(
7483 lex.canBlockComment() or lex.canStreamComment()
7484 )
7485 self.toggleCommentAct.setEnabled(
7486 lex.canBlockComment() or lex.canStreamComment()
7487 )
7481 self.streamCommentAct.setEnabled(lex.canStreamComment()) 7488 self.streamCommentAct.setEnabled(lex.canStreamComment())
7482 self.boxCommentAct.setEnabled(lex.canBoxComment()) 7489 self.boxCommentAct.setEnabled(lex.canBoxComment())
7483 else: 7490 else:
7484 self.commentAct.setEnabled(False) 7491 self.commentAct.setEnabled(False)
7485 self.uncommentAct.setEnabled(False) 7492 self.uncommentAct.setEnabled(False)
7493 self.toggleCommentAct.setEnabled(False)
7486 self.streamCommentAct.setEnabled(False) 7494 self.streamCommentAct.setEnabled(False)
7487 self.boxCommentAct.setEnabled(False) 7495 self.boxCommentAct.setEnabled(False)
7488 7496
7489 if editor.hasBookmarks(): 7497 if editor.hasBookmarks():
7490 self.bookmarkNextAct.setEnabled(True) 7498 self.bookmarkNextAct.setEnabled(True)

eric ide

mercurial