Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Some deprecation warnings during compile #7

Closed
Consolatis opened this issue Apr 12, 2023 · 2 comments · Fixed by #8
Closed

Some deprecation warnings during compile #7

Consolatis opened this issue Apr 12, 2023 · 2 comments · Fixed by #8

Comments

@Consolatis
Copy link

Consolatis commented Apr 12, 2023

Just had a quick try and everything seems to work fine so far. Didn't get into the nitty-gritty details like context menu workspace size constraining and similar yet.

This is just a compile time warning but I thought it might be worth to point out:

[12/26] Compiling C object examples/gtk4-layer-demo.p/demo_gtk-layer-demo.c.o
../examples/demo/gtk-layer-demo.c: In function ‘main’:
../examples/demo/gtk-layer-demo.c:422:5: warning: ‘G_APPLICATION_FLAGS_NONE’ is deprecated: Use 'G_APPLICATION_DEFAULT_FLAGS' instead [-Wdeprecated-declarations]
  422 |     GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.demo", G_APPLICATION_FLAGS_NONE);
      |     ^~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-4.0/gtk/css/gtkcsssection.h:25,
                 from /usr/include/gtk-4.0/gtk/css/gtkcss.h:37,
                 from /usr/include/gtk-4.0/gtk/gtk.h:30,
                 from ../include/gtk4-layer-shell.h:4,
                 from ../examples/demo/gtk-layer-demo.h:4,
                 from ../examples/demo/gtk-layer-demo.c:1:
/usr/include/glib-2.0/gio/gioenums.h:1536:3: note: declared here
 1536 |   G_APPLICATION_FLAGS_NONE GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(G_APPLICATION_DEFAULT_FLAGS),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
[22/26] Compiling C object examples/simple-example-c.p/simple-example.c.o
../examples/simple-example.c: In function ‘main’:
../examples/simple-example.c:51:5: warning: ‘G_APPLICATION_FLAGS_NONE’ is deprecated: Use 'G_APPLICATION_DEFAULT_FLAGS' instead [-Wdeprecated-declarations]
   51 |     GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.example", G_APPLICATION_FLAGS_NONE);
      |     ^~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-4.0/gtk/css/gtkcsssection.h:25,
                 from /usr/include/gtk-4.0/gtk/css/gtkcss.h:37,
                 from /usr/include/gtk-4.0/gtk/gtk.h:30,
                 from ../include/gtk4-layer-shell.h:4,
                 from ../examples/simple-example.c:1:
/usr/include/glib-2.0/gio/gioenums.h:1536:3: note: declared here
 1536 |   G_APPLICATION_FLAGS_NONE GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(G_APPLICATION_DEFAULT_FLAGS),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~

And one more from meson itself:

NOTICE: Future-deprecated features used:
 * 0.56.0: {'dependency.get_pkgconfig_variable'

Another one from wayland-scanner (I suppose):

[2/26] Generating 'src/libgtk4-layer-shell.so.1.0.0.p/wlr-layer-shell-unstable-v1.c'.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
[3/26] Generating 'src/libgtk4-layer-shell.so.1.0.0.p/xdg-shell.c'.
Using "code" is deprecated - use private-code or public-code.
See the help page for details

Edit:

Didn't get into the nitty-gritty details like context menu workspace size constraining and similar yet.

This seems fixed, at least dropdowns and popover menus now end at the bottom of the screen and allow scrolling to reach the remaining items.

@wmww
Copy link
Owner

wmww commented Apr 12, 2023

Can't do anything about G_APPLICATION_FLAGS_NONE since Ubuntu 22.04 doesn't support G_APPLICATION_DEFAULT_FLAGS.

@Consolatis
Copy link
Author

Consolatis commented Apr 12, 2023

Can't do anything about G_APPLICATION_FLAGS_NONE since Ubuntu 22.04 doesn't support G_APPLICATION_DEFAULT_FLAGS.

Well, guess then we will have to live with the warnings. Another option could be a #if within the examples which checks for the GTK version and then uses one or the other.

@wmww wmww closed this as completed in #8 Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants