summaryrefslogtreecommitdiff
path: root/gtk/gtktreeviewcolumn.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r--gtk/gtktreeviewcolumn.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index c67850cf09..4e71b33f13 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1748,8 +1748,9 @@ gtk_tree_view_column_get_reorderable (GtkTreeViewColumn *tree_column)
* @tree_column: a #GtkTreeViewColumn
* @sort_column_id: The sort_column_id of the model to sort on.
*
- * Sets the sort_column_id that the column sorts on. Doing so makes headers
- * clickable.
+ * Sets the logical sort_column_id that this column sorts on when this
+ * column is selected for sorting. Doing so makes
+ * the column header clickable.
**/
void
gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
@@ -1795,6 +1796,24 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
}
/**
+ * gtk_tree_view_column_get_sort_column_id:
+ * @tree_column: a #GtkTreeViewColumn
+ *
+ * Gets the logical sort_column_id that the model sorts on when this
+ * coumn is selected for sorting. See gtk_tree_view_column_set_sort_column_id().
+ *
+ * Return value: the current sort_column_id for this column, or -1 if
+ * this column can't be used for sorting.
+ **/
+gint
+gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column)
+{
+ g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
+
+ return tree_column->sort_column_id;
+}
+
+/**
* gtk_tree_view_column_set_sort_indicator:
* @tree_column: a #GtkTreeViewColumn
* @setting: %TRUE to display an indicator that the column is sorted