vmagnin/gtk-fortran

Preparing for GLib 3.0: G_APPLICATION_FLAGS_NONE is deprecated in GLib 2.74

vmagnin opened this issue · 0 comments

In GLib 2.74.0, available in Fedora 37 with GTK 4.8, the /usr/include/glib-2.0/gio/gioenums.h contains:

typedef enum /*< prefix=G_APPLICATION >*/
{
  G_APPLICATION_FLAGS_NONE GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(G_APPLICATION_DEFAULT_FLAGS),
  G_APPLICATION_DEFAULT_FLAGS GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,

https://docs.gtk.org/gio/flags.ApplicationFlags.html#flags_none

G_APPLICATION_FLAGS_NONE : Default. Deprecated in 2.74, use G_APPLICATION_DEFAULT_FLAGS instead.

It therefore may be removed in the future GLib 3.0: https://gitlab.gnome.org/GNOME/glib/-/milestones

The concerned files in gtk-fortran are:

$ ack G_APPLICATION_FLAGS_NONE -l
tutorials/my_first_gtk_app2.f90
tutorials/my_first_gtk_app3.f90
tutorials/my_first_gtk_app6.f90
tutorials/my_first_gtk_app4.f90
tutorials/my_first_gtk_app5.f90
tutorials/my_first_gtk_app7.f90
examples/menubar.f90
examples/gtkzero_gapp.f90
examples/mandelbrot_pixbuf_zoom.f90
examples/julia_pixbuf.f90
examples/bazaar.f90
examples/cairo-basics.f90
examples/cairo-basics-click.f90
examples/cairo-tests.f90
examples/notebooks.f90
examples/gtkhello.f90
examples/list_demo.f90
build/src/gtk-fortran.out.f90
src/gtk-hl-container.f90
src/gtk-fortran.f90
src/gtkenums-auto.in

For example, in bazaar.f90:

  app = gtk_application_new("gtk-fortran.examples.bazaar"//c_null_char, &
                            & G_APPLICATION_FLAGS_NONE)