From c8e5702127e507e82e6f68a4b8c546803accea9d Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 30 Jun 2005 08:19:37 +0000 Subject: import clean BK tree at cset 1.3670 --- .../gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff') diff --git a/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff b/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff index e69de29bb2..af2d495a86 100644 --- a/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff +++ b/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff @@ -0,0 +1,52 @@ +--- gtk+-2.6.4/gtk/gtktreemodelfilter.c 2005-02-24 16:43:53.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreemodelfilter.c 2005-04-06 16:19:38.177734464 +0300 +@@ -1210,14 +1210,22 @@ + if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= + gtk_tree_path_get_depth (c_path)) + { +- gint level; ++ gint level, i; + gint *v_indices, *c_indices; ++ gboolean common_prefix = TRUE; + + level = gtk_tree_path_get_depth (c_path) - 1; + v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root); + c_indices = gtk_tree_path_get_indices (c_path); + +- if (v_indices[level] >= c_indices[level]) ++ for (i = 0; i < level; i++) ++ if (v_indices[i] != c_indices[i]) ++ { ++ common_prefix = FALSE; ++ break; ++ } ++ ++ if (common_prefix && v_indices[level] >= c_indices[level]) + (v_indices[level])++; + } + } +@@ -1455,14 +1463,22 @@ + if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= + gtk_tree_path_get_depth (c_path)) + { +- gint level; ++ gint level, i; + gint *v_indices, *c_indices; ++ gboolean common_prefix = TRUE; + + level = gtk_tree_path_get_depth (c_path) - 1; + v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root); + c_indices = gtk_tree_path_get_indices (c_path); + +- if (v_indices[level] > c_indices[level]) ++ for (i = 0; i < level; i++) ++ if (v_indices[i] != c_indices[i]) ++ { ++ common_prefix = FALSE; ++ break; ++ } ++ ++ if (common_prefix && v_indices[level] > c_indices[level]) + (v_indices[level])--; + } + } -- cgit 1.2.3-korg