[GPA] Port to GTK3 (Work in progress)

Andreas Ronnquist gusnan at librem.one
Sun Nov 6 02:12:08 CET 2022

On Sun, 30 Oct 2022 21:56:34 +0100
Andreas Ronnquist via Gnupg-devel <gnupg-devel at gnupg.org> wrote:

>On Tue, 25 Oct 2022 17:23:09 +0200
>Bernhard Reiter <bernhard at intevation.de> wrote:
>>Am Dienstag 25 Oktober 2022 12:03:11 schrieb Andreas Rönnquist via 
>>> I have managed to build GPA against GTK3 - is there any interest at all,
>>> or is GPA completely dead?    
>>Thanks for making your work public!
>>I believe Werner also had part of an GTK3 port in the work (but not entirely 
>>ready). Focus has shifted away a bit from GPA, it is a component
>>that is in need of a maintainer. 
>>The question is if there is enough interest and people are willing to
>>help to develop and maintain GPA. 
>>In how far could you help with this and e.g. the GTK3 port?
>I would love to be able to keep it maintained, but I don't want to do
>it on my own, more eyes equals better code, of course.
>I have managed now to not only build on GTK3, but I have also began to
>do actual required migration from GTK2 technologies to GTK3 ones -
>which would of course make it easier to an eventual upcoming GTK4
>It looks like the first thing is to make it GtkApplication-based (which
>I have managed to do), and then in it's turn migrate the menus to
>GtkBuilder-based items.
>I would love some eyes on my code in the git repository, and would
>gladly accept merge requests there, both to further the conversion, but
>also if someone has better solutions to the changes I have done, I
>would also accept those.

Alright, I have hacked away and continued the GTK3 conversion - It was
way more work than I anticipated, but an initial version is buildable
(Nowhere near release quality yet though). 

It is not finished, but it is good enough to get an impression of what
a GTK3 version would look like.

I have moved the images from the pixmaps folder to the src folder, and
include them in a gresource file. (This is the modern way to build
resources to C code, so you don't have to load it from disk by hand and
have the resources loaded from file on program start, they are included
in the compiled binary - it's the more modern way of what was done with
xpm images, and can include all resources, not just images).

All menus and toolbars needed to be converted to this new way, and
menus in GTK3 cannot contain images, so that is a change. Toolbars can,
and I have used toolbars, but the toolbar widget is being removed in
GTK4, and should be replaced with a GtkBox with the proper layout and
settings. I have stayed with the standard GtkToolbar for now.

I think I have changed the places needed, but I haven't fully connected
all signals yet, and there are surely places where I have done mistakes
or simply not come to yet, there is still more work to be done, but you can
build and test the program with your current GTK3 theme. (One theme I
have tested I didn't get separators in the toolbar, but that is
theme-specific, using the Elementary theme all looks really nice).

All can be found at https://github.com/gusnan/gpa , and
pull-requests and suggestions would be greatly appreciated.

/Andreas Rönnquist
gusnan at librem.one

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signatur
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20221106/388c1ef4/attachment.sig>

More information about the Gnupg-devel mailing list