Re: [gtk-list] Re: gtk_option_menu_set_menu() weirdness




John Sullivan <sullivan@eazel.com> writes:

> I have seen a problem with option menus and set_history that I believe is
> Jamie's point, though I'm not completely sure.
> 
> The problem I've seen is that sometimes when the user clicks on an option
> menu, the item that comes up under the mouse pointer is not the same as the
> item that was chosen in the menu. In other words, to use Jamie's example,
> the menu contains items X, Y, and Z. The visible item is Y. Clicking on the
> option menu should bring up the menu such that item Y is directly under the
> mouse pointer. Instead, the menu pops up such that item X is directly under
> the mouse pointer. This is both confusing and dangerous: the user can
> accidentally select a different menu item just by clicking and releasing
> quickly.
> 
> I think it is the case that this happens only when the visible item has been
> set with gtk_option_menu_set_history, and does not happen after the user has
> changed the selection explicitly. I haven't tracked this down, but I've
> often intended to. It seems that the code that computes where to place the
> popped-up menu is relying on some variable that gets set when the user
> clicks but does not get set when gtk_option_menu_set_history is called. At
> least, that would explain it, though that theory may be nonsense.

There was a problem (fixed in 1.2.7) where the option menu was mispositioned
the first time it was popped up. That didn't (from the illustrations) look
like the problem here.
                                        Owen



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