Added a helper function to handle history

This commit is contained in:
Pierre Pronchery 2010-09-01 01:28:22 +00:00
parent 0dcac17a1c
commit 6603e09fab

View File

@ -98,3 +98,18 @@ static gchar const * _history_get_location(GList * history)
return NULL;
return ghh->url;
}
/* useful */
static GList * _history_append(History * history, GList * list)
{
GList * l;
if(list == NULL)
return g_list_append(list, history);
for(l = list->next; l != NULL; l = g_list_delete_link(l, l))
_history_delete(l->data);
list->next = NULL;
l = g_list_append(list, history);
return l->next;
}