Ignore:
Timestamp:
10/10/09 17:26:08 (10 years ago)
Author:
Kaydeth_parpg
Message:

Ticket #2: Patch by Kaydeth. Updated the classes in console.py through engine.py (went through files alphabetically) to correct some obvious discrepancies with our coding standard. comment[s:trac, t:2]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/context_menu.py

    r158 r312  
    1616#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
    1717 
    18 import fife, pychan 
     18import fife 
     19import pychan 
    1920 
    2021class ContextMenu(object): 
     
    3536            p = pychan.widgets.Button(name=item[0], text=unicode(item[1])) 
    3637            self.vbox.addChild(p) 
    37             events_to_map [item[0]] = self.action_decorator(*item[2:]) 
     38            events_to_map [item[0]] = self.actionDecorator(*item[2:]) 
    3839        self.vbox.mapEvents(events_to_map) 
    3940        self.show() 
     
    4647        self.vbox.hide() 
    4748         
    48     def action_decorator (self,func, *args, **kwargs): 
     49    def actionDecorator (self,func, *args, **kwargs): 
    4950        """This function is supposed to add some generic that should be 
    5051        executed before and/or after an action is fired through the 
     
    5859        """ 
    5960         
    60         def decorated_func (): 
     61        def decoratedFunc (): 
    6162            """ This is the actual wrapped version of func, that is returned. 
    6263            It takes no external arguments, so it can safely be passed around 
     
    7071            # return the value, as if the original function was called 
    7172            return ret_val 
    72         return decorated_func 
     73        return decoratedFunc 
    7374         
Note: See TracChangeset for help on using the changeset viewer.