Fixed atspi_text_ functions
authorPatryk Kaczmarek <patryk.k@samsung.com>
Mon, 28 Sep 2015 12:23:15 +0000 (14:23 +0200)
committerMike Gorse <mgorse@suse.com>
Mon, 12 Oct 2015 19:20:01 +0000 (14:20 -0500)
  * atspi_text_get_text_attribute_value
      Fixed dbus signature in _atspi_dbus_call function
      and add missing argument for string.

  * atspi_text_get_default_attributes
      Receiving return value by reference from hash table

https://bugzilla.gnome.org/show_bug.cgi?id=755731

atspi/atspi-text.c
idl/text.didl
registryd/introspection.c
xml/Text.xml

index 6639fd4..1e887d3 100644 (file)
@@ -319,10 +319,14 @@ atspi_text_get_text_attribute_value (AtspiText *obj,
                                      GError **error)
 {
   gchar *retval = NULL;
+  dbus_int32_t d_i = offset;
 
   g_return_val_if_fail (obj != NULL, NULL);
 
-  _atspi_dbus_call (obj, atspi_interface_text, "GetAttributeValue", error, "i=>s", offset, &retval);
+  _atspi_dbus_call (obj, atspi_interface_text, "GetAttributeValue", error, "is=>s", d_i, (const gchar *)attribute_value, &retval);
+
+  if (!retval)
+    retval = g_strdup ("");
 
   return retval;
 }
index 0796dcb..07ce85e 100644 (file)
@@ -110,9 +110,6 @@ namespace org.freestandards.atspi {
                        string  attribute_key;
                } reply {
                        string  attribute_value;
-                       int32   start_offset;
-                       int32   end_offset;
-                       boolean defined;
                }       
 
                /* Deprecated in favor of GetAttributeRun. */
index edcf60d..5b694ad 100644 (file)
@@ -556,9 +556,6 @@ const char *spi_org_a11y_atspi_Text =
 "    <arg direction=\"in\" name=\"offset\" type=\"i\" />"
 "    <arg direction=\"in\" name=\"attributeName\" type=\"s\" />"
 "    <arg direction=\"out\" type=\"s\" />"
-"    <arg direction=\"out\" name=\"startOffset\" type=\"i\" />"
-"    <arg direction=\"out\" name=\"endOffset\" type=\"i\" />"
-"    <arg direction=\"out\" name=\"defined\" type=\"b\" />"
 "  </method>"
 ""
 "  <method name=\"GetAttributes\">"
index 7af366a..320ee5e 100644 (file)
@@ -58,9 +58,6 @@
     <arg direction="in" name="offset" type="i"/>
     <arg direction="in" name="attributeName" type="s"/>
     <arg direction="out" type="s"/>
-    <arg direction="out" name="startOffset" type="i"/>
-    <arg direction="out" name="endOffset" type="i"/>
-    <arg direction="out" name="defined" type="b"/>
   </method>
 
   <method name="GetAttributes">