mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 11:35:32 +00:00
parent
9a4debe87e
commit
4d405e6dcb
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue