[pyatspi2] Support startswith for event types



commit 0cb2f930135ce0119d2cb174af8070d2c344fc14
Author: Mike Gorse <mgorse novell com>
Date:   Wed Dec 29 10:42:15 2010 -0500

    Support startswith for event types

 pyatspi/Accessibility.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/pyatspi/Accessibility.py b/pyatspi/Accessibility.py
index dd0cdd4..c9f77db 100644
--- a/pyatspi/Accessibility.py
+++ b/pyatspi/Accessibility.py
@@ -277,6 +277,7 @@ Atspi.Value.minimumValue = property(fget=Atspi.Value.get_minimum_value)
 Atspi.Event.host_application = property(fget=lambda x: x.source.get_application())
 Atspi.EventType.__repr__ = eventTypeToString
 Atspi.EventType.__str__ = eventTypeToString
+Atspi.EventType.startswith = lambda x,s: str(x).startswith(s)
 
 ### RelationSet ###
 Atspi.Relation.getRelationType = Atspi.Relation.get_relation_type



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]