2009-27-09 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / pyatspi / document.py
index be256b6..038b1fd 100644 (file)
@@ -33,7 +33,7 @@ class Document(Accessible):
         as well.
         """
 
-        def getAttributeValue(self, *args, **kwargs):
+        def getAttributeValue(self, key):
                 """
                 Gets the value of a single attribute, if specified for the document
                 as a whole.
@@ -45,9 +45,9 @@ class Document(Accessible):
                 for the object.
                 """
                 func = self.get_dbus_method("getAttributeValue", dbus_interface=ATSPI_DOCUMENT)
-                return func(*args, **kwargs)
+                return func(key)
 
-        def getAttributes(self, *args, **kwargs):
+        def getAttributes(self):
                 """
                 Gets all attributes specified for a document as a whole. For
                 attributes which change within the document content, see Accessibility::Text::getAttributes
@@ -56,9 +56,9 @@ class Document(Accessible):
                 as name-value pairs.
                 """
                 func = self.get_dbus_method("getAttributes", dbus_interface=ATSPI_DOCUMENT)
-                return func(*args, **kwargs)
+                return [key + ':' + value for key, value in func().values()]
 
-        def getLocale(self, *args, **kwargs):
+        def getLocale(self):
                 """
                 Gets the locale associated with the document's content. e.g.
                 the locale for LOCALE_TYPE_MESSAGES.
@@ -66,7 +66,7 @@ class Document(Accessible):
                 description.
                 """
                 func = self.get_dbus_method("getLocale", dbus_interface=ATSPI_DOCUMENT)
-                return func(*args, **kwargs)
+                return func()
 
 # Register the accessible class with the factory.
 accessible_factory.register_accessible_class(ATSPI_DOCUMENT, Document)