projects
/
ptask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added -f option to force usage of an unsupported version of taskwarrior
[ptask.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
8dc69ba
..
0f66224
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"));
@@
-119,7
+121,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
+173,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
+186,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;