bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
3.86k stars 224 forks source link

Stop using deprecated `GdkPixbuf.from_xpm_data` #1035

Closed tleedjarv closed 1 month ago

tleedjarv commented 1 month ago

Re #1033 #1034

Since the XPM format is so simple, the function to parse (subset of) XPM used for the icons is trivial. This approach does not require external resources (like image files or loader plugins) nor embedding binary-format icons in the source.

Working but not heavily tested.

gdt commented 1 month ago

I would really like to see someone review and test. We just had a release, and I am going to try not to merge anything for a bit until the release and the gdk-pixbuf-is-unstable kerfluffle settle out a bit.

ithod commented 1 month ago

On openSUSE Tumbleweed I get the following error, i.e. the UI cannot be shown any more: Uncaught exception (please report a bug): Gpointer.Null Raised by primitive operation at Uigtk3.Private.createToplevelWindow.buildPixmap in file "/home/abuild/rpmbuild/BUILD/unison-2.53.5/src/uigtk3.ml" (inlined), line 3296, characters 4-29 Called from Uigtk3.Private.createToplevelWindow in file "/home/abuild/rpmbuild/BUILD/unison-2.53.5/src/uigtk3.ml", line 3300, characters 17-44 Called from Uigtk3.Private.start in file "/home/abuild/rpmbuild/BUILD/unison-2.53.5/src/uigtk3.ml", line 4489, characters 19-42

From https://build.opensuse.org/project/show/Archiving:unison

gdt commented 1 month ago

Are you testing the branch in this PR, or an artifact built by CI from this branch? It is known that a release build of unison with a buggy gdk-pixbuf (as contained in openSUSE) does not work.

tleedjarv commented 1 month ago

@ithod I'm pretty certain that https://build.opensuse.org/project/show/Archiving:unison does not contain the patch from this PR. This makes your comment a duplicate of #1033.

ithod commented 1 month ago

I would really like to see someone review and test. We just had a release, and I am going to try not to merge anything for a bit until the release and the gdk-pixbuf-is-unstable kerfluffle settle out a bit.

Sorry for my unclear message, indeed the error occurs if the patch is not applied. I wanted to make clear that this patch solves the error given above. When I apply the patch (the 1st, not sure what src/dune is), it works for me https://build.opensuse.org/package/show/home:ithod:updated/unison

tleedjarv commented 1 month ago

Thank you @ithod.

the patch (the 1st, not sure what src/dune is)

The 1st is the real patch, yes. The other one is only needed when building with dune (and not make).

gdt commented 1 month ago

We've had one test report, and enough time that anybody that wanted to test has had a chance.