tl;dr : https://github.com/salamandar/asunder
I ported Asunder to GTK3 tonight. Works fine.
I tried to port to gtk4, but the documentation is not really complete.
Oh, and I also removed Autotools on the way to use Meson.
Sorry for taking so long to get to this.
I've no experience with the latest Gnome development stuff, last time I did a GTK3 port I was still using make.
All that to explain that perhaps you shouldn't be surprised that I was unable to build your port.
I installed meson and tried it, but got this output:
asunder-gtk3$ meson builddir
The Meson build system
Source dir: /home/andrew/data/prog/asunder-gtk3
Build dir: /home/andrew/data/prog/asunder-gtk3/builddir
Build type: native build
Project name: asunder
Native C compiler: cc (gcc 7.4.0 "cc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency gtk+-3.0 found: YES 3.22.30
Native dependency gthread-2.0 found: YES 2.56.4
Native dependency libcddb found: YES 1.3.2
meson.build:22:0: ERROR: Division works only with integers.
There's a / on line 22 but I don't know how to debug this.
I was hoping to see once I built it that the GTK3 problems I ran into previously were solved (in GTK3). The Gnome people were very dismissive of those bugs when I reported them.
I was using a syntax introduced in meson 0.49, where you can concatenate paths with /.
I removed them so that you can use your meson 0.45.
You can git pull and retry ;)
Oh boy. That's a lot of warnings :)
I guess they've deprecated gthread and everything that went with it? What are the chances that they'll actually remove it?
Are all the (void)varname; statements there just to shut up compiler warnings?
The UI seems to mostly work. I'm glad they sort-of-almost fixed the About dialog. I don't know why the underscores show up in the buttons, that's supposed to be handled by gettext. Just need to figure our the alignment and spacing in the main window. I guess the grid isn't exactly the same as a table?
Most of the changes don't look too scary, despite the size of the patch. They're going to take some effort to review and merge (especially with all those whitespace-only-change lines), but it's doable.
I'm not completely sold on GTK3, it's still not clear to me what the benefit is, other than a more modern theme. Though I guess eventually GTK2 will look about as good as Motif on a new installation :)
I wish it were possible to allow Asunder to build against either GTK2 or GTK3, but sadly the Gnome people deprecated a few things in GTK3 just to be annoying, making that practically impossible.
What do you think? What inspired you to make the port in the first place?
Yeah, they deprecated the "mutex-like" thing.
Some explanations are available here :
"The recommendation appears to be that we use gdk_threads_add_idle() on all secondary threads."
That will be somehow simple to implement when the code is only modifications of the interface. But for any "return calls" to the interface (getters and confirmation popups), I don't really know how it's supposed to be done.
Letting the choice between gtk2 and gtk3 would be just really difficult to do. Using one or the other has implications on the structure of the code. And as gtk2 is deprecated for some time now, gtk3 is a more solid library, for instance for themes support (yeah, i know, that's not a great argument).
About those space-only diffs, I'm gonna rebase and add a commit with all those space-only changes.