[libgd] view-generic: Add support for sort models as well
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd] view-generic: Add support for sort models as well
- Date: Wed, 22 Jan 2014 17:33:33 +0000 (UTC)
commit 139d0d7cc0fb847fbc0989dda9692a635da4939b
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 22 15:26:43 2014 +0100
view-generic: Add support for sort models as well
libgd/gd-main-view-generic.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libgd/gd-main-view-generic.c b/libgd/gd-main-view-generic.c
index f46f47d..51347e0 100644
--- a/libgd/gd-main-view-generic.c
+++ b/libgd/gd-main-view-generic.c
@@ -238,6 +238,12 @@ set_selection_foreach (GtkTreeModel *model,
gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
&real_iter, iter);
}
+ else if (GTK_IS_TREE_MODEL_SORT (model))
+ {
+ actual_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (model));
+ gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (model),
+ &real_iter, iter);
+ }
else
{
actual_model = model;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]