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

Fsvg.h using deprecated calls. #974

Closed
somiaj opened this issue Mar 24, 2024 · 4 comments · Fixed by #1061
Closed

Fsvg.h using deprecated calls. #974

somiaj opened this issue Mar 24, 2024 · 4 comments · Fixed by #1061
Assignees
Labels
difficulty:easy Issue is suitable for new fvwm developer difficulty:gfi Issue is suitable for a first-time contributor/developer type:internal-improvement Issue is an internal improvement (cleanup, etc.)
Milestone

Comments

@somiaj
Copy link
Collaborator

somiaj commented Mar 24, 2024

Building fvwm gives the following depreciating warnings.

PictureImageLoader.c:287:9: warning: ‘rsvg_handle_get_dimensions’ is deprecated: Use 'rsvg_handle_get_intrinsic_size_in_pixels' instead [-Wdeprecated-declarations]
  287 |         Frsvg_handle_get_dimensions(rsvg, &dim);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Fsvg.h:9,
                 from PictureImageLoader.c:46:
/usr/include/librsvg-2.0/librsvg/rsvg.h:708:6: note: declared here
  708 | void rsvg_handle_get_dimensions (RsvgHandle *handle, RsvgDimensionData *dimension_data);
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
PictureImageLoader.c:360:9: warning: ‘rsvg_handle_render_cairo’ is deprecated: Use 'rsvg_handle_render_document' instead [-Wdeprecated-declarations]
  360 |         Frsvg_handle_render_cairo(rsvg, cr);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/librsvg-2.0/librsvg/rsvg.h:1452:
/usr/include/librsvg-2.0/librsvg/rsvg-cairo.h:88:10: note: declared here
   88 | gboolean rsvg_handle_render_cairo (RsvgHandle *handle, cairo_t *cr);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~

This will require a little bit of refactoring how fvwm computes SVG sizes.

@somiaj somiaj added the type:bug Something's broken! label Mar 24, 2024
@ThomasAdam ThomasAdam added this to FVWM3 Mar 24, 2024
@github-project-automation github-project-automation bot moved this to To do in FVWM3 Mar 24, 2024
@ThomasAdam
Copy link
Member

Note to self: The SVG version checking will need to be ripped out as well...

@ThomasAdam ThomasAdam changed the title Fsvg.h using depericated calls. Fsvg.h using depricated calls. Mar 30, 2024
@ThomasAdam ThomasAdam changed the title Fsvg.h using depricated calls. Fsvg.h using deprecated calls. Apr 3, 2024
@ThomasAdam ThomasAdam added this to the 1.1.1 milestone Apr 3, 2024
@ThomasAdam ThomasAdam added difficulty:easy Issue is suitable for new fvwm developer difficulty:gfi Issue is suitable for a first-time contributor/developer labels Apr 3, 2024
@ThomasAdam
Copy link
Member

See also this migration guide: https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/doc/migrating.md

@ThomasAdam ThomasAdam self-assigned this Oct 1, 2024
ThomasAdam added a commit that referenced this issue Oct 1, 2024
Certain calls to functions such as rsvg_handle_get_dimensions() and
rsvg_handle_render_cairo() have been deprecated since version 2.52, yet
we've not bothered to keep up to date with the changes to the API.

Change this, but keep backwards compatibility for older librsvg
installations.

Fixes #974
@ThomasAdam ThomasAdam moved this from To do to PRs in FVWM3 Oct 1, 2024
@github-project-automation github-project-automation bot moved this from PRs to Done in FVWM3 Oct 1, 2024
@somiaj
Copy link
Collaborator Author

somiaj commented Oct 1, 2024

Note to self: The SVG version checking will need to be ripped out as well...

I didn't see this in the PR, though not fully sure what version checking you were talking about.

@ThomasAdam
Copy link
Member

Note to self: The SVG version checking will need to be ripped out as well...

I didn't see this in the PR, though not fully sure what version checking you were talking about.

I think that's referring to the abstraction in use around the librsvg API. But that's a much larger change than fixing deprecation warnings.

@ThomasAdam ThomasAdam added type:internal-improvement Issue is an internal improvement (cleanup, etc.) and removed type:bug Something's broken! labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy Issue is suitable for new fvwm developer difficulty:gfi Issue is suitable for a first-time contributor/developer type:internal-improvement Issue is an internal improvement (cleanup, etc.)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants