[pyatspi2] Hyperlink fixes



commit eb4b2129cec291c5a06575e83d716c949a9b78cc
Author: Mike Gorse <mgorse novell com>
Date:   Wed May 26 18:56:34 2010 -0400

    Hyperlink fixes

 pyatspi/hyperlink.py |    5 ++++-
 pyatspi/hypertext.py |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/pyatspi/hyperlink.py b/pyatspi/hyperlink.py
index 180973d..6afd3f1 100644
--- a/pyatspi/hyperlink.py
+++ b/pyatspi/hyperlink.py
@@ -50,7 +50,10 @@ class Hyperlink(Accessible):
                 ith anchor can be accessed.
                 """
                 func = self.get_dbus_method("GetObject", dbus_interface=ATSPI_HYPERLINK)
-                return self._acc_factory (self._app_name, func(index), ATSPI_ACCESSIBLE)
+                (name, path) = func(index)
+                if (name == ""):
+                        name = self._app_name
+                return self._acc_factory (name, path, ATSPI_ACCESSIBLE)
 
         def getURI(self, index):
                 """
diff --git a/pyatspi/hypertext.py b/pyatspi/hypertext.py
index 94de1b0..86b0c7a 100644
--- a/pyatspi/hypertext.py
+++ b/pyatspi/hypertext.py
@@ -39,7 +39,10 @@ class Hypertext(Accessible):
                 @return the Hyperlink in this Hypertext object.
                 """
                 func = self.get_dbus_method("GetLink", dbus_interface=ATSPI_HYPERTEXT)
-                return self._acc_factory (self._app_name, func(index), interfaces.ATSPI_HYPERLINK)
+                (name, path) = func(index)
+                if (name == ""):
+                        name = self._app_name
+                return self._acc_factory (name, path, ATSPI_HYPERLINK)
 
         def getLinkIndex(self, character_index):
                 """



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