Commit c1d9c02b authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Make sure that we keep priv->columns >= 1 even for empty menus, since we

Tue Feb 17 23:11:21 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
	priv->columns >= 1 even for empty menus, since we divide by it
	somewhere else.  (#133428, Vincent Noel)
parent 6c8430c0
Tue Feb 17 23:11:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
priv->columns >= 1 even for empty menus, since we divide by it
somewhere else. (#133428, Vincent Noel)
Tue Feb 17 23:02:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix for #119722, reported by Olexiy Avramchenko, patch by Owen
......
Tue Feb 17 23:11:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
priv->columns >= 1 even for empty menus, since we divide by it
somewhere else. (#133428, Vincent Noel)
Tue Feb 17 23:02:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix for #119722, reported by Olexiy Avramchenko, patch by Owen
......
Tue Feb 17 23:11:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
priv->columns >= 1 even for empty menus, since we divide by it
somewhere else. (#133428, Vincent Noel)
Tue Feb 17 23:02:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix for #119722, reported by Olexiy Avramchenko, patch by Owen
......
Tue Feb 17 23:11:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
priv->columns >= 1 even for empty menus, since we divide by it
somewhere else. (#133428, Vincent Noel)
Tue Feb 17 23:02:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix for #119722, reported by Olexiy Avramchenko, patch by Owen
......
Tue Feb 17 23:11:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
priv->columns >= 1 even for empty menus, since we divide by it
somewhere else. (#133428, Vincent Noel)
Tue Feb 17 23:02:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix for #119722, reported by Olexiy Avramchenko, patch by Owen
......
......@@ -948,9 +948,11 @@ gtk_menu_do_remove (GtkMenuShell *menu_shell,
delta = ai->bottom_attach - ai->top_attach;
single_column = priv->columns == 1;
/* recalculate these, assuming the child has already been removed */
/* Recalculate these, assuming the child has already been removed.
* Note that an empty menu is assumed to have one column.
*/
priv->rows = 0;
priv->columns = 0;
priv->columns = 1;
for (children = menu_shell->children; children; children = children->next)
{
......@@ -1015,7 +1017,7 @@ gtk_menu_do_insert (GtkMenuShell *menu_shell,
{
/* attach after the last row */
gtk_menu_attach (GTK_MENU (menu_shell), child,
0, priv->columns ? priv->columns : 1,
0, priv->columns,
priv->rows, priv->rows + 1);
return;
......@@ -1039,7 +1041,7 @@ gtk_menu_do_insert (GtkMenuShell *menu_shell,
/* attach the new item */
gtk_menu_attach (GTK_MENU (menu_shell), child,
0, priv->columns ? priv->columns : 1,
0, priv->columns,
position, position + 1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment