[wpdev-commits] xmlscripts/scripts/contextmenus petmenu.py,1.5,1.6
Brought to you by:
rip,
thiagocorrea
From: Jorge P. <ke...@us...> - 2004-08-24 18:11:08
|
Update of /cvsroot/wpdev/xmlscripts/scripts/contextmenus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28093/contextmenus Modified Files: petmenu.py Log Message: - Replaced access to .events with the calls hasevent/addevent/removeevent in all relevant places. Notice that addevent() is expected to add the event to the head of the list. I recognized no situation (of those changed) where it would make a difference adding the event to the end of the list, so in those cases used addevent aswell. - Fixed a copy&paste error in trap.py on removing the tags (pointed out by Incannus). note: .events can now be made read only, bearing in mind that in doing so there is no way to make a distinction between adding an event at the top or at the end of the event list. Index: petmenu.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/contextmenus/petmenu.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** petmenu.py 2 Jun 2004 15:03:04 -0000 1.5 --- petmenu.py 24 Aug 2004 18:10:25 -0000 1.6 *************** *** 17,21 **** def onContextEntry(char, target, tag): ! if not "speech.pets" in target.events: return 0 --- 17,21 ---- def onContextEntry(char, target, tag): ! if not target.hasevent( 'speech.pets' ): return 0 |