Re: mousewheel + gtkoptionmenu



jacob berkman <jacob ximian com> writes:

> On Wed, 2002-07-10 at 07:05, Owen Taylor wrote:
> > jacob berkman <jacob ximian com> writes:
> > 
> > > i just noticed that scrolling the mouse wheel on a gtkoptionmenu scrolls
> > > through the menu there.
> > > 
> > > however, it doesn't activate the menu items as they get selected.  i
> > > haven't found very many apps which correctly handle this.
> > > 
> > > should gtkoptionmenu be "fixed" to activate the menu item as it scrolls,
> > > or should bugs be filed against almost every gtk 2 app?
> > 
> > I don't think we want to force apps to use get_history(). 
> > 
> > Does putting a gtk_menu_item_activate() call in 
> > gtk_option_menu_scroll_event () after the call to set_history() 
> > work?
> 
> yes.  should commit?

Yes, go ahead. (Both branches.) Do please test with as menu different
apps and option menus as you can find.

Regards,
                                        Owen

> Index: gtkoptionmenu.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkoptionmenu.c,v
> retrieving revision 1.59.2.1
> diff -u -r1.59.2.1 gtkoptionmenu.c
> --- gtkoptionmenu.c	14 May 2002 22:44:29 -0000	1.59.2.1
> +++ gtkoptionmenu.c	10 Jul 2002 13:48:09 -0000
> @@ -1021,6 +1021,7 @@
>  	  if (GTK_WIDGET_VISIBLE (item) && GTK_WIDGET_IS_SENSITIVE (item))
>  	    {
>  	      gtk_option_menu_set_history (option_menu, index);
> +	      gtk_menu_item_activate (GTK_MENU_ITEM (item));
>  	      break;
>  	    }




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