Skip to content

Avoid CSS-related deprecation warnings: complement

This MR completes !28 (merged), where I was too cursory regarding font management: font style and weight were ignored, which wasn't the case before. To fix that, I copied and slightly modified a little function from Gedit source code: gedit_pango_font_description_to_css() (and I had to add a line to mousepad/Makefile.am, to be able to use the mathematical library: I hope I did it correctly…)

In !28 (merged), I had also forgotten two "hidden" deprecations, surrounded by # pragma GCC diagnostic *, which were actually code that had since become inactive. I removed the part in mousepad/mousepad-search-bar.c which is now useless as far as I can see, and I replaced the part in mousepad/mousepad-window.c.

In this last case, I kept hardcoded colors, for lack of a better alternative: this was already discussed in !28 (comment 16119) and #63 (closed). But at least it works again now, and the user is better informed when using Mousepad with the root account. I tested with themes Adwaita and Greybird and it seems ok.

Finally, I replaced all the other # pragma GCC diagnostic * with the more general G_GNUC_BEGIN_IGNORE_DEPRECATIONS. They are all surrounded by a #if *CHECK_VERSION … #endif now, so they may be less likely to be forgotten in the future, and in any case it will be less serious, since they will all have a replacement with the dependency update.

Merge request reports