-static void refresh()
-{
- GtkTreeModel *model;
- struct task **tasks_cur;
- struct task *task;
- int i;
- GtkTreeIter iter;
- /*GtkTreeSelection *sel;*/
-
- tasks = get_all_tasks();
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview));
- gtk_list_store_clear(GTK_LIST_STORE(model));
- for (tasks_cur = tasks, i = 0; *tasks_cur; tasks_cur++, i++) {
- task = (*tasks_cur);
-
- gtk_list_store_append(GTK_LIST_STORE(model), &iter);
-
- if (task->project)
- gtk_list_store_set(GTK_LIST_STORE(model),
- &iter,
- 2, task->project,
- -1);
-
- gtk_list_store_set(GTK_LIST_STORE(model),
- &iter,
- 0, (*tasks_cur)->id,
- 1, (*tasks_cur)->description,
- -1);
- }