[g-a-devel]Re: common code - relationship



One problem here is that we are constrained by the API freeze. In an ideal 
world, the ATK library would have a convenience function 

atk_object_add_paired_relations (AtkObject       *target1,
                                 AtkRelationType  target_type1,
                                 AtkObject       *target2,
                                 AtkRelationType  target_type2);

but we will not be able to get this function in to Gnome 2.0. You would probably 
have to add this code to each application.

On the other hand, we would like to execute as little extra code as possible if 
accessibility is not enabled so another approach would be to postpone the 
creation of the relations until the accessible objects are referenced. For 
example, in the application call

g_object_set_data (G_OBJECT (widget1), atk_relation_type_get_name 
(target_type1), widget2);
g_object_set_data (G_OBJECT (widget2), atk_relation_type_get_name 
(target_type2), widget1);

We would have to add code to gailwidget.c which checks for these when reporting 
relation sets for an object.

I do not have a strong view on this so I throw it out for rejection.

I am not sure that the code in add_relation is correct when the relation already 
exists.

if (relation) {
        atk_relation_set_remove ( relations, relation);
}
atk_relation_set_add (relations, atk_relation_new (&target_accessible, 1, 
relation_type);


Padraig

> To: "Padraig O'Briain" <Padraig Obriain Sun COM>
> Cc: "Mukund" <mukund rajagopalan wipro com>, "ravinandan govinda rao arakali" 
<ravinandan arakali wipro com>, <jayaraj rajappan wipro com>
> Subject: common code - relationship
> MIME-Version: 1.0
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
> 
> Hi Padraig,
> 
> I have written a common code to establish atk relationship
> between any two specified widgets. Could you please verify the 
> code and give your valuable feedback.
> 
> Following is an example of how the function can be called.
> Can you also suggest a module(gail ??) where this code can
> go in ?
> 
> Eg :
>     /* Relate checkbox and spin button */
>       set_relations_for_by(PopupWarnMessSize_checkbox, 
>                                     ATK_RELATION_CONTROLLER_FOR, 
>                                     WarningSize_spinbutton,
>                                     ATK_RELATION_CONTROLLED_BY);
> 
> For relating label with GtkEntry this code can be used instead of
> gtk_label_set_mnemonic_widget().  The gtk_label_set_mnemonic_widget()
> sets only the LABEL_FOR but the above code does both LABEL_FOR 
> and LABELLED_BY. 
> 
> Please let me know your opinion on this.
> 
> Thanks & Regds
> Jagadeesh




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