...
 
Commits (10)
What's new in at-spi2-core 2.2.3:
* Reverted the fix for 663992, since "focus" events are reportedly sent by
some toolkits when focus is lost.
What's new in at-spi2-core 2.2.2:
* Fix for BGO#663992: set STATE_FOCUSED for a "focus" event
* Fix return type of org.a11y.Bus.IsEnabled property
* Declare void functions as such
What's new in at-spi2-core 2.2.1: What's new in at-spi2-core 2.2.1:
* Fix org.a11y.Bus.Enabled property to set its initial state from the * Fix org.a11y.Bus.Enabled property to set its initial state from the
...@@ -82,7 +95,6 @@ What's new in at-spi2-core 2.1.3: ...@@ -82,7 +95,6 @@ What's new in at-spi2-core 2.1.3:
* Fix failure to update cache in response to children-changed events in some * Fix failure to update cache in response to children-changed events in some
cases. cases.
What's new in at-spi2-core 2.1.2: What's new in at-spi2-core 2.1.2:
* Fix atspi_table_get_caption|summary. * Fix atspi_table_get_caption|summary.
......
...@@ -389,6 +389,11 @@ _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void ...@@ -389,6 +389,11 @@ _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void
if (klass->device_event) if (klass->device_event)
{ {
retval = (*klass->device_event) (listener, &event); retval = (*klass->device_event) (listener, &event);
if (retval != 0 && retval != 1)
{
g_warning ("at-spi: device event handler returned %d; should be 0 or 1", retval);
retval = 0;
}
} }
done: done:
reply = dbus_message_new_method_return (message); reply = dbus_message_new_method_return (message);
......
...@@ -164,7 +164,7 @@ atspi_event_listener_new_simple (AtspiEventListenerSimpleCB callback, ...@@ -164,7 +164,7 @@ atspi_event_listener_new_simple (AtspiEventListenerSimpleCB callback,
static GList *event_listeners = NULL; static GList *event_listeners = NULL;
static gchar * static gchar *
convert_name_from_dbus (const char *name) convert_name_from_dbus (const char *name, gboolean path_hack)
{ {
gchar *ret = g_malloc (g_utf8_strlen (name, -1) * 2 + 1); gchar *ret = g_malloc (g_utf8_strlen (name, -1) * 2 + 1);
const char *p = name; const char *p = name;
...@@ -181,6 +181,11 @@ convert_name_from_dbus (const char *name) ...@@ -181,6 +181,11 @@ convert_name_from_dbus (const char *name)
*q++ = '-'; *q++ = '-';
*q++ = tolower (*p++); *q++ = tolower (*p++);
} }
else if (path_hack && *p == '/')
{
*q++ = ':';
p++;
}
else else
*q++ = *p++; *q++ = *p++;
} }
...@@ -331,7 +336,7 @@ strdup_and_adjust_for_dbus (const char *s) ...@@ -331,7 +336,7 @@ strdup_and_adjust_for_dbus (const char *s)
} }
static gboolean static gboolean
convert_event_type_to_dbus (const char *eventType, char **categoryp, char **namep, char **detailp, char **matchrule) convert_event_type_to_dbus (const char *eventType, char **categoryp, char **namep, char **detailp, GPtrArray **matchrule_array)
{ {
gchar *tmp = strdup_and_adjust_for_dbus (eventType); gchar *tmp = strdup_and_adjust_for_dbus (eventType);
char *category = NULL, *name = NULL, *detail = NULL; char *category = NULL, *name = NULL, *detail = NULL;
...@@ -349,22 +354,29 @@ convert_event_type_to_dbus (const char *eventType, char **categoryp, char **name ...@@ -349,22 +354,29 @@ convert_event_type_to_dbus (const char *eventType, char **categoryp, char **name
detail = strtok_r (NULL, ":", &saveptr); detail = strtok_r (NULL, ":", &saveptr);
if (detail) detail = g_strdup (detail); if (detail) detail = g_strdup (detail);
} }
if (matchrule) if (matchrule_array)
{ {
*matchrule = g_strdup_printf ("type='signal',interface='org.a11y.atspi.Event.%s'", category); gchar *matchrule;
if (!*matchrule) goto oom; matchrule = g_strdup_printf ("type='signal',interface='org.a11y.atspi.Event.%s'", category);
if (name && name [0]) if (name && name [0])
{ {
gchar *new_str = g_strconcat (*matchrule, ",member='", name, "'", NULL); gchar *new_str = g_strconcat (matchrule, ",member='", name, "'", NULL);
g_free (*matchrule); g_free (matchrule);
*matchrule = new_str; matchrule = new_str;
} }
(*matchrule_array) = g_ptr_array_new ();
if (detail && detail [0]) if (detail && detail [0])
{ {
gchar *new_str = g_strconcat (*matchrule, ",arg0='", detail, "'", NULL); gchar *new_str = g_strconcat (matchrule, ",arg0='", detail, "'", NULL);
g_free (*matchrule); g_ptr_array_add (*matchrule_array, new_str);
*matchrule = new_str; new_str = g_strconcat (matchrule, ",arg0='", detail, "'", ":system", NULL);
g_ptr_array_add (*matchrule_array, new_str);
new_str = g_strconcat (matchrule, ",arg0path='", detail, "/'", NULL);
g_ptr_array_add (*matchrule_array, new_str);
g_free (matchrule);
} }
else
g_ptr_array_add (*matchrule_array, matchrule);
} }
if (categoryp) *categoryp = category; if (categoryp) *categoryp = category;
else g_free (category); else g_free (category);
...@@ -520,10 +532,11 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback, ...@@ -520,10 +532,11 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback,
GError **error) GError **error)
{ {
EventListenerEntry *e; EventListenerEntry *e;
char *matchrule;
DBusError d_error; DBusError d_error;
GList *new_list; GList *new_list;
DBusMessage *message, *reply; DBusMessage *message, *reply;
GPtrArray *matchrule_array;
gint i;
if (!callback) if (!callback)
{ {
...@@ -542,7 +555,7 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback, ...@@ -542,7 +555,7 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback,
e->callback_destroyed = callback_destroyed; e->callback_destroyed = callback_destroyed;
callback_ref (callback == remove_datum ? (gpointer)user_data : (gpointer)callback, callback_ref (callback == remove_datum ? (gpointer)user_data : (gpointer)callback,
callback_destroyed); callback_destroyed);
if (!convert_event_type_to_dbus (event_type, &e->category, &e->name, &e->detail, &matchrule)) if (!convert_event_type_to_dbus (event_type, &e->category, &e->name, &e->detail, &matchrule_array))
{ {
g_free (e); g_free (e);
return FALSE; return FALSE;
...@@ -555,7 +568,13 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback, ...@@ -555,7 +568,13 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback,
} }
event_listeners = new_list; event_listeners = new_list;
dbus_error_init (&d_error); dbus_error_init (&d_error);
dbus_bus_add_match (_atspi_bus(), matchrule, &d_error); for (i = 0; i < matchrule_array->len; i++)
{
char *matchrule = g_ptr_array_index (matchrule_array, i);
dbus_bus_add_match (_atspi_bus(), matchrule, &d_error);
g_free (matchrule);
}
g_ptr_array_free (matchrule_array, TRUE);
if (d_error.message) if (d_error.message)
{ {
g_warning ("Atspi: Adding match: %s", d_error.message); g_warning ("Atspi: Adding match: %s", d_error.message);
...@@ -654,10 +673,12 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback, ...@@ -654,10 +673,12 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback,
const gchar *event_type, const gchar *event_type,
GError **error) GError **error)
{ {
char *category, *name, *detail, *matchrule; char *category, *name, *detail;
GPtrArray *matchrule_array;
gint i;
GList *l; GList *l;
if (!convert_event_type_to_dbus (event_type, &category, &name, &detail, &matchrule)) if (!convert_event_type_to_dbus (event_type, &category, &name, &detail, &matchrule_array))
{ {
return FALSE; return FALSE;
} }
...@@ -683,7 +704,11 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback, ...@@ -683,7 +704,11 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback,
if (need_replace) if (need_replace)
event_listeners = l; event_listeners = l;
dbus_error_init (&d_error); dbus_error_init (&d_error);
dbus_bus_remove_match (_atspi_bus(), matchrule, &d_error); for (i = 0; i < matchrule_array->len; i++)
{
char *matchrule = g_ptr_array_index (matchrule_array, i);
dbus_bus_remove_match (_atspi_bus(), matchrule, &d_error);
}
dbus_error_init (&d_error); dbus_error_init (&d_error);
message = dbus_message_new_method_call (atspi_bus_registry, message = dbus_message_new_method_call (atspi_bus_registry,
atspi_path_registry, atspi_path_registry,
...@@ -703,7 +728,9 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback, ...@@ -703,7 +728,9 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback,
g_free (category); g_free (category);
g_free (name); g_free (name);
if (detail) g_free (detail); if (detail) g_free (detail);
g_free (matchrule); for (i = 0; i < matchrule_array->len; i++)
g_free (g_ptr_array_index (matchrule_array, i));
g_ptr_array_free (matchrule_array, TRUE);
return TRUE; return TRUE;
} }
...@@ -751,6 +778,18 @@ atspi_event_free (AtspiEvent *event) ...@@ -751,6 +778,18 @@ atspi_event_free (AtspiEvent *event)
g_free (event); g_free (event);
} }
static gboolean
detail_matches_listener (const char *event_detail, const char *listener_detail)
{
if (!listener_detail)
return TRUE;
return !(listener_detail [strcspn (listener_detail, ":")] == '\0'
? strncmp (listener_detail, event_detail,
strcspn (event_detail, ":"))
: strcmp (listener_detail, event_detail));
}
void void
_atspi_send_event (AtspiEvent *e) _atspi_send_event (AtspiEvent *e)
{ {
...@@ -775,7 +814,7 @@ _atspi_send_event (AtspiEvent *e) ...@@ -775,7 +814,7 @@ _atspi_send_event (AtspiEvent *e)
EventListenerEntry *entry = l->data; EventListenerEntry *entry = l->data;
if (!strcmp (category, entry->category) && if (!strcmp (category, entry->category) &&
(entry->name == NULL || !strcmp (name, entry->name)) && (entry->name == NULL || !strcmp (name, entry->name)) &&
(entry->detail == NULL || !strcmp (detail, entry->detail))) detail_matches_listener (detail, entry->detail))
{ {
entry->callback (atspi_event_copy (e), entry->user_data); entry->callback (atspi_event_copy (e), entry->user_data);
} }
...@@ -827,9 +866,9 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) ...@@ -827,9 +866,9 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
e.detail2 = detail2; e.detail2 = detail2;
dbus_message_iter_next (&iter); dbus_message_iter_next (&iter);
converted_type = convert_name_from_dbus (category); converted_type = convert_name_from_dbus (category, FALSE);
name = convert_name_from_dbus (member); name = convert_name_from_dbus (member, FALSE);
detail = convert_name_from_dbus (detail); detail = convert_name_from_dbus (detail, TRUE);
if (strcasecmp (category, name) != 0) if (strcasecmp (category, name) != 0)
{ {
......
...@@ -105,7 +105,7 @@ atspi_selection_select_child (AtspiSelection *obj, ...@@ -105,7 +105,7 @@ atspi_selection_select_child (AtspiSelection *obj,
g_return_val_if_fail (obj != NULL, FALSE); g_return_val_if_fail (obj != NULL, FALSE);
_atspi_dbus_call (obj, atspi_interface_selection, "SelectChild", error, "i=>b", &d_child_index, &retval); _atspi_dbus_call (obj, atspi_interface_selection, "SelectChild", error, "i=>b", d_child_index, &retval);
return retval; return retval;
} }
...@@ -163,7 +163,7 @@ atspi_selection_deselect_child (AtspiSelection *obj, ...@@ -163,7 +163,7 @@ atspi_selection_deselect_child (AtspiSelection *obj,
g_return_val_if_fail (obj != NULL, FALSE); g_return_val_if_fail (obj != NULL, FALSE);
_atspi_dbus_call (obj, atspi_interface_selection, "DeselectChild", error, "i=>b", &d_child_index, &retval); _atspi_dbus_call (obj, atspi_interface_selection, "DeselectChild", error, "i=>b", d_child_index, &retval);
return retval; return retval;
} }
...@@ -190,7 +190,7 @@ atspi_selection_is_child_selected (AtspiSelection *obj, ...@@ -190,7 +190,7 @@ atspi_selection_is_child_selected (AtspiSelection *obj,
g_return_val_if_fail (obj != NULL, FALSE); g_return_val_if_fail (obj != NULL, FALSE);
_atspi_dbus_call (obj, atspi_interface_selection, "IsChildSelected", error, "i=>b", &d_child_index, &retval); _atspi_dbus_call (obj, atspi_interface_selection, "IsChildSelected", error, "i=>b", d_child_index, &retval);
return retval; return retval;
} }
......
...@@ -184,7 +184,7 @@ atspi_text_get_attributes (AtspiText *obj, ...@@ -184,7 +184,7 @@ atspi_text_get_attributes (AtspiText *obj,
dbus_message_iter_next (&iter); dbus_message_iter_next (&iter);
dbus_message_iter_get_basic (&iter, &d_end_offset); dbus_message_iter_get_basic (&iter, &d_end_offset);
if (end_offset) if (end_offset)
*end_offset = d_start_offset; *end_offset = d_end_offset;
dbus_message_unref (reply); dbus_message_unref (reply);
return ret; return ret;
......
AC_INIT([at-spi2-core], [2.2.1], [accessibility-atspi@lists.linux-foundation.org]) AC_INIT([at-spi2-core], [2.2.3], [accessibility-atspi@lists.linux-foundation.org])
AC_PREREQ([2.59]) AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
......
...@@ -32,6 +32,7 @@ lv ...@@ -32,6 +32,7 @@ lv
mr mr
nb nb
nl nl
oc
or or
pa pa
pl pl
......
# Occitan translation for at-spi2-core.
# Copyright (C) 2011 Listed translators
# This file is distributed under the same license as the at-spi2-core package.
# Claude Paroz <claude@2xlibre.net>, 2011.
# Cédric Valmary (Tot en òc) <cvalmary@yahoo.fr>, 2015.
msgid ""
msgstr ""
"Project-Id-Version: at-spi2-core master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=at-"
"spi&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-05-24 02:51+0000\n"
"PO-Revision-Date: 2015-05-24 10:44+0200\n"
"Last-Translator: Cédric Valmary (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Tot en òc (totenoc.eu)\n"
"Language: oc\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Virtaal 0.7.1\n"
"X-Project-Style: gnome\n"
#: ../atspi/atspi-component.c:326 ../atspi/atspi-misc.c:1037
#: ../atspi/atspi-value.c:111
msgid "The application no longer exists"
msgstr "L'aplicacion existís pas mai"
#: ../atspi/atspi-misc.c:1795
msgid "Attempted synchronous call where prohibited"
msgstr "La temptativa d'apèl sincròn es interdicha"