[evolution-patches] Re: patch to implement editable text interface



Hi York,

only problem I see in your patch is in html_a11y_text_set_text_contents.
Instead of using html_text_set_text, which can be used only in
non-editing mode, you should select whole text object and paste new
text. Otherwise it's possible to end up with cursor with wrong position,
which situation will lead to all sort of problems and usually crash
early after.

Otherwise the patch looks OK.

Cheers
Radek

On Thu, 2003-08-21 at 14:28 +0800, yuedong du wrote:
> Hi Radek,
> 
> The patch is tested with GOK, please review.
> 
> After the patch, I can select a paragraph of text in mail composer, and
> copy, cut and paste using GOK's text manipulation interface.
> 
> The editable-text.patch implemented insert_text, copy_text, cut_text,
> delete_text and paste_text method.
> 
> Note that at end of paste_text and cut_text method, there is a
> grab_focus signal emitted. This is because after these operations, html
> object tree changed, and the focused html object may also changed. Thus
> we need to use atk_focus_notify API to notify AT app.
> 
> And the htmlobject.patch and a new datalist to html object. The data
> list different from orginal one in that it will not be copied when you
> dup a htmlobject. See the copy() in htmlobject.c, 
> 
>     static void
>     copy (HTMLObject *self, HTMLObject *dest)
>     {
> 	... ...
>         g_datalist_init (&dest->object_data);
> 	html_object_copy_data_from_object (dest, self);
> 	... ...
>     }
> 
> This will cause html object associated to a wrong acc object in
> composer. So in the utils.[ch], change to use the new datalist instead
> of the old one.
> 
> Another change in utils.c is add a acc_unref(). By setting it to the
> destroy function of the new datalist, acc_unref will called when the
> htmlobject is destroyed, we need to break the htmlobject<->acc
> association.
> 
> 
> Regards
> York
-- 
Radek Doulík <rodo ximian com>
Ximian, Inc.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]