From 082eb343736e927ba94930715e000be6e69549a7 Mon Sep 17 00:00:00 2001 From: Willie Walker Date: Wed, 22 Apr 2009 05:26:44 -0400 Subject: [PATCH] Add getActions implementation to pyatspi. --- pyatspi/action.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pyatspi/action.py b/pyatspi/action.py index f3489d7..fe230ba 100644 --- a/pyatspi/action.py +++ b/pyatspi/action.py @@ -24,8 +24,6 @@ __all__ = [ #------------------------------------------------------------------------------ -#TODO Perhaps use the 'getActions' method to reduce round-trips. - class Action(Accessible): """ An interface through which a user-actionable user interface component @@ -38,6 +36,16 @@ class Action(Accessible): folders, and others. """ + def getActions(self): + """ + getActions: + Retrieves all the actions at once. + @return : an array of an array of strings in the form + [[name, description, keybinding], ...] + """ + func = self.get_dbus_method("getActions", dbus_interface=ATSPI_ACTION) + return func() + def doAction(self, index): """ doAction: -- 2.7.4