Commit f5582ae06cdc1db3187a405e240b26b7fd7cfb44
1 parent
469c5273
Exists in
threshold_history
The messaging patterns used in undo and redo menu are being define by the consta…
…nts UNDO_TEXT and REDO_TEXT, respectively
Showing
1 changed file
with
8 additions
and
6 deletions
Show diff stats
invesalius/gui/frame.py
... | ... | @@ -45,6 +45,8 @@ VIEW_TOOLS = [ID_LAYOUT, ID_TEXT] =\ |
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | +UNDO_TEXT = _(u'&Undo %s \tCtrl+Z') | |
49 | +REDO_TEXT = _(u'&Redo %s \tCtrl+Y') | |
48 | 50 | |
49 | 51 | |
50 | 52 | |
... | ... | @@ -548,8 +550,8 @@ class MenuBar(wx.MenuBar): |
548 | 550 | file_edit = wx.Menu() |
549 | 551 | file_edit.AppendMenu(wx.NewId(), _('Flip'), flip_menu) |
550 | 552 | file_edit.AppendMenu(wx.NewId(), _('Swap axes'), swap_axes_menu) |
551 | - file_edit.Append(wx.ID_UNDO, _(u"Undo\tCtrl+Z")).Enable(False) | |
552 | - file_edit.Append(wx.ID_REDO, _(u"Redo\tCtrl+Y")).Enable(False) | |
553 | + file_edit.Append(wx.ID_UNDO, UNDO_TEXT % '').Enable(False) | |
554 | + file_edit.Append(wx.ID_REDO, REDO_TEXT % '').Enable(False) | |
553 | 555 | #app(const.ID_EDIT_LIST, "Show Undo List...") |
554 | 556 | ################################################################# |
555 | 557 | |
... | ... | @@ -634,20 +636,20 @@ class MenuBar(wx.MenuBar): |
634 | 636 | def OnEnableUndo(self, pubsub_evt): |
635 | 637 | descr = pubsub_evt.data |
636 | 638 | self.FindItemById(wx.ID_UNDO).Enable(True) |
637 | - self.FindItemById(wx.ID_UNDO).SetItemLabel(_(u"Undo: %s \tCtrl+Z" % descr)) | |
639 | + self.FindItemById(wx.ID_UNDO).SetItemLabel(UNDO_TEXT % descr) | |
638 | 640 | |
639 | 641 | def OnDisableUndo(self, pubsub_evt): |
640 | 642 | self.FindItemById(wx.ID_UNDO).Enable(False) |
641 | - self.FindItemById(wx.ID_UNDO).SetItemLabel(_(u"Undo:\tCtrl+Z")) | |
643 | + self.FindItemById(wx.ID_UNDO).SetItemLabel(UNDO_TEXT % '') | |
642 | 644 | |
643 | 645 | def OnEnableRedo(self, pubsub_evt): |
644 | 646 | descr = pubsub_evt.data |
645 | 647 | self.FindItemById(wx.ID_REDO).Enable(True) |
646 | - self.FindItemById(wx.ID_REDO).SetItemLabel(_(u"Redo: %s \tCtrl+Y" % descr)) | |
648 | + self.FindItemById(wx.ID_REDO).SetItemLabel(REDO_TEXT % descr) | |
647 | 649 | |
648 | 650 | def OnDisableRedo(self, pubsub_evt): |
649 | 651 | self.FindItemById(wx.ID_REDO).Enable(False) |
650 | - self.FindItemById(wx.ID_REDO).SetItemLabel(_(u"Redo:\tCtrl+Y")) | |
652 | + self.FindItemById(wx.ID_REDO).SetItemLabel(REDO_TEXT % '') | |
651 | 653 | # ------------------------------------------------------------------ |
652 | 654 | # ------------------------------------------------------------------ |
653 | 655 | # ------------------------------------------------------------------ | ... | ... |