Re: [evolution-patches] Re: seek review for bug 47024: implement set/get_caret_offset method of AtkText interface



Me again,:). 

Sorry to be so pushy.

But because the progess is lagged behind my scheudle. I want to
accelerate the process.



On Sun, 2003-08-03 at 17:14, yuedong du wrote:
> Hi Radek,
> 
> Attached is newer version of the patch. Please review.
> This patch trying to fix the html_a11y_get_gtkhtml_parent(). There are 2
> reasons that why the function not work:
> 
> 1. ClueV do not have corresponding accessible object. So the process of
> finding gtkhtml parent will terminate when it reach cluev object. So I
> just add in html_utils_get_accesible
> +       case HTML_TYPE_CLUEV:
> +               accessible = html_a11y_new (o, ATK_ROLE_INVALID);
> +               break;
> 
> 
> 2. ClueV->parent will not point to the gtkhtml widget. The 'parent
> pointers' only work in HTML Object tree. gtkhtml is outside of this
> tree.  This can be resolved, however, because atk let us to set atk
> parent of the cluev to the gtkhtml.
> 
> This patch set atk parent relationship in 2 places:
> 
> a. When new the gtkhtml a11y object,
> 
>        g_signal_connect_after(widget, "cursor_move",
>                         G_CALLBACK(gtk_html_a11y_cursor_move_cb),
>                         NULL);
> +       html_utils_get_accessible(GTK_HTML(widget)->engine->clue,
> accessible);
>                                                                                 
>         /* printf ("created new gtkhtml accessible object\n"); */
> ... ...
> 
> 	html_utils_get_accessible() will set the parent relationship.
> 
> b. And when gtkhtml widget grab focus,
> +
> +       clue = html_utils_get_accessible(GTK_HTML(widget)->engine->clue,
> obj);
> +       atk_object_set_parent(clue, obj);
> +
> 
> Because when user read another mail, gtkhtml will reconstruct the html
> object tree. So clue will change, and we need to re-setup
> 'clue->gtkhtml' relationship.
> 
>                                                                                 
> 
> And finally, the patch assume each htmlobject tree start at cluev. Below
> is dump from testgtkhtml. Although the patch work fine in my
> environment, I think it need your confirmation.
> 
> Simple Object Tree
> -----------
> ClueV
>         ClueFlow
>                 Table 1,2
>                         TableCell 0,0
>                                 ClueFlow
>                                         Image
>                                         Text `myportal:'
>                         TableCell 0,1
>         ClueFlow
>                 Image
> 	... ...
> 
> 
> Thanks
> York
> 
> On Thu, 2003-07-31 at 00:31, Radek Doulík wrote: 
> > Hi York,
> > 
> > On Tue, 2003-07-29 at 04:00, Yuedong Du wrote:
> > > Hi Radek,
> > > 
> > > Seems you do not notice this mail.
> > > Change the subject to the 'nomarlize form'.  And resend.
> > > 
> > > Regards
> > > York
> > > 
> > > Hi Radek,
> > > 
> > > The patch mainly implemented get/set_caret_offset method. After this
> > > patch
> > > gnopernicus can report current character when you move cursor, and can
> > > set
> > > caret to some text using at-poke. 
> > > 
> > > Some explain of the patch below,
> > > 
> > > I introduced a method to get/set current gtkhtml widget in html_utils,
> > > as below:
> > > 
> > > 
> > >         +static GtkHTML * gtkhtml = NULL;
> > >         +                                                                                 
> > >         +void
> > >         +html_utils_set_gtk_html(GtkHTML * p)
> > >         +{
> > >         +        gtkhtml = p;
> > >         +}
> > >         +                                                                                 
> > >         +GtkHTML *
> > >         +html_utils_get_gtk_html(void)
> > >         +{
> > >         +        return gtkhtml;
> > >          }
> > >         
> > >         
> > > I notice original code seems try to using the
> > > html_a11y_get_gtkhtml_parent() to reach the same goal.
> > > But the function do not work. We cannot get the gtkhtml widget from a
> > > html object.
> > 
> > do you now why does this function not work? remembering widget in static
> > variable will not work for multiple gtkhtml instances in one process. I
> > will prefer to fix html_a11y_get_gtkhtml_parent rather.






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