diff options
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff')
-rw-r--r-- | meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff b/meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff new file mode 100644 index 0000000000..af2d495a86 --- /dev/null +++ b/meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff | |||
@@ -0,0 +1,52 @@ | |||
1 | --- gtk+-2.6.4/gtk/gtktreemodelfilter.c 2005-02-24 16:43:53.000000000 +0200 | ||
2 | +++ gtk+-2.6.4/gtk/gtktreemodelfilter.c 2005-04-06 16:19:38.177734464 +0300 | ||
3 | @@ -1210,14 +1210,22 @@ | ||
4 | if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= | ||
5 | gtk_tree_path_get_depth (c_path)) | ||
6 | { | ||
7 | - gint level; | ||
8 | + gint level, i; | ||
9 | gint *v_indices, *c_indices; | ||
10 | + gboolean common_prefix = TRUE; | ||
11 | |||
12 | level = gtk_tree_path_get_depth (c_path) - 1; | ||
13 | v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root); | ||
14 | c_indices = gtk_tree_path_get_indices (c_path); | ||
15 | |||
16 | - if (v_indices[level] >= c_indices[level]) | ||
17 | + for (i = 0; i < level; i++) | ||
18 | + if (v_indices[i] != c_indices[i]) | ||
19 | + { | ||
20 | + common_prefix = FALSE; | ||
21 | + break; | ||
22 | + } | ||
23 | + | ||
24 | + if (common_prefix && v_indices[level] >= c_indices[level]) | ||
25 | (v_indices[level])++; | ||
26 | } | ||
27 | } | ||
28 | @@ -1455,14 +1463,22 @@ | ||
29 | if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= | ||
30 | gtk_tree_path_get_depth (c_path)) | ||
31 | { | ||
32 | - gint level; | ||
33 | + gint level, i; | ||
34 | gint *v_indices, *c_indices; | ||
35 | + gboolean common_prefix = TRUE; | ||
36 | |||
37 | level = gtk_tree_path_get_depth (c_path) - 1; | ||
38 | v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root); | ||
39 | c_indices = gtk_tree_path_get_indices (c_path); | ||
40 | |||
41 | - if (v_indices[level] > c_indices[level]) | ||
42 | + for (i = 0; i < level; i++) | ||
43 | + if (v_indices[i] != c_indices[i]) | ||
44 | + { | ||
45 | + common_prefix = FALSE; | ||
46 | + break; | ||
47 | + } | ||
48 | + | ||
49 | + if (common_prefix && v_indices[level] > c_indices[level]) | ||
50 | (v_indices[level])--; | ||
51 | } | ||
52 | } | ||