diff options
-rw-r--r-- | docs/reference/gtk/gtk3-sections.txt | 1 | ||||
-rw-r--r-- | gtk/gtk.symbols | 1 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 18 | ||||
-rw-r--r-- | gtk/gtktreeview.h | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt index b9c9fb8016..52f97132fe 100644 --- a/docs/reference/gtk/gtk3-sections.txt +++ b/docs/reference/gtk/gtk3-sections.txt @@ -4349,6 +4349,7 @@ gtk_tree_view_remove_column gtk_tree_view_insert_column gtk_tree_view_insert_column_with_attributes gtk_tree_view_insert_column_with_data_func +gtk_tree_view_get_n_columns gtk_tree_view_get_column gtk_tree_view_get_columns gtk_tree_view_move_column_after diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 2f34a4a938..237d093062 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -3381,6 +3381,7 @@ gtk_tree_view_get_hover_expand gtk_tree_view_get_hover_selection gtk_tree_view_get_level_indentation gtk_tree_view_get_model +gtk_tree_view_get_n_columns gtk_tree_view_get_path_at_pos gtk_tree_view_get_reorderable gtk_tree_view_get_row_separator_func diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 1fe6031194..9d75737ed6 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -12140,6 +12140,24 @@ gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_vie } /** + * gtk_tree_view_get_n_columns: + * @tree_view: a #GtkTreeView + * + * Queries the number of columns in the given @tree_view. + * + * Returns: The number of columns in the @tree_view + * + * Since: 3.4 + **/ +guint +gtk_tree_view_get_n_columns (GtkTreeView *tree_view) +{ + g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), 0); + + return tree_view->priv->n_columns; +} + +/** * gtk_tree_view_get_column: * @tree_view: A #GtkTreeView. * @n: The position of the column, counting from 0. diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index 527586967c..697a61a79b 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -257,6 +257,7 @@ gint gtk_tree_view_insert_column_with_data_func (GtkTreeView GtkTreeCellDataFunc func, gpointer data, GDestroyNotify dnotify); +guint gtk_tree_view_get_n_columns (GtkTreeView *tree_view); GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view, gint n); GList *gtk_tree_view_get_columns (GtkTreeView *tree_view); |