UI/UserInterface.py

changeset 5743
630a68372016
parent 5739
a870f5f03baa
child 5752
1860eca908e4
child 5759
b9369969b8ce
equal deleted inserted replaced
5742:dc9cd8059221 5743:630a68372016
3626 3626
3627 @param menu reference to the menu to be populated (QMenu) 3627 @param menu reference to the menu to be populated (QMenu)
3628 """ 3628 """
3629 menu.clear() 3629 menu.clear()
3630 3630
3631 tbList = [] 3631 for name, (text, tb) in sorted(self.__toolbars.items(),
3632 for name, (text, tb) in list(self.__toolbars.items()): 3632 key=lambda t: t[1][0]):
3633 tbList.append((text, tb, name))
3634
3635 for text, tb, name in sorted(tbList, key=lambda t: t[0]):
3636 act = menu.addAction(text) 3633 act = menu.addAction(text)
3637 act.setCheckable(True) 3634 act.setCheckable(True)
3638 act.setChecked(not tb.isHidden()) 3635 act.setChecked(not tb.isHidden())
3639 act.setData(name) 3636 act.setData(name)
3640 menu.addSeparator() 3637 menu.addSeparator()

eric ide

mercurial