[at-spi2-core] Add atspi_action_get_localized_name
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Add atspi_action_get_localized_name
- Date: Mon, 30 Jul 2012 17:04:04 +0000 (UTC)
commit 44c0e595b8fe87ffba3d31c572bce5b9a93b5665
Author: Mike Gorse <mgorse suse com>
Date: Mon Jul 30 12:02:05 2012 -0500
Add atspi_action_get_localized_name
https://bugzilla.gnome.org/show_bug.cgi?id=680598
atspi/atspi-action.c | 26 +++++++++++++++++++++++++-
atspi/atspi-action.h | 2 ++
idl/action.didl | 6 ++++++
xml/Action.xml | 5 +++++
4 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/atspi/atspi-action.c b/atspi/atspi-action.c
index 3530b10..bf1d023 100644
--- a/atspi/atspi-action.c
+++ b/atspi/atspi-action.c
@@ -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.
diff --git a/atspi/atspi-action.h b/atspi/atspi-action.h
index c41b069..7d152a7 100644
--- a/atspi/atspi-action.h
+++ b/atspi/atspi-action.h
@@ -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
diff --git a/idl/action.didl b/idl/action.didl
index afc22e8..48e89aa 100644
--- a/idl/action.didl
+++ b/idl/action.didl
@@ -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;
diff --git a/xml/Action.xml b/xml/Action.xml
index 9c0eef5..a1413d6 100644
--- a/xml/Action.xml
+++ b/xml/Action.xml
@@ -14,6 +14,11 @@
<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"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]