Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Preparing for GLib 3.0: G_APPLICATION_FLAGS_NONE is deprecated in GLib 2.74 #267

Open
vmagnin opened this issue Oct 3, 2022 · 0 comments
Assignees
Labels
GTK 4 GTK 4 only

Comments

@vmagnin
Copy link
Owner

vmagnin commented Oct 3, 2022

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)
@vmagnin vmagnin added the GTK 4 GTK 4 only label Oct 3, 2022
@vmagnin vmagnin self-assigned this Oct 3, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
GTK 4 GTK 4 only
Projects
None yet
Development

No branches or pull requests

1 participant