mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
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)
This commit is contained in:
parent
6c8430c0c4
commit
c1d9c02b09
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user