Re: patch #59456, #59456-2, #64977 -- menu stuff



Kristian Rietveld <kristian planet nl> writes:

> On Wed, 2001-11-28 at 20:45, Owen Taylor wrote:
> > 
> > Kristian Rietveld <kristian planet nl> writes:
> > 
> > > Hi all,
> > > 
> > > This patch implements some GtkMenu stuff, which makes the menu work 
> > > somewhat saner. ChangeLog has been appended, patch has been attached.
> > 
> > Looks good, with a few comments below.
> > 
> 
> Okay, new try.
>
> @@ -452,16 +456,30 @@
>  	  if (menu_shell->parent_menu_shell)
>  	    return gtk_widget_event (menu_shell->parent_menu_shell, (GdkEvent*) event);
>  	}
> -      
> +
>        menu_shell->button = 0;
>        menu_item = gtk_menu_shell_get_item (menu_shell, (GdkEvent*) event);
>  
>        deactivate = TRUE;
>  
> +      if (menu_item
> +	  && GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
> +	{
> +	  if (g_object_get_data (G_OBJECT (menu_shell), "gtk-menushell-just-activated"))
> +	    {
> +	      g_object_set_data (G_OBJECT (menu_shell), "gtk-menushell-just-activated", NULL);
> +	    }
> +	  else
> +	    {
> +	      gtk_menu_shell_deactivate (menu_shell);
> +	      return TRUE;
> +	    }
> +	}
>        if ((event->time - menu_shell->activate_time) > MENU_SHELL_TIMEOUT)
>  	{
>  	  if (menu_item && (menu_shell->active_menu_item == menu_item) &&

Looks to me like this will mean that MENU_SHELL_TIMEOUT will no
longer work since we'll always deactivate on the release after the
initial click. It seems to me:

 - the check/clear of just-activate should occur outside the
   > MENU_SHELL_TIMEOUT block
 - but the actual use of it for deactivation should be inside
   the > MENU_SHELL_TIMEOUT block.

Am I missing something here? The rest looks fine now.

                                        Owen



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