More accurate fix for GtkTreeMenu regression.

The previous fix rebuilds the root menu unconditionally,
this one only rebuilds the root menu if the root path
has indeed changed.

https://bugzilla.gnome.org/show_bug.cgi?id=639792
This commit is contained in:
Tristan Van Berkom 2011-01-19 00:41:35 +09:00
parent 34b573b07c
commit e6a51e4afb

View File

@ -961,7 +961,7 @@ row_reordered_cb (GtkTreeModel *model,
GtkTreeMenuPrivate *priv = menu->priv;
gboolean this_menu = FALSE;
if (path == NULL || priv->root == NULL)
if (gtk_tree_path_get_depth (path) == 0 && !priv->root)
this_menu = TRUE;
else if (priv->root)
{