Re: gtk_bindings_activate



On Sat, 2007-12-01 at 19:16 +0300, Evgeniy Ivanov wrote:
> Hi! I think there is a bug in the gtk_bindings_activate from
> gtkbindings.
> I'm not sure, thus I didn't open it.
> 
> Here is example of what happens:
> 
>     GtkWidget *entry;
>     entry = gtk_entry_new (); 
> //... Some routines like settext
>   int modifiers = 0;
>   modifiers |= GDK_CONTROL_MASK;
> gtk_bindings_activate(G_OBJECT(entry),118,modifiers); //118 is the
> keycode of 'V', and it works (text is pasted). 
> gtk_bindings_activate(G_OBJECT(entry),1741,modifiers);
> /*
> 1741 is the code of Cyrillic_em, which is located on the same physical
> key as 'V'. So thei shortcut should work too, but
> gtk_bindings_activate returns FALSE. 
> What's wrong? Should it work or the idea of gtk_bindings_activate in
> something else?
> */

The full handling is only present when you use 
gtk_bindings_activate_event(). By the time that you go from an event to
a keyval, needed information has been lost.

- Owen

(gtk_bindings_activate() is basically just there for compatibility - it
existed before the fancy handling that does the Cyrillic vs. Latin on
the same key was implemented.)


Attachment: signature.asc
Description: This is a digitally signed message part



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