Add atspi_action_get_localized_name
authorMike Gorse <mgorse@suse.com>
Mon, 30 Jul 2012 17:02:05 +0000 (12:02 -0500)
committerMike Gorse <mgorse@suse.com>
Mon, 30 Jul 2012 17:02:05 +0000 (12:02 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=680598

atspi/atspi-action.c
atspi/atspi-action.h
idl/action.didl
xml/Action.xml

index 3530b10..bf1d023 100644 (file)
@@ -117,7 +117,7 @@ atspi_action_get_key_binding (AtspiAction *obj, gint i, GError **error)
  * Get the name of the '@i-th' action invocable on an
  *      object implementing #AtspiAction.
  *
- * Returns: the 'event type' name of the action, as a UTF-8 string.
+ * Returns: the non-localized name of the action, as a UTF-8 string.
  **/
 gchar *
 atspi_action_get_name (AtspiAction *obj, gint i, GError **error)
@@ -133,6 +133,30 @@ atspi_action_get_name (AtspiAction *obj, gint i, GError **error)
 }
 
 /**
+ * atspi_action_get_localized_name:
+ * @obj: a pointer to the #AtspiAction implementor to query.
+ * @i: an integer indicating which action to query.
+ *
+ * Get the name of the '@i-th' action invocable on an
+ *      object implementing #AtspiAction.
+ *
+ * Returns: the name of the action, as a UTF-8 string.
+ **/
+gchar *
+atspi_action_get_localized_name (AtspiAction *obj, gint i, GError **error)
+{
+  dbus_int32_t d_i = i;
+  char *retval = NULL;
+
+  g_return_val_if_fail (obj != NULL, NULL);
+
+  _atspi_dbus_call (obj, atspi_interface_action, "GetLocalizedName", error,
+                    "i=>s", d_i, &retval);
+
+  return retval;
+}
+
+/**
  * atspi_action_do_action:
  * @obj: a pointer to the #AtspiAction to query.
  * @i: an integer specifying which action to invoke.
index c41b069..7d152a7 100644 (file)
@@ -53,6 +53,8 @@ gchar * atspi_action_get_key_binding (AtspiAction *obj, gint i, GError **error);
 
 gchar * atspi_action_get_name (AtspiAction *obj, gint i, GError **error);
 
+gchar * atspi_action_get_localized_name (AtspiAction *obj, gint i, GError **error);
+
 gboolean atspi_action_do_action (AtspiAction *obj, gint i, GError **error);
 
 G_END_DECLS
index afc22e8..48e89aa 100644 (file)
@@ -33,6 +33,12 @@ interface org.freestandards.atspi.Action {
                string name;
        }
 
+       method GetLocalizedName {
+               int32 index;
+       } reply {
+               string name;
+       }
+
        /* Get the key-binding for the specified action. */
        method GetKeyBinding {
                int32 index;
index 9c0eef5..a1413d6 100644 (file)
     <arg type="s" direction="out"/>
   </method>
 
+  <method name="GetLocalizedName">
+    <arg type="i" name="index" direction="in"/>
+    <arg type="s" direction="out"/>
+  </method>
+
   <method name="GetKeyBinding">
     <arg type="i" name="index" direction="in"/>
     <arg type="s" direction="out"/>