Re: Accessing context popup menues through keyboard



On Fri, 2002-04-19 at 16:33, Havoc Pennington wrote:
> 
> Luciano Chavez <lnx1138 us ibm com> writes:
> > 
> > I have an app that displays a GtkCTree which registers a signal handler
> > for the button_press_event. When the signal handler is invoked, it
> > checks to see if the x and y pixel coordinates are within a valid row in
> > the GtkCTree (I use gtk_clist_get_selection_info() to verify). If so, I
> > see if the event button was for the right mouse button. If so, I create
> > a context popup at x,y for the row corresponding to x & y.
> > 
> > This all works fine and dandy. I want to support using SHIFT-F10 to
> > access the context menu for a row. I can set up a hander for
> > "key_press_event" and recognize SHIFT + GDK_F10 just fine. But now what?
> > 
> > The GdkEventKey doesn't provide x & y coordinates. How do I get the x &
> > y coordinates during the "key_press_event"?
> > 
> > The whole point of allowing SHIFT-F10 is to attempt to make the app more
> > accessible to folks with disabilities.
> > 
> 
> As an aside, CTree is pretty inherently not accessible by the definition
> we're using for GNOME 2.

The GtkTreeView which replaces it is though, right?

> 
> However the right thing to do for this is probably to pop up the menu
> for the currently focused or selected row, isn't there a function on
> ctree or clist to get the coordinates of a row?
> 

Hmmm. I checked but didn't see one. That's why I borrowed those macros
from gtkclist.c to give me the relative coordinates from the top of the
clist. If someone can identify the correct one and tell me if the row
coordinates are root window, desktop or clist relative then that would
be great.

> Havoc
-- 
regards,

Luciano Chavez

lnx1138 us ibm com          
http://evms.sourceforge.net




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