projects
/
ptask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed useless var
[ptask.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
83dfda6
..
fe98488
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-45,6
+45,7
@@
static struct task **tasks;
static struct option long_options[] = {
{"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
static struct option long_options[] = {
{"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
+ {"force-unsupported-taskwarrior", no_argument, 0, 'f'},
{"debug", required_argument, 0, 'd'},
{0, 0, 0, 0}
};
{"debug", required_argument, 0, 'd'},
{0, 0, 0, 0}
};
@@
-74,7
+75,8
@@
static void print_help()
" -v, --version display version information and exit"));
puts("");
" -v, --version display version information and exit"));
puts("");
-
+ puts(_(" -f, --force-unsupported-taskwarrior force usage of an"
+ " unsupported version of taskwarrior"));
puts(_(" -d, --debug=LEVEL "
"set the debug level, integer between 0 and 3"));
puts(_(" -d, --debug=LEVEL "
"set the debug level, integer between 0 and 3"));
@@
-88,7
+90,7
@@
static void print_help()
void refresh()
{
GtkWidget *dialog;
void refresh()
{
GtkWidget *dialog;
- const char *current_
prj, *current_
uuid;
+ const char *current_uuid;
struct task **old_tasks;
log_fct_enter();
struct task **old_tasks;
log_fct_enter();
@@
-96,12
+98,10
@@
void refresh()
if (tasks) {
old_tasks = tasks;
if (tasks) {
old_tasks = tasks;
- current_prj = ui_projecttree_get_project();
current_uuid = ui_tasktree_get_task_uuid();
current_uuid = ui_tasktree_get_task_uuid();
- ui_tasktree_update(NULL
, NULL
);
+ ui_tasktree_update(NULL);
} else {
old_tasks = NULL;
} else {
old_tasks = NULL;
- current_prj = NULL;
current_uuid = NULL;
}
current_uuid = NULL;
}
@@
-109,7
+109,7
@@
void refresh()
if (tasks) {
ui_projecttree_update(tasks);
if (tasks) {
ui_projecttree_update(tasks);
- ui_tasktree_update(tasks
, current_prj
);
+ ui_tasktree_update(tasks);
if (current_uuid)
ui_tasktree_set_selected_task(current_uuid);
} else {
if (current_uuid)
ui_tasktree_set_selected_task(current_uuid);
} else {
@@
-119,7
+119,7
@@
void refresh()
GTK_BUTTONS_CLOSE,
_("Error loading tasks, verify "
"that a supported version of "
GTK_BUTTONS_CLOSE,
_("Error loading tasks, verify "
"that a supported version of "
- "taskwarrior is installed
"));
+ "taskwarrior is installed
.
"));
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
@@
-171,7
+171,7
@@
int main(int argc, char **argv)
#endif
cmdok = 1;
#endif
cmdok = 1;
- while ((optc = getopt_long(argc, argv, "vhd:", long_options,
+ while ((optc = getopt_long(argc, argv, "vh
f
d:", long_options,
&opti)) != -1) {
switch (optc) {
case 'h':
&opti)) != -1) {
switch (optc) {
case 'h':
@@
-184,6
+184,11
@@
int main(int argc, char **argv)
log_level = atoi(optarg);
log_info(_("Enables debug mode."));
break;
log_level = atoi(optarg);
log_info(_("Enables debug mode."));
break;
+ case 'f':
+ log_info(_("Force usage of an unsupported version of "
+ "taskwarrior."));
+ tw_enable_check_version(0);
+ break;
default:
cmdok = 0;
break;
default:
cmdok = 0;
break;