[evolution-patches] Re: gtkhtml, fix the inconsistency of caret and focus



Hi Eric,

the patch looks good, there's only a typo in this part

+void
+html_engine_update_focus_if_necessary (HTMLEngine *e, HTMLObject *obj, gint offset)
+{
+       if (obj && ((HTML_IS_IMAGE (obj) && HTML_IMAGE (obj)->url && *HTML_IMAGE (obj)->url))
+                    || (HTML_IS_TEXT (obj) && html_object_get_complete_url (obj, offset)))
+               html_engine_set_focus_object (e, obj, offset);
+}
+

it should have one more braces pair to avoid crash if obj is NULL. Like this:

+void
+html_engine_update_focus_if_necessary (HTMLEngine *e, HTMLObject *obj, gint offset)
+{
+       if (obj && (((HTML_IS_IMAGE (obj) && HTML_IMAGE (obj)->url && *HTML_IMAGE (obj)->url))
+                    || (HTML_IS_TEXT (obj) && html_object_get_complete_url (obj, offset))))
+               html_engine_set_focus_object (e, obj, offset);
+}
+

Please fix that typo and commit.

Cheers
Radek

On Mon, 2004-06-07 at 21:27 +0800, Eric Zhao wrote:
Hi Rodek, 
   This is a new patch.

Regards,
Eric
On Mon, 2004-06-07 at 19:42, Radek Doulík wrote:
> Hi Eric,
> 
> thanks for the patch. Please could you regenerate it with -p parameter
> so that it's better readable?
> 
> Cheers
> Radek
> 
> On Sun, 2004-06-06 at 14:40 +0800, Eric Zhao wrote: 
> > Hi, 
> > 
> > Attached is a patch which fixes the inconsistency of caret and focus:
> > * when the focus is changed, change the caret to the focused object.
> > * when the caret is moved to a focusable object, set focus to this
> > object.
> > 
> > Would you please give this patch a review? Thanks!
> > 
> > Regards,
> > Eric
> -- 
> Radek Doulík <rodo novell com>
> Novell, Inc.
--
Radek Doulík <rodo novell com>
Novell, Inc.


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