gapplication: add GApplication:version property

This property is supposed to be used by authors of applications that use GAppliaction to output the version by --version flag or otherwise if a version is needed.

Closes #3198

Signed-off-by: Maxim Moskalets <Maxim.Moskalets@kaspersky.com>
This commit is contained in:
Maxim Moskalets
2024-02-09 10:04:14 +00:00
committed by Philip Withnall
parent 59d454a20d
commit cbcb35a77a
4 changed files with 145 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ main (int argc, char **argv)
G_APPLICATION_HANDLES_COMMAND_LINE);
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
g_application_set_inactivity_timeout (app, 10000);
g_application_set_version (app, "2.3");
status = g_application_run (app, argc, argv);