[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting up a development environment for guile-g-golf based software
Re: Setting up a development environment for guile-g-golf based software in KDE
Fri, 02 Sep 2022 18:30:23 +0000
On Friday, September 2nd, 2022 at 10:25, Jérémy Korwin-Zmijowski
> Dear Guixters,
> I want to build a GUI for Gnome (using guile-g-golf (and gtk)).
> When under Gnome my small "Hello World" (from the manual example script)
> window shows up.
> When under KDE (Plasma) nothing shows up but errors in the terminal :
In my case (guix 16a6cbe), the example doesn't work at all, regardless of the
desktop environment or whether I use a pure environment or container without
I wonder if g-golf really works with GTK 4 (the guix package depends on gtk+,
which is GTK+ 3)? It's a similar situation with guile-gi...
Also, the "Hello World" example in the documentation is written usin GTK+ API
as far as I can see. For example, it uses GtkWidget.show(), which was removed
in GTK 4, as far as I know, because widgets now show themselves by default.
I see that I can launch the program in a pure environment or container if I add
gtk+ instead gtk. So, given the following program
;; Load Gtk
;; When the application is launched..
(define (activate app)
;; - Create a new window and a new button
(let ((window (make <gtk-application-window>
(button (make <gtk-button>
#:label "Hello, World!")))
;; - Which closes the window when clicked
;; (set-child window button) ; FIXME: Unbound variable: set-child
;; Create a new application
(let ((app (make <gtk-application>
(connect app 'activate activate)
;; Run the application
(run app 0 '()))
I run it as Ricardo indicates
guix shell --pure --no-grafts guile gtk+ guile-g-golf
and it works. Although I see this warning:
(guile:2): dbind-WARNING **: 18:16:30.514: Couldn't connect to accessibility
bus: Failed to connect to socket /tmp/dbus-hqCQ04xgN8: No such file or directory
Anyways, just my 2¢ :)
publickey - email@example.com - 0x12DE1598.asc
Description: OpenPGP digital signature