summaryrefslogtreecommitdiff
path: root/gtk/gtktreedatalist.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2000-10-27 23:34:58 +0000
committerJonathan Blandford <jrb@src.gnome.org>2000-10-27 23:34:58 +0000
commit0ccb3e9aed43a9c2a8b77f7af5c29f4e23b4698d (patch)
treea01d83d5374da6025125c53fd36aefb4396a2556 /gtk/gtktreedatalist.c
parent2bf87de4cb334a850aa2226b9118b302140f71e2 (diff)
downloadgtk+-0ccb3e9aed43a9c2a8b77f7af5c29f4e23b4698d.tar.gz
Not sure how this ever worked. Fixed it to use new iter stuff, and added
Fri Oct 27 17:56:26 2000 Jonathan Blandford <jrb@redhat.com> * gtk/gtkliststore.c: Not sure how this ever worked. Fixed it to use new iter stuff, and added all the appropriate signals et al. * gtk/gtktreedatalist.h: s/gtk/_gtk to further reinforce that this code is internal to gtk only.
Diffstat (limited to 'gtk/gtktreedatalist.c')
-rw-r--r--gtk/gtktreedatalist.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c
index f89eef8247..f2fe36e4e5 100644
--- a/gtk/gtktreedatalist.c
+++ b/gtk/gtktreedatalist.c
@@ -68,7 +68,7 @@ gtk_tree_data_list_validate_allocator (GAllocator *allocator)
}
void
-gtk_tree_data_list_push_allocator (GAllocator *allocator)
+_gtk_tree_data_list_push_allocator (GAllocator *allocator)
{
G_LOCK (current_allocator);
gtk_tree_data_list_validate_allocator ( allocator );
@@ -78,7 +78,7 @@ gtk_tree_data_list_push_allocator (GAllocator *allocator)
}
void
-gtk_tree_data_list_pop_allocator (void)
+_gtk_tree_data_list_pop_allocator (void)
{
G_LOCK (current_allocator);
if (current_allocator)
@@ -94,7 +94,7 @@ gtk_tree_data_list_pop_allocator (void)
}
GtkTreeDataList *
-gtk_tree_data_list_alloc (void)
+_gtk_tree_data_list_alloc (void)
{
GtkTreeDataList *list;
@@ -120,8 +120,28 @@ gtk_tree_data_list_alloc (void)
}
void
-gtk_tree_data_list_free (GtkTreeDataList *list)
+_gtk_tree_data_list_free (GtkTreeDataList *list,
+ GType *column_headers)
{
+ GtkTreeDataList *tmp;
+ gint i = 0;
+
+ for (tmp = list; tmp; tmp = tmp->next)
+ {
+ switch (column_headers [i])
+ {
+ case G_TYPE_STRING:
+ g_free ((gchar *) tmp->data.v_pointer);
+ break;
+ case G_TYPE_OBJECT:
+ g_object_unref (G_OBJECT (tmp->data.v_pointer));
+ break;
+ default:
+ break;
+ }
+ i++;
+ }
+
G_LOCK (current_allocator);
list->next = current_allocator->free_nodes;
current_allocator->free_nodes = list;
@@ -129,9 +149,9 @@ gtk_tree_data_list_free (GtkTreeDataList *list)
}
void
-gtk_tree_data_list_node_to_value (GtkTreeDataList *list,
- GType type,
- GValue *value)
+_gtk_tree_data_list_node_to_value (GtkTreeDataList *list,
+ GType type,
+ GValue *value)
{
g_value_init (value, type);
@@ -171,8 +191,8 @@ gtk_tree_data_list_node_to_value (GtkTreeDataList *list,
}
void
-gtk_tree_data_list_value_to_node (GtkTreeDataList *list,
- GValue *value)
+_gtk_tree_data_list_value_to_node (GtkTreeDataList *list,
+ GValue *value)
{
switch (value->g_type)
{