Changeset baf971c


Ignore:
Timestamp:
10/01/11 19:36:40 (3 years ago)
Author:
xkolman2 <xkolman2@…>
Branches:
master
Children:
a9d6b35
Parents:
8bfc6db
git-author:
xkolman2 <xkolman2@…> (10/01/11 19:36:40)
git-committer:
xkolman2 <xkolman2@…> (10/01/11 19:36:40)
Message:

refactor menu item drawing

git-svn-id: https://nlp.fi.muni.cz/svn/gps_navigace/trunk@565 0858a4d0-ffff-46e5-938e-62b5ecb34222

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/mod_menu.py

    r8bfc6db rbaf971c  
    492492  def initMenu(self,menu): 
    493493    """anitialize menu a menu dictionary instance to default parameters""" 
    494     self.menus[menu] = {'metadata':{'itemCount':0,'currentPage':0}} 
     494    self.menus[menu] = self.getInitializedMenu() 
     495 
     496  def getInitializedMenu(self): 
     497    return {'metadata':{'itemCount':0,'currentPage':0}} 
    495498     
    496499  def clearMenu(self, menu, cancelButtonAction='set:menu:main'): 
     
    505508    type = "simple" 
    506509    """we are counting up from zero for the item indexes""" 
    507     self.menus[menu][itemCount] = self.getItem(text, icon, action, type, timedAction) 
     510    self.menus[menu][itemCount] = self.generateItem(text, icon, action, type, timedAction) 
    508511    self.menus[menu]['metadata']['itemCount'] = itemCount + 1 
    509512 
    510   def getItem(self, text, icon, action, type, timedAction): 
     513  def generateItem(self, text, icon, action, type, timedAction): 
    511514    return (text, icon, action, type, timedAction) 
    512515 
Note: See TracChangeset for help on using the changeset viewer.