diff options
author | Björn Lindqvist <bjourne@gmail.com> | 2008-10-06 21:15:45 +0000 |
---|---|---|
committer | Björn Lindqvist <bjornl@src.gnome.org> | 2008-10-06 21:15:45 +0000 |
commit | 36c545b0a1ec3bb30f151bdfcece06a914cd5fce (patch) | |
tree | 1c0e83bde760b84382f568e6c82160b582cd424a /gtk | |
parent | 29c097a5f7a2418a2415b9bb8faebbbbe3827b90 (diff) | |
download | gtk+-36c545b0a1ec3bb30f151bdfcece06a914cd5fce.tar.gz |
Bug 539464 – gtk_cell_view_get_model is missing in GtkCellView
2008-10-06 Björn Lindqvist <bjourne@gmail.com>
Bug 539464 – gtk_cell_view_get_model is missing in GtkCellView
* gtk/gtkcellview.c (gtk_cell_view_get_model): Add
gtk_cell_view_get_model.
svn path=/trunk/; revision=21593
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtk.symbols | 1 | ||||
-rw-r--r-- | gtk/gtkcellview.c | 19 | ||||
-rw-r--r-- | gtk/gtkcellview.h | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 7bd39ea15a..14778ac069 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -648,6 +648,7 @@ gtk_cell_renderer_toggle_set_radio #if IN_FILE(__GTK_CELL_VIEW_C__) gtk_cell_view_get_cell_renderers gtk_cell_view_get_displayed_row +gtk_cell_view_get_model gtk_cell_view_get_size_of_row gtk_cell_view_get_type G_GNUC_CONST gtk_cell_view_new diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index 144feba00b..43cdce1cc1 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -887,6 +887,25 @@ gtk_cell_view_set_model (GtkCellView *cell_view, } /** + * gtk_cell_view_get_model: + * @cell_view: a #GtkCellView + * + * Returns the model for @cell_view. If no model is used %NULL is + * returned. + * + * Returns: a #GtkTreeModel used or %NULL + * + * Since: 2.16 + **/ +GtkTreeModel * +gtk_cell_view_get_model (GtkCellView *cell_view) +{ + g_return_val_if_fail (GTK_IS_CELL_VIEW (cell_view), NULL); + + return cell_view->priv->model; +} + +/** * gtk_cell_view_set_displayed_row: * @cell_view: a #GtkCellView * @path: a #GtkTreePath or %NULL to unset. diff --git a/gtk/gtkcellview.h b/gtk/gtkcellview.h index a214fa8019..c07f24960c 100644 --- a/gtk/gtkcellview.h +++ b/gtk/gtkcellview.h @@ -62,6 +62,7 @@ GtkWidget *gtk_cell_view_new_with_pixbuf (GdkPixbuf *pixbuf) void gtk_cell_view_set_model (GtkCellView *cell_view, GtkTreeModel *model); +GtkTreeModel *gtk_cell_view_get_model (GtkCellView *cell_view); void gtk_cell_view_set_displayed_row (GtkCellView *cell_view, GtkTreePath *path); GtkTreePath *gtk_cell_view_get_displayed_row (GtkCellView *cell_view); |