summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacobo Aragunde PĂ©rez <jaragunde@igalia.com>2014-06-19 17:27:51 +0200
committerMike Gorse <mgorse@suse.com>2014-06-20 12:54:27 -0500
commit706107e5892a1bd65f050d89c6b364b58f836061 (patch)
tree83d340309625f2487766e3c685ed4b1f03ece5b5
parent55d8acff210f587b0ae66911dd6f36a10e65edde (diff)
downloadat-spi2-atk-706107e5892a1bd65f050d89c6b364b58f836061.tar.gz
Do not overwrite text attributes with the default ones
As it was implemented, the default attributes are appended to the end of the list, and later in time only the last occurence of every attribute will be preserved. Just changing the order of the list fixes this bug. https://bugzilla.gnome.org/show_bug.cgi?id=731980
-rw-r--r--atk-adaptor/adaptors/text-adaptor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/atk-adaptor/adaptors/text-adaptor.c b/atk-adaptor/adaptors/text-adaptor.c
index be10349..e80daf8 100644
--- a/atk-adaptor/adaptors/text-adaptor.c
+++ b/atk-adaptor/adaptors/text-adaptor.c
@@ -799,16 +799,17 @@ impl_GetAttributeRun (DBusConnection * bus, DBusMessage * message,
return droute_invalid_arguments_error (message);
}
- attributes =
- atk_text_get_run_attributes (text, offset, &intstart_offset,
- &intend_offset);
-
if (includeDefaults)
{
attributes = g_slist_concat (attributes,
atk_text_get_default_attributes (text));
}
+ attributes = g_slist_concat (attributes,
+ atk_text_get_run_attributes (text, offset,
+ &intstart_offset,
+ &intend_offset));
+
reply = dbus_message_new_method_return (message);
if (!reply)
return NULL;