Why still depending on deprecated GTK2

Discuss new features and functions
Posts: 4
Joined: 20 Jun 2020

medmedin2014

Today I run into a problem of GTK 2 dark theme on Plasma KDE 5.20.4 and after reporting the bug I got replied that GTK2 is deprecated and the app developer should upgrade their GTK library to 3 or 4. So why GTK2 is still used by FreeFileSync if it's dead ?

Operating System: Manjaro Linux
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Kernel Version: 5.4.80-2-MANJARO
OS Type: 64-bit
Posts: 4
Joined: 20 Jun 2020

medmedin2014

I know updating to new GUI library is time consuming, but for now I think the transition should be done because GTK2 is no longer maintained for many years and most Linux distributions will remove support for it, so the app will face some serious problems concerning building, running and compatibility with themes.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

No, the issue as explained in the link is not time at all.
Posts: 309
Joined: 7 Jan 2018

bgstack15

I have been compiling FreeFileSync for Devuan and Fedora with GTK3 for a few months now, and I've had success. I'm very loose with my requirements for what widgets look like though, but I don't think that FreeFileSync looks sloppy with gtk3.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

GTK3, unlike GTK2, fails to properly update control sizes after a layout change (e.g. different font size). (Tested on CentOS 7). As a consequence all kinds of texts will be cut off (or sometimes not: GTK3's layout updating seems unpredictable).
Attachments
gtk3-glitch.PNG
gtk3-glitch.PNG (6.88 KiB) Viewed 2136 times
Posts: 4
Joined: 20 Jun 2020

medmedin2014

I worked with Java and C# and they both have layout managers/containers to manage GUI components and change their sizes according to parent containers properties and type. I don't think that GTK3 doesn't have this kind of components ?
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

GTK+ 3.5.1 is most likely the culprit:
https://github.com/GNOME/gtk/blob/e2afb59a0b84b13c59216379b10e08c43398d82f/NEWS#L7798
Theming:
- Optimizations to style invalidation
GTK layouts are updated only for *visible* windows. This means the common idiom of creating a window hidden, arranging its elements, and then showing it all at once is broken with GTK >= 3.5.
Posts: 309
Joined: 7 Jan 2018

bgstack15

Well, most users have very low opinions of the GTK team. Maybe for fun you could implement FreeFileSync in QT?! I'm sure that's a ton of work though.
Posts: 4
Joined: 23 Oct 2022

reckor

I know this is an old thread, but now that I'm going to compile it for Gentoo, I wanted to check if there is any update on this matter?
Posts: 309
Joined: 7 Jan 2018

bgstack15

FreeFileSync 11.0 introduced support for GTK+3 per the Archive page.

The discussion about manual compilation from source links to various build recipes that make references to which version of GTK+ they use to compile the application.

On that note, Zenju, please don't migrate to GTK 4 or 40 or whatever they call it now!
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

Start supporting GTK3
I should have worded that differently. It sounds as if GTK3 was supported by FFS, but it's not. This were merely first steps towards a support.
Last time I checked all dialog layouts with GTK3 were broken and there was no apparent way with wxWidgets to fix them.

In general FFS will always follow wxWidgets with regards to the GUI framework, and GTK2 is still the latest GTK version there that is not broken.
Posts: 309
Joined: 7 Jan 2018

bgstack15

Wow, I thought wxWidgets 3.2 dropped gtk2. At least the Debian package suggests that they only bother to compile wxWidgets 3.2 against gtk3.
$ dpkg -l | grep wx | grep 3
ii  libwxbase3.0-0v5:amd64               3.0.5.1+dfsg-5                      amd64        wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
ii  libwxbase3.2-0:amd64                 3.2.1+dfsg-1                        amd64        wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
ii  libwxgtk3.0-gtk3-0v5:amd64           3.0.5.1+dfsg-5                      amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK 3 runtime)
ii  libwxgtk3.2-0:amd64                  3.2.1+dfsg-1                        amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK 3 runtime)
ii  libwxgtk3.2-dev:amd64                3.2.1+dfsg-1                        amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK 3 development)
ii  wx-common                            3.2.1+dfsg-1                        amd64        wxWidgets Cross-platform C++ GUI toolkit (common support files)
ii  wx3.2-headers                        3.2.1+dfsg-1                        all          wxWidgets Cross-platform C++ GUI toolkit (header files)