Report bugs to <jeanfi@gmail.com>.
ptask home page: <http://wpitchoune.net/ptask>."
-ac_cs_config="'CFLAGS=-O1' '--prefix=/tmp'"
+ac_cs_config="'--prefix=/tmp' 'CFLAGS=-O1'"
ac_cs_version="\
ptask config.status 0.0.x
configured by ./configure, generated by GNU Autoconf 2.69,
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-ac_pwd='/home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk'
+ac_pwd='/home/jporsini/work/wpitchoune/svnpub/ptask/trunk'
srcdir='.'
INSTALL='/usr/bin/install -c'
MKDIR_P='/bin/mkdir -p'
fi
if $ac_cs_recheck; then
- set X /bin/bash './configure' 'CFLAGS=-O1' '--prefix=/tmp' $ac_configure_extra_args --no-create --no-recursion
+ set X /bin/bash './configure' '--prefix=/tmp' 'CFLAGS=-O1' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
CONFIG_SHELL='/bin/bash'
S["MKDIR_P"]="/bin/mkdir -p"
S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
S["STRIP"]=""
-S["install_sh"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh"
-S["MAKEINFO"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run makeinfo"
-S["AUTOHEADER"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run autoheader"
-S["AUTOMAKE"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run automake-1.11"
-S["AUTOCONF"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run autoconf"
-S["ACLOCAL"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run aclocal-1.11"
+S["install_sh"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh"
+S["MAKEINFO"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run makeinfo"
+S["AUTOHEADER"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run autoheader"
+S["AUTOMAKE"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run automake-1.11"
+S["AUTOCONF"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run autoconf"
+S["ACLOCAL"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run aclocal-1.11"
S["VERSION"]="0.0.x"
S["PACKAGE"]="ptask"
S["CYGPATH_W"]="echo"
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh
MKDIR_P = /bin/mkdir -p
mkdir_p = /bin/mkdir -p
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh
MKDIR_P = /bin/mkdir -p
mkdir_p = /bin/mkdir -p
<child>
<object class="GtkTreeView" id="projecttree">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="model">projectstore</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2"/>
void refresh()
{
GtkWidget *dialog;
- GtkTreeModel *model;
- struct task **tasks_cur;
- struct task *task;
- int i;
- GtkTreeIter iter;
- const char *project;
log_fct_enter();
ui_taskpanel_update(NULL);
if (tasks) {
- ui_tasktree_update(NULL);
+ ui_tasktree_update(NULL, NULL);
tw_task_list_free(tasks);
}
tasks = tw_get_all_tasks(ui_get_status_filter());
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview));
- gtk_list_store_clear(GTK_LIST_STORE(model));
-
if (tasks) {
- 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)
- project = task->project;
- else
- project = "";
-
- gtk_list_store_set(GTK_LIST_STORE(model),
- &iter,
- COL_ID, (*tasks_cur)->id,
- COL_DESCRIPTION,
- (*tasks_cur)->description,
- COL_PROJECT, project,
- COL_UUID, (*tasks_cur)->uuid,
- COL_PRIORITY, (*tasks_cur)->priority,
- -1);
- }
ui_projecttree_update(tasks);
- ui_tasktree_update(tasks);
+ ui_tasktree_update(tasks, NULL);
} else {
dialog = gtk_message_dialog_new(NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
#include <log.h>
#include <ui_projecttree.h>
+#include <ui_tasktree.h>
enum {
COL_NAME,
static GtkTreeView *w_treeview;
+static int cursor_changed_cbk(GtkTreeView *treeview, gpointer data)
+{
+ log_fct_enter();
+
+ ui_tasktree_update_filter(ui_projecttree_get_project());
+
+ log_fct_exit();
+
+ return FALSE;
+}
+
void ui_projecttree_init(GtkBuilder *builder)
{
w_treeview = GTK_TREE_VIEW(gtk_builder_get_object(builder,
"projecttree"));
+ g_signal_connect(w_treeview,
+ "cursor-changed", (GCallback)cursor_changed_cbk,
+ NULL);
}
const char *ui_projecttree_get_project()
gtk_tree_model_get_value(model, &iter, COL_NAME, &value);
prj = g_value_get_string(&value);
+
+ if (!strcmp(prj, "ALL"))
+ prj = NULL;
} else {
prj = NULL;
}
#include <gtk/gtk.h>
#include <log.h>
+#include <ui_projecttree.h>
#include <ui_tasktree.h>
static GtkTreeView *w_treeview;
return result;
}
-void ui_tasktree_update(struct task **tasks)
+void ui_tasktree_update(struct task **tasks, const char *prj_filter)
{
+ GtkTreeModel *model;
+ struct task **tasks_cur;
+ struct task *task;
+ GtkTreeIter iter;
+ const char *prj;
+
current_tasks = tasks;
+
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview));
+ gtk_list_store_clear(GTK_LIST_STORE(model));
+
+ if (current_tasks) {
+ for (tasks_cur = current_tasks; *tasks_cur; tasks_cur++) {
+ task = (*tasks_cur);
+
+ if (task->project)
+ prj = task->project;
+ else
+ prj = "";
+
+ if (prj_filter && strcmp(prj, prj_filter))
+ continue;
+
+ gtk_list_store_append(GTK_LIST_STORE(model), &iter);
+
+
+ gtk_list_store_set(GTK_LIST_STORE(model),
+ &iter,
+ COL_ID, (*tasks_cur)->id,
+ COL_DESCRIPTION,
+ (*tasks_cur)->description,
+ COL_PROJECT, prj,
+ COL_UUID, (*tasks_cur)->uuid,
+ COL_PRIORITY, (*tasks_cur)->priority,
+ -1);
+ }
+ }
+
+}
+
+void ui_tasktree_update_filter(const char *prj_filter)
+{
+ ui_tasktree_update(current_tasks, prj_filter);
}
void ui_tasktree_load_settings(GSettings *);
void ui_tasktree_save_settings(GSettings *);
struct task *ui_tasktree_get_selected_task();
-void ui_tasktree_update(struct task **);
+void ui_tasktree_update(struct task **, const char *);
+void ui_tasktree_update_filter(const char *);
#endif