diff options
author | Yevgen Muntyan <muntyan@tamu.edu> | 2007-11-15 17:00:33 +0000 |
---|---|---|
committer | Yevgen Muntyan <muntyan@src.gnome.org> | 2007-11-15 17:00:33 +0000 |
commit | 921da326f5dd7fed5ef01b32b7269ea8fc4bf745 (patch) | |
tree | e6d1b76dc3bcb8295063372d738453b572e10253 /gtk/gtktextbtree.c | |
parent | a3eb6a98d7a497b1f8bb5a73d497ce673d942837 (diff) | |
download | gtk+-921da326f5dd7fed5ef01b32b7269ea8fc4bf745.tar.gz |
sort returned tags array by tags priority (#497102).
2007-11-15 Yevgen Muntyan <muntyan@tamu.edu>
* gtk/gtktextbtree.c (_gtk_text_btree_get_tags): sort returned
tags array by tags priority (#497102).
* gtk/gtktextiter.c (gtk_text_iter_get_tags), (gtk_text_iter_get_attributes):
* gtk/gtktextlayout.c (get_tags_array_at_iter): and do not sort it here.
svn path=/trunk/; revision=18995
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r-- | gtk/gtktextbtree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index b170c58525..9232d8c244 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -2196,6 +2196,8 @@ _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, return line; } +/* It returns an array sorted by tags priority, ready to pass to + * _gtk_text_attributes_fill_from_tags() */ GtkTextTag** _gtk_text_btree_get_tags (const GtkTextIter *iter, gint *num_tags) @@ -2304,6 +2306,10 @@ _gtk_text_btree_get_tags (const GtkTextIter *iter, g_free (tagInfo.tags); return NULL; } + + /* Sort tags in ascending order of priority */ + _gtk_text_tag_array_sort (tagInfo.tags, dst); + return tagInfo.tags; } |