1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-25 21:29:32 +00:00

application: add --version flag

Closes #256
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-04-16 19:57:03 +02:00
parent 9a4debe87e
commit 4d405e6dcb

View file

@ -87,6 +87,14 @@ handle_local_options (GApplication *application,
error->message);
}
ok = g_variant_dict_contains (options, "version");
if (ok) {
char * version = g_str_equal (VCS_TAG, "") ? PACKAGE_VERSION : VCS_TAG;
g_print ("%s %s\n", APP_DATA_NAME, version);
exit (0);
}
ok = g_variant_dict_lookup (options, "provider", "&s", &arg);
if (ok) {
g_action_group_activate_action (G_ACTION_GROUP (application),
@ -563,6 +571,12 @@ calls_application_init (CallsApplication *self)
_("Dial a number"),
_("NUMBER")
},
{
"version", 'v', G_OPTION_FLAG_NONE,
G_OPTION_ARG_NONE, NULL,
_("Print current version"),
NULL
},
{
NULL
}