Recent

Author Topic: GTK2 is now EOL :(  (Read 1430 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1279
  • Former Delphi 1-7, 10.2 User
GTK2 is now EOL :(
« on: January 12, 2021, 01:23:10 pm »
Quote
GTK 4 is now stable, and we consider it ready for consumption. That does not mean GTK 3 is dead – we will continue to support and update it for the foreseeable future (the latest release, 3.24.24, quietly went out a few days ago). It does mean, however, that GTK 2 has reached the end of its life. We will do one final 2.x release in the coming days, and we encourage everybody to port their GTK 2 applications to GTK 3 or 4.

Source: https://blog.gtk.org/2020/12/16/gtk-4-0/
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9085
  • FPC developer.
Re: GTK2 is now EOL :(
« Reply #1 on: January 12, 2021, 01:58:00 pm »
The question is if GTK3 is really ready.

Both stability, and design suitability to use it as a backend (as opposed to implementing native GUIs in GTK3).


PascalDragon

  • Hero Member
  • *****
  • Posts: 2748
  • Compiler Developer
Re: GTK2 is now EOL :(
« Reply #2 on: January 13, 2021, 08:54:40 am »
The question is if GTK3 is really ready.

Considering that the devs are now concentrating on GTK4, GTK3 should be rather stable in terms of API changes. And for example GIMP is working on moving over as well.

Both stability, and design suitability to use it as a backend (as opposed to implementing native GUIs in GTK3).

There have been some improvements for GTK3 support in the LCL this past year so maybe one should try that and report bugs then...

dbannon

  • Hero Member
  • *****
  • Posts: 1294
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK2 is now EOL :(
« Reply #3 on: January 13, 2021, 09:08:50 am »
Might require you to define EOL ?

It works as well today as it did yesterday.  It will be shipped with most major distros for some time (putting aside that short term Ubuntu that did ship without it a few releases ago).  Debian Bullseye, the next release, and Ubuntu 20.04, due in April, both appear to have GTK2 at this stage. At some point in time, end users will need to install their own GTK2, ~200Meg, but even thats not too hard.

But I am focusing on Qt5 ....

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 923
Re: GTK2 is now EOL :(
« Reply #4 on: January 13, 2021, 10:18:30 am »
hello,
on Ubuntu 20.04 LTS i have a project for image processing. When i use gtk2 as LCL widgetset i have some error messages at run time :
Quote
~/Lazarus/Projets/Test_Jipete$ ./project1 titre 2
Gtk-Message: 13:32:49.621: Failed to load module "canberra-gtk-module"

(project1:3993): GLib-GObject-WARNING **: 13:32:51.031: ../../../gobject/gsignal.c:1282: no emission of signal "key-release-event" to stop for instance '0x2628350'
~/Lazarus/Projets/Test_Jipete$
but the program works.  With gtk3 no error messages and the program works. I am not sure in Lazarus  that gtk3 is ready for all the components ? is it true?   QT5 seems to be a good alternative and multiplateform.

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

dbannon

  • Hero Member
  • *****
  • Posts: 1294
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK2 is now EOL :(
« Reply #5 on: January 13, 2021, 10:39:35 am »
Gtk-Message: 13:32:49.621: Failed to load module "canberra-gtk-module"

It has been doing that since I started my project. I spent some time trying to find why it was being asked for but failed. So, just to stop the message, I added canberra-gtk-module to my dependency list.  I suspect there is a (gtk2) library that is asking for it (but does not need it) and it has accidentally been left of that GTK2 library's own dependency list.

Have not seen the "key-release-event" issue.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

devEric69

  • Sr. Member
  • ****
  • Posts: 433
Re: GTK2 is now EOL :(
« Reply #6 on: January 13, 2021, 12:31:35 pm »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

PascalDragon

  • Hero Member
  • *****
  • Posts: 2748
  • Compiler Developer
Re: GTK2 is now EOL :(
« Reply #7 on: January 13, 2021, 01:28:37 pm »
Might require you to define EOL ?

It means that it won't receive any more fixes at all and that one should migrate to a different widgetset (be it GTK3 or Qt) as sooner or later distributions will stop distributing it by default. I personally think twice as well when for example an application requires e.g. Qt4 which would mean that Qt4 would have to be build from source on my ArchLinux (due to this I recently removed the last Qt4 applications I had to get rid of this need). For GTK2 that will become the same in the future.

With gtk3 no error messages and the program works. I am not sure in Lazarus  that gtk3 is ready for all the components ? is it true?

Just test it and if it doesn't work as expected, report bugs for it. That's the most important way that the interface will get ready for prime time.

circular

  • Hero Member
  • *****
  • Posts: 3666
    • Personal webpage
Re: GTK2 is now EOL :(
« Reply #8 on: January 16, 2021, 12:28:20 pm »
If there is some progress on that, I would be glad to hear about it. LazPaint has been accepted on Debian with Gtk2 + Qt5 versions of the package, but obviously it would be better to provide with Gtk3 or Gtk4.

Using Qt5 works to some extent but not for everything, for example topmost windows are not topmost. The hack I found is to use fsDialog which actually stays on top, but is not sizable.

Conscience is the debugger of the mind

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9085
  • FPC developer.
Re: GTK2 is now EOL :(
« Reply #9 on: January 16, 2021, 02:49:16 pm »
The question is if GTK3 is really ready.

Considering that the devs are now concentrating on GTK4, GTK3 should be rather stable in terms of API changes. And for example GIMP is working on moving over as well.

GIMP does not use GTK as backend for existing gui philosophy. It re architects the existing GUI code to GTK3. And one of the core advantages of Lazarus is not having that kind of breaks.


Quote
Both stability, and design suitability to use it as a backend (as opposed to implementing native GUIs in GTK3).

There have been some improvements for GTK3 support in the LCL this past year so maybe one should try that and report bugs then...

There also has been a new major release of Wine. If I have excess time for *nix GUI, I think my efforts go there.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 923
Re: GTK2 is now EOL :(
« Reply #10 on: January 17, 2021, 01:36:46 am »
hello,
I am not sure in Lazarus  that gtk3 is ready for all the components ? is it true?   QT5 seems to be a good alternative and multiplateform.
i have tried to compile some projects on Ubuntu 20.04 with LCLWidgetType gtk3  :   often SIGSEGV error when running program   :(   
for example :
with comdialogs.lpi project  in Lazarus/examples folder :  SIGSEGV error when trying to open save dialog.
with my project image_mushrooms in Lazarus/examples/database/images_mushrooms when i open the report i can't scroll the pages with the mouse and when i try to scroll with mouse wheel i have a SIGSEGV error.  And bitbtn button not working at runtime : no image and & character (shortcut ?) see attachment.
and the worst :
with listview.lpi project in Lazarus/examples/listview folder : if i click on the combobox3 (sortType)  total freeze of the Desktop , SIGSEGV error and mouse click doesn't work anymore. I must switch on another virtual terminal (with ctrl alt F3 for example) login and kill lazarus.
i don't begin to do bug reports because if there is too many bugs, i don't  want to spend my time to do bug reports and  for the moment  i don't use gtk3.
Friendly, J.P
« Last Edit: January 17, 2021, 02:23:16 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

zeljko

  • Hero Member
  • *****
  • Posts: 1156
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: GTK2 is now EOL :(
« Reply #11 on: January 17, 2021, 02:45:18 pm »
If there is some progress on that, I would be glad to hear about it. LazPaint has been accepted on Debian with Gtk2 + Qt5 versions of the package, but obviously it would be better to provide with Gtk3 or Gtk4.

Using Qt5 works to some extent but not for everything, for example topmost windows are not topmost. The hack I found is to use fsDialog which actually stays on top, but is not sizable.

IMO, it depends on window manager. Why don't you use fsStayOnTop ?

ChrisR

  • Full Member
  • ***
  • Posts: 187
Re: GTK2 is now EOL :(
« Reply #12 on: January 17, 2021, 05:13:18 pm »
For me, the deal breaker is that GTK3 and GTK4 do not support OpenGL multi-sampling
  https://gitlab.gnome.org/GNOME/gtk/-/issues/2616#
This is a major regression from GTK2. Fortunately, Lazarus support for QT5 has improved dramatically, so I have switched to QT5 for my programs. For OpenGL tools, GTK3 and GTK4 are not viable. Thanks to the Lazarus team that made my GTK2 -> QT5 transition so smooth.
 

 

TinyPortal © 2005-2018