Exemplo n.º 1
0
 def reorder_items(self):
     """
         Reorders all menu items
     """
     pmap = {'first': 0, 'normal': 1, 'last': 2}
     items = [common.PosetItem(i.name, i.after,
                               pmap[i._pos], value=i) \
                 for i in self._items]
     items = common.order_poset(items)
     self._items = [i.value for i in items]
Exemplo n.º 2
0
 def reorder_items(self):
     """
         Reorders all menu items
     """
     pmap = {'first': 0, 'normal': 1, 'last': 2}
     items = [common.PosetItem(i.name, i.after,
                               pmap[i._pos], value=i) \
                 for i in self._items]
     items = common.order_poset(items)
     self._items = [i.value for i in items]