mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 20:50:12 +00:00
print-editor: Add --version support
Since it is easy now.
This commit is contained in:
parent
761e92c664
commit
cec8d46b6a
@ -861,6 +861,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
GtkApplication *app;
|
||||
GError *error = NULL;
|
||||
char version[80];
|
||||
|
||||
gtk_init ();
|
||||
|
||||
@ -881,6 +882,13 @@ main (int argc, char **argv)
|
||||
|
||||
app = gtk_application_new ("org.gtk.PrintEditor4", G_APPLICATION_HANDLES_OPEN);
|
||||
|
||||
g_snprintf (version, sizeof (version), "%s%s%s\n",
|
||||
PACKAGE_VERSION,
|
||||
g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
|
||||
g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
|
||||
|
||||
g_application_set_version (G_APPLICATION (app), version);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
app);
|
||||
|
Loading…
Reference in New Issue
Block a user