menubar: prefer early return
This commit is contained in:
@ -512,8 +512,9 @@ gtk_menu_bar_allocate (GtkCssGadget *gadget,
|
|||||||
menu_shell = GTK_MENU_SHELL (widget);
|
menu_shell = GTK_MENU_SHELL (widget);
|
||||||
priv = menu_bar->priv;
|
priv = menu_bar->priv;
|
||||||
|
|
||||||
if (menu_shell->priv->children)
|
if (!menu_shell->priv->children)
|
||||||
{
|
return;
|
||||||
|
|
||||||
remaining_space = *allocation;
|
remaining_space = *allocation;
|
||||||
requested_sizes = g_array_new (FALSE, FALSE, sizeof (GtkRequestedSize));
|
requested_sizes = g_array_new (FALSE, FALSE, sizeof (GtkRequestedSize));
|
||||||
|
|
||||||
@ -629,7 +630,7 @@ gtk_menu_bar_allocate (GtkCssGadget *gadget,
|
|||||||
|
|
||||||
g_array_free (requested_sizes, TRUE);
|
g_array_free (requested_sizes, TRUE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
static void
|
static void
|
||||||
gtk_menu_bar_size_allocate (GtkWidget *widget,
|
gtk_menu_bar_size_allocate (GtkWidget *widget,
|
||||||
GtkAllocation *allocation)
|
GtkAllocation *allocation)
|
||||||
|
|||||||
Reference in New Issue
Block a user