...
 
Commits (9)
What's new in at-spi2-core 2.4.2:
* Fix typo in atspi_document_get_attribute_value
* Fix for bug 675004 - object:state-changed:defunct events are emitted as object:state-change:defunct
* Fix a potential crash when unsuccessfully querying for a hyperlink.
What's new in at-spi2-core 2.4.1:
* Fix a GError set when a method call returns a reply of the wrong type.
* Do not time out method calls for the first 15 seconds that an
application is on the bus (work-around for Orca setting an application's
script as "default" after a timeout on a slow-starting application).
What's new in at-spi2-core 2.4.0:
* Fix typo in at-spi-dbus-bus.desktop.in (BGO#605662).
......
......@@ -117,7 +117,7 @@ atspi_accessible_dispose (GObject *object)
/* TODO: Only fire if object not already marked defunct */
memset (&e, 0, sizeof (e));
e.type = "object:state-change:defunct";
e.type = "object:state-changed:defunct";
e.source = accessible;
e.detail1 = 1;
e.detail2 = 0;
......
......@@ -28,6 +28,7 @@
#include <dbus/dbus.h>
#include "atspi-accessible.h"
#include <sys/time.h>
#define ATSPI_TYPE_APPLICATION (atspi_application_get_type ())
#define ATSPI_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_APPLICATION, AtspiApplication))
......@@ -48,6 +49,7 @@ struct _AtspiApplication
gchar *toolkit_name;
gchar *toolkit_version;
gchar *atspi_version;
struct timeval time_added;
};
typedef struct _AtspiApplicationClass AtspiApplicationClass;
......
......@@ -63,7 +63,7 @@ atspi_document_get_attribute_value (AtspiDocument *obj,
g_return_val_if_fail (obj != NULL, NULL);
_atspi_dbus_call (obj, atspi_interface_document, "GetAttributevaluee", error, "s=>s", attribute, &retval);
_atspi_dbus_call (obj, atspi_interface_document, "GetAttributeValue", error, "s=>s", attribute, &retval);
if (!retval)
retval = g_strdup ("");
......
......@@ -38,6 +38,8 @@ static void handle_get_items (DBusPendingCall *pending, void *user_data);
static DBusConnection *bus = NULL;
static GHashTable *live_refs = NULL;
static gint method_call_timeout = 800;
static gint app_startup_time = 15000;
GMainLoop *atspi_main_loop;
gboolean atspi_no_cache;
......@@ -202,6 +204,7 @@ get_application (const char *bus_name)
if (!app) return NULL;
app->hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
app->bus = dbus_connection_ref (_atspi_bus ());
gettimeofday (&app->time_added, NULL);
app->cache = ATSPI_CACHE_UNDEFINED;
g_hash_table_insert (app_hash, bus_name_dup, app);
dbus_error_init (&error);
......@@ -608,8 +611,12 @@ _atspi_dbus_return_hyperlink_from_message (DBusMessage *message)
{
DBusMessageIter iter;
AtspiHyperlink *retval = NULL;
const char *signature = dbus_message_get_signature (message);
const char *signature;
if (!message)
return NULL;
signature = dbus_message_get_signature (message);
if (!strcmp (signature, "(so)"))
{
dbus_message_iter_init (message, &iter);
......@@ -835,7 +842,6 @@ atspi_init (void)
dbus_bus_register (bus, &error);
atspi_dbus_connection_setup_with_g_main(bus, g_main_context_default());
dbus_connection_add_filter (bus, atspi_dbus_filter, NULL, NULL);
dbind_set_timeout (800);
match = g_strdup_printf ("type='signal',interface='%s',member='AddAccessible'", atspi_interface_cache);
dbus_error_init (&error);
dbus_bus_add_match (bus, match, &error);
......@@ -996,6 +1002,22 @@ check_app (AtspiApplication *app, GError **error)
return TRUE;
}
static void
set_timeout (AtspiApplication *app)
{
struct timeval tv;
int diff;
if (app && app_startup_time > 0)
{
gettimeofday (&tv, NULL);
diff = (tv.tv_sec - app->time_added.tv_sec) * 1000 + (tv.tv_usec - app->time_added.tv_usec) / 1000;
dbind_set_timeout (MAX(method_call_timeout, app_startup_time - diff));
}
else
dbind_set_timeout (method_call_timeout);
}
dbus_bool_t
_atspi_dbus_call (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...)
{
......@@ -1009,6 +1031,7 @@ _atspi_dbus_call (gpointer obj, const char *interface, const char *method, GErro
va_start (args, type);
dbus_error_init (&err);
set_timeout (aobj->app);
retval = dbind_method_call_reentrant_va (aobj->app->bus, aobj->app->bus_name,
aobj->path, interface, method, &err,
type, args);
......@@ -1064,6 +1087,7 @@ _atspi_dbus_call_partial_va (gpointer obj,
dbus_message_iter_init_append (msg, &iter);
dbind_any_marshal_va (&iter, &p, args);
set_timeout (aobj->app);
reply = dbind_send_and_allow_reentry (aobj->app->bus, msg, &err);
check_for_hang (reply, &err, aobj->app->bus, aobj->app->bus_name);
out:
......@@ -1106,6 +1130,7 @@ _atspi_dbus_get_property (gpointer obj, const char *interface, const char *name,
}
dbus_message_append_args (message, DBUS_TYPE_STRING, &interface, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID);
dbus_error_init (&err);
set_timeout (aobj->app);
reply = dbind_send_and_allow_reentry (aobj->app->bus, message, &err);
check_for_hang (reply, &err, aobj->app->bus, aobj->app->bus_name);
dbus_message_unref (message);
......@@ -1170,6 +1195,7 @@ _atspi_dbus_send_with_reply_and_block (DBusMessage *message, GError **error)
bus = (app ? app->bus : _atspi_bus());
dbus_error_init (&err);
set_timeout (app);
reply = dbind_send_and_allow_reentry (bus, message, &err);
_atspi_process_deferred_messages ((gpointer)TRUE);
dbus_message_unref (message);
......
......@@ -36,4 +36,7 @@ int atspi_exit ();
DBusConnection *
atspi_get_a11y_bus ();
void
atspi_set_timeout (gint val, gint startup_time);
#endif /* _ATSPI_MISC_H_ */
AC_INIT([at-spi2-core], [2.4.0], [accessibility-atspi@lists.linux-foundation.org])
AC_INIT([at-spi2-core], [2.4.2], [accessibility-atspi@lists.linux-foundation.org])
AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
......
......@@ -160,8 +160,8 @@ dbind_method_call_reentrant_va (DBusConnection *cnx,
if (opt_error)
dbus_set_error (opt_error, DBUS_ERROR_INVALID_ARGS,
"Call to \"%s\" returned signature %s; expected %s",
method, p + 2,
dbus_message_get_signature (reply));
method, dbus_message_get_signature (reply),
p + 2);
goto out;
}
p = arg_types;
......
......@@ -37,6 +37,7 @@ mr
ms
nb
nl
oc
or
pa
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"