GNOME Bugzilla – Bug 591105
atktext does not include GTK_WRAP_WORD_CHAR
Last modified: 2009-08-10 03:34:47 UTC
There are 4 types of wrap modes in Gtk+: GTK_WRAP_NONE GTK_WRAP_CHAR GTK_WRAP_WORD GTK_WRAP_WORD_CHAR (see http://library.gnome.org/devel/gtk/stable/GtkTextTag.html#GtkWrapMode). There are only three in atktext.c: static const char wrap_mode[] = "none\0" "char\0" "word"; static const guint8 wrap_mode_offsets[] = { 0, 5, 10 }; There is also the following assertion in atktext: case ATK_TEXT_ATTR_WRAP_MODE: g_assert (index >= 0 && index < G_N_ELEMENTS (wrap_mode_offsets)); As best as I can tell, atk's failure to include GTK_WRAP_WORD_CHAR is what is responsible for the following Pidgin crasher: http://developer.pidgin.im/ticket/9864 (Pidgin uses GTK_WRAP_WORD_CHAR). The reason I have marked this as critical is the following: Orca has a feature to indicate text attributes in braille by "underlining" text which has those attributes. The nature of this feature is that, when enabled, it is *always* on. Because of the above assertion, it seems that any application which uses GTK_WRAP_WORD_CHAR is in danger of crashing constantly when accessed by a braille user.
Add Empathy to the list of applications impacted by this bug.
Welcoming Ekiga to the not-so-exclusive-after-all club.
Created attachment 140256 [details] [review] possible fix?? Okay, having been thwarted multiple times by this bug (I'm working on expanding Orca's support for chat apps), I'm taking a stab at this one. But let's be very clear on a few things: 1. I don't know C. 2. My background is in liberal arts, librarianship, and education. 3. This bug really needs fixin' in time for the 2.28 release. 4. This patch seems to fix it, namely stopping the crash and causing "word_char" to appear as the wrap mode in Accerciser. With respect to items 1 and 2 above, I couldn't figure out why the various and sundry numbers in the *_offsets in atktext.c were chosen. But I can add by 5's because gcalctool doesn't use GTK_WRAP_WORD_CHAR. ;-) ;-) Anyhoo.... If this patch is completely dumb, that's fine. Just please fix this bug soon. Thanks!!! By the way, because Orca's text attributes features include presenting attributes, I believe we'll need to localize "word_char" (or whatever it winds up being reported as) within Orca before string freeze.
I just checked the patch against Empathy and it worked fine.
The patch is OK for me. I will commit the patch and release atk 1.27.90 today. Thanks.