[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU G-Golf 0.8.0-rc6 available for testing
From: |
pelzflorian (Florian Pelz) |
Subject: |
Re: GNU G-Golf 0.8.0-rc6 available for testing |
Date: |
Fri, 20 Sep 2024 15:08:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
David Pirotte <david@altosw.be> writes:
> Excellent! Note that you'll need to update your configuration and
> use/grab 0.8.0-rc7 - which fixes a 'missing some distributed files',
> necessary to be able to run the newly added
>
> examples/gtk-4/layout-manager.scm
> [ a g-golf port of the upstream gtk4-demo layout manager
> [ (transition) example
I see, but since Guix builds G-Golf from git rather than a tarball,
examples/gtk-4/layout-manager.scm had worked already with rc6.
Tarballs contain bundled M4 files and other build-aux files. Guix
rather uses its own packaged version of these, avoiding something like
the xz vulnerability’s code injection. Still it is good that you fixed
the tarball.
>> Now I can embed GTK programs within the Guix Home
>> configurations ...
>
> I am glad that you (finally) can happily use the distro of your dream.
> Your config example certainly should help other guixers willing to use
> g-golf.
:)
>> All that is left is that I do not understand why
>> (gdk-display-get-default) returns #f in G-Golf but
>> gdk_display_get_default () in C returns 0x1c0e36c0.
>
> You need to have initialized either Gtk or Adw, otherwise it returns #f
> (as expected).
>
> scheme@(guile-user)> ,use (g-golf)
> scheme@(guile-user)> (gi-import-by-name "Gdk" "Display")
> $5 = #<<gobject-class> <gdk-display> 7fee0e488c30>
>
> scheme@(guile-user)> (gdk-display-get-default)
> $6 = #f
>
> scheme@(guile-user)> (gi-import-by-name "Gtk" "init")
> $7 = #<<function> 7fee075cb480>
> scheme@(guile-user)> (gtk-init)
>
> scheme@(guile-user)> (gdk-display-get-default)
> $8 = #<<gdk-wayland-display> 7fee0f054a10>
>
> David
This helped. When manually run, missing gtk-init import and use was the
issue; thank you! Funny enough, when auto-started, gtk-init is run by
GtkApplication or perhaps by some library constructor, but I also had
forgotten to actually call add-css-class. Still I added gtk-init, so I
can manually run my launcher as well.
In case others use it as reference, the fixed version is attached.
Regards,
Florian
home-configuration.scm
Description: Text document