Re: GTK3 branch?

Detlef Graef <[email protected]> Wed, 29 Dec 2021 13:21:02 +0100
Newsgroups gmane.comp.gnome.apps.pan.devel
Message-ID <[email protected]>
Am 28.12.21 um 21:37 schrieb Petr Kovar:
> On Tue, 28 Dec 2021 19:18:51 +0100
> Detlef Graef <d.graef-ANTagKRnAhcb1SvskN2V4Q-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org> wrote:
> 
>> Hi,
>>
>> maybe it is reasonable to create a branch for GTK3 in the public Pan
>> Gitlab repo.
>>
>> When I build Pan with GTK3 I get a lot of warnings regarding deprecated
>> GTK3 API calls.
>>
>> If I create a merge request regarding GTK3 changes I would like to have
>> it in a own (GTK3) branch. I think by removing deprecated GTK3 API
>> calls, GTK2 builds won't be possible anymore (don't want to have a huge
>> number of #ifdef statements).
>>
>> Any opinions?
> 
> That's certainly doable but note that once you do it you essentially create
> a fork, and then maintaining both versions in parallel will be hard if not
> impossible.
> 
> But as GTK 2 is getting very old though still maintained upstream, we should
> probably do something here. The first and easy step would be to switch GTK
> 3 to default at build time.
> 
> I wonder how many Pan users still require GTK 2 these days?

Yes, you are right it is like a fork, but I think it is reasonable to 
collect some patches/commits for GTK3 in a own branch and then merge it 
when it is stable with the master branch. I get about 600 warnings about 
deprecated declarations.

I don't know what the status of GTK2 is. On www.gtk.org I read:

Latest stable v4.4.1
Latest unstable v4.5.1
Latest old stable v3.24.31

In the download section 2.24.33 the latest release is from 2020-Dec-21:

https://download.gnome.org/sources/gtk%2B/2.24/?C=M&O=A

 From the file: gtk+-2.24.33.news (2020-Dec-21):

Overview of Changes from GTK+ 2.24.32 to 2.24.33
================================================

*********************************************************
*                                                       *
*   This is the final GTK 2.x release.                  *
*   There will be no more updates to GTK 2.             *
*   All users are encouraged to update to GTK 3 or 4.   *
*                                                       *
*********************************************************


The biggest concerns I have are regarding migration from GtkUIManager to 
GtkBuilder.

https://developer-old.gnome.org/gtk3/stable/GtkUIManager.html

"GtkUIManager is deprecated since GTK+ 3.10. To construct user 
interfaces from XML definitions, you should use GtkBuilder, GMenuModel, 
et al. To work with actions, use GAction, GtkActionable et al. These 
newer classes support richer functionality and integration with various 
desktop shells. It should be possible to migrate most/all functionality 
from GtkUIManager."


The worst case would be if deprecated API calls are removed from a 
current GTK3 lib version. I don't know how likely this is.


Detlef