2 * Copyright (C) 2012-2013 jeanfi@gmail.com
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #include <ui_projecttree.h>
24 static GtkTreeView *w_treeview;
26 void ui_projecttree_init(GtkBuilder *builder)
28 w_treeview = GTK_TREE_VIEW(gtk_builder_get_object(builder, "projecttree"));
31 void ui_projecttree_update(struct task **ts)
33 struct project **prjs;
37 log_debug("ui_projecttree_update()");
39 model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview));
40 gtk_list_store_clear(GTK_LIST_STORE(model));
42 prjs = tw_get_projects(ts);
44 gtk_list_store_append(GTK_LIST_STORE(model), &iter);
46 gtk_list_store_set(GTK_LIST_STORE(model),