- GtkTreeModel *model;
- struct task **tasks_cur;
- struct task *task;
- int i;
- GtkTreeIter iter;
-
- 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);
+ GtkWidget *dialog;
+ const char *current_prj, *current_uuid;
+ struct task **old_tasks;
+
+ log_fct_enter();
+ ui_taskpanel_update(NULL);
+
+ if (tasks) {
+ old_tasks = tasks;
+ current_prj = ui_projecttree_get_project();
+ current_uuid = ui_tasktree_get_task_uuid();
+ ui_tasktree_update(NULL, NULL);
+ } else {
+ old_tasks = NULL;
+ current_prj = NULL;
+ current_uuid = NULL;