Commit 69c58e53 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

add this function, bug 40251

2001-01-10  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
	add this function, bug 40251

	* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
	of type macro
parent b29eece8
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
2001-01-10 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes):
add this function, bug 40251
* gtk/gtktreemodelsimple.h (GTK_TYPE_TREE_MODEL_SIMPLE): fix name
of type macro
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
......
......@@ -27,7 +27,7 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_MODEL_SIMPLE (gtk_tree_model_simple_get_type ())
#define GTK_TYPE_TREE_MODEL_SIMPLE (gtk_tree_model_simple_get_type ())
#define GTK_TREE_MODEL_SIMPLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MODEL_SIMPLE, GtkTreeModelSimple))
#define GTK_TREE_MODEL_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MODEL_SIMPLE, GtkTreeModelSimpleClass))
#define GTK_IS_TREE_MODEL_SIMPLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MODEL_SIMPLE))
......
......@@ -495,7 +495,6 @@ static void
gtk_tree_view_column_set_attributesv (GtkTreeViewColumn *tree_column,
va_list args)
{
GSList *list;
gchar *attribute;
gint column;
......@@ -504,16 +503,8 @@ gtk_tree_view_column_set_attributesv (GtkTreeViewColumn *tree_column,
attribute = va_arg (args, gchar *);
list = tree_column->attributes;
while (list && list->next)
{
g_free (list->data);
list = list->next->next;
}
g_slist_free (tree_column->attributes);
tree_column->attributes = NULL;
gtk_tree_view_column_clear_attributes (tree_column);
while (attribute != NULL)
{
column = va_arg (args, gint);
......@@ -550,6 +541,31 @@ gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column,
va_end (args);
}
/**
* gtk_tree_view_column_clear_attributes:
* @tree_column: a #GtkTreeViewColumn
*
* Clears all existing attributes previously set with
* gtk_tree_view_column_set_attributes().
**/
void
gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column)
{
GSList *list;
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
list = tree_column->attributes;
while (list && list->next)
{
g_free (list->data);
list = list->next->next;
}
g_slist_free (tree_column->attributes);
tree_column->attributes = NULL;
}
/**
* gtk_tree_view_column_set_cell_data:
* @tree_column: A #GtkTreeViewColumn.
......
......@@ -95,6 +95,7 @@ void gtk_tree_view_column_add_attribute (GtkTreeViewColumn
gint column);
void gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column,
...);
void gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column);
void gtk_tree_view_column_set_cell_data (GtkTreeViewColumn *tree_column,
GtkTreeModel *tree_model,
GtkTreeIter *iter);
......
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