Re: [g-a-devel]Clarification on gtkoptionmenu keynav.



Narayana Pattipati <narayana pattipati wipro com> writes:

> Hi Owen,
> 
> I am trying to implement Home/End key navigation for gtkoptionmenu. 
> I have added a new signal for this purpose in gtkmenushell.c and
> added a callback which returns Boolean value as suggested by Havoc
> in the following discussion. I have to address the following issues
> now. 
> 
> a) Since the source code for navigation is same for all the kinds 
>    of menus(drop-down/popup etc), Home/End keynav is given for the 
>    other kinds of menus also. Is it OK to have Home/End for all the
> menus.?? 
>    If it is not correct, could you please suggest a way to address this
> issue.

The option menu popup is a menu. I see no reasonm it should have
different key bindings from other menus. Whether all menus should have
Home/End as a shortcut, is up to the key binding specification.

I've Cc'ed Calum here to ask:

 - If there is any good reason the option menu popups should be different
   from other menus.

 - If not, which entry in the key binding table is correct.
 
> b) User can assign Home/End keys as dynamic key shorts. In that case,
>    Home/End keynav should be disabled for the menus. In gtkmenu the
>    property "gtk-can-change-accels" is defined. How do I dynamically
>    verify whether this property is defined for any kind of menu.??

Key bindings are checked before the "dynamic accelerator assignment
code" in gtk_menu_key_press(), so I don't think any special checking
is necessary.

The handling of the key bindings is:

  if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event))
    return TRUE;
    
Regards,
                                        Owen



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