docs: make tutorial compatible with GLib versions older than 2.74

pull/13459/head
LegStrong 4 months ago committed by Eli Schwartz
parent 9459bd8bd4
commit 2d98cfd473
  1. 4
      docs/markdown/Tutorial.md

@ -143,7 +143,11 @@ int main(int argc, char **argv)
GtkApplication *app;
int status;
#if GLIB_CHECK_VERSION(2, 74, 0)
app = gtk_application_new(NULL, G_APPLICATION_DEFAULT_FLAGS);
#else
app = gtk_application_new(NULL, G_APPLICATION_FLAGS_NONE);
#endif
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
status = g_application_run(G_APPLICATION(app), argc, argv);
g_object_unref(app);

Loading…
Cancel
Save