X-Git-Url: http://git.wpitchoune.net/gitweb/?p=ptask.git;a=blobdiff_plain;f=src%2Fmain.c;fp=src%2Fmain.c;h=0f66224c0f2308ab12d26411b4091c0cade85e9e;hp=8dc69badf1e30e6773e76acdd98b3fbb6dcfb64a;hb=1d479bf18659d6dcb4fefed032088bf4c56d24de;hpb=8bc982c7028c113e0a90db16d63789b139facc2b diff --git a/src/main.c b/src/main.c index 8dc69ba..0f66224 100644 --- 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'}, + {"force-unsupported-taskwarrior", no_argument, 0, 'f'}, {"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(""); - + 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")); @@ -119,7 +121,7 @@ void refresh() 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); } @@ -171,7 +173,7 @@ int main(int argc, char **argv) #endif cmdok = 1; - while ((optc = getopt_long(argc, argv, "vhd:", long_options, + while ((optc = getopt_long(argc, argv, "vhfd:", long_options, &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; + case 'f': + log_info(_("Force usage of an unsupported version of " + "taskwarrior.")); + tw_enable_check_version(0); + break; default: cmdok = 0; break;