aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree-model.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-05-17 03:26:09 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-05-17 03:26:09 +0800
commitc79dfb2c959016e8f54665d913de2f0dee5f387e (patch)
treea0787054c44df24a10d579594cda2f3366c1568e /widgets/table/e-tree-model.c
parent1aa488ba63931d4b88d0be45105cf370ac43f2a4 (diff)
downloadgsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.tar
gsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.tar.gz
gsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.tar.bz2
gsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.tar.lz
gsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.tar.xz
gsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.tar.zst
gsoc2013-evolution-c79dfb2c959016e8f54665d913de2f0dee5f387e.zip
Add support for GMail like sorting
svn path=/trunk/; revision=33553
Diffstat (limited to 'widgets/table/e-tree-model.c')
-rw-r--r--widgets/table/e-tree-model.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 976d3f85b9..fca271c5f4 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -173,6 +173,7 @@ e_tree_model_class_init (GObjectClass *klass)
tree_class->has_change_pending = NULL;
+ tree_class->sort_value_at = NULL;
tree_class->value_at = NULL;
tree_class->set_value_at = NULL;
tree_class->is_editable = NULL;
@@ -755,6 +756,38 @@ e_tree_model_has_change_pending (ETreeModel *etree)
}
/**
+ * e_tree_model_sort_value_at:
+ * @etree: The ETreeModel.
+ * @node: The ETreePath to the node we're getting the data from.
+ * @col: the column to retrieve data from
+ *
+ * Return value: This function returns the value that is stored by the
+ * @etree in column @col and node @node. The data returned can be a
+ * pointer or any data value that can be stored inside a pointer.
+ *
+ * The data returned is typically used by an sort renderer if it wants
+ * to proxy the data of cell value_at at a better sorting order.
+ *
+ * The data returned must be valid until the model sends a signal that
+ * affect that piece of data. node_changed and node_deleted affect
+ * all data in tha t node and all nodes under that node.
+ * node_data_changed affects the data in that node. node_col_changed
+ * affects the data in that node for that column. node_inserted,
+ * node_removed, and no_change don't affect any data in this way.
+ **/
+void *
+e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, int col)
+{
+ g_return_val_if_fail (etree != NULL, NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+
+ if (ETM_CLASS(etree)->sort_value_at)
+ return ETM_CLASS(etree)->sort_value_at (etree, node, col);
+ else
+ return NULL;
+}
+
+/**
* e_tree_model_value_at:
* @etree: The ETreeModel.
* @node: The ETreePath to the node we're getting the data from.