comparison clients/editor/plugins/HistoryManager.py @ 318:e2ac8bb1a22c

* Added tooltips and hotkey information for some buttons * Fixed a small bug where toolbar did not resize when button style was changed
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 15 Aug 2009 18:31:01 +0000
parents 6add14ebe9f5
children 8b125ec749d7
comparison
equal deleted inserted replaced
317:a185aff39051 318:e2ac8bb1a22c
26 return 26 return
27 27
28 self.editor = scripts.editor.getEditor() 28 self.editor = scripts.editor.getEditor()
29 self.engine = self.editor.getEngine() 29 self.engine = self.editor.getEngine()
30 30
31 self._undoGroup = ActionGroup(name=u"UndoGroup")
32 self._showAction = Action(u"History manager", checkable=True) 31 self._showAction = Action(u"History manager", checkable=True)
33 self._undoAction = Action(u"Undo", "gui/icons/undo.png") 32 self._undoAction = Action(u"Undo", "gui/icons/undo.png")
34 self._redoAction = Action(u"Redo", "gui/icons/redo.png") 33 self._redoAction = Action(u"Redo", "gui/icons/redo.png")
35 self._nextAction = Action(u"Next branch", "gui/icons/next_branch.png") 34 self._nextAction = Action(u"Next branch", "gui/icons/next_branch.png")
36 self._prevAction = Action(u"Previous branch", "gui/icons/previous_branch.png") 35 self._prevAction = Action(u"Previous branch", "gui/icons/previous_branch.png")
36
37 self._showAction.helptext = u"Toggle HistoryManager"
38 self._undoAction.helptext = u"Undo action (CTRL+Z)"
39 self._redoAction.helptext = u"Redo action (CTRL+SHIFT+Z)"
40 self._nextAction.helptext = u"Next branch (CTRL+ALT+Z"
41 self._prevAction.helptext = u"Previous branch (CTRL+ALT+SHIFT+Z)"
42
37 scripts.gui.action.activated.connect(self.toggle, sender=self._showAction) 43 scripts.gui.action.activated.connect(self.toggle, sender=self._showAction)
38 scripts.gui.action.activated.connect(self._undo, sender=self._undoAction) 44 scripts.gui.action.activated.connect(self._undo, sender=self._undoAction)
39 scripts.gui.action.activated.connect(self._redo, sender=self._redoAction) 45 scripts.gui.action.activated.connect(self._redo, sender=self._redoAction)
40 scripts.gui.action.activated.connect(self._next, sender=self._nextAction) 46 scripts.gui.action.activated.connect(self._next, sender=self._nextAction)
41 scripts.gui.action.activated.connect(self._prev, sender=self._prevAction) 47 scripts.gui.action.activated.connect(self._prev, sender=self._prevAction)
42 48
49 self._undoGroup = ActionGroup(name=u"UndoGroup")
43 self._undoGroup.addAction(self._undoAction) 50 self._undoGroup.addAction(self._undoAction)
44 self._undoGroup.addAction(self._redoAction) 51 self._undoGroup.addAction(self._redoAction)
45 self._undoGroup.addAction(self._nextAction) 52 self._undoGroup.addAction(self._nextAction)
46 self._undoGroup.addAction(self._prevAction) 53 self._undoGroup.addAction(self._prevAction)
47 54