Commit 22870aa9 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

add a little test for the newly introduced indicator-size property.

2006-01-13  Kristian Rietveld  <kris@imendio.com>

	* tests/testtreefocus.c (set_indicator_size), (main): add a little
	test for the newly introduced indicator-size property.
parent ce5e74e1
2006-01-13 Kristian Rietveld <kris@imendio.com>
* tests/testtreefocus.c (set_indicator_size), (main): add a little
test for the newly introduced indicator-size property.
2006-01-13 Kristian Rietveld <kris@imendio.com>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_init):
......
2006-01-13 Kristian Rietveld <kris@imendio.com>
* tests/testtreefocus.c (set_indicator_size), (main): add a little
test for the newly introduced indicator-size property.
2006-01-13 Kristian Rietveld <kris@imendio.com>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_init):
......
......@@ -319,6 +319,23 @@ dave_toggled (GtkCellRendererToggle *cell,
gtk_tree_path_free (path);
}
static void
set_indicator_size (GtkTreeViewColumn *column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
gint size;
GtkTreePath *path;
path = gtk_tree_model_get_path (model, iter);
size = gtk_tree_path_get_indices (path)[0] * 2 + 10;
gtk_tree_path_free (path);
g_object_set (cell, "indicator_size", size, NULL);
}
int
main (int argc, char *argv[])
{
......@@ -435,6 +452,7 @@ main (int argc, char *argv[])
"visible", VISIBLE_COLUMN,
NULL);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1);
gtk_tree_view_column_set_cell_data_func (column, renderer, set_indicator_size, NULL, NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment