all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luis Felipe <luis.felipe.la@protonmail.com>
To: "Jérémy Korwin-Zmijowski" <jeremy@korwin-zmijowski.fr>
Cc: Help Guix <help-guix@gnu.org>
Subject: Re: Setting up a development environment for guile-g-golf based software in KDE
Date: Fri, 02 Sep 2022 18:30:23 +0000	[thread overview]
Message-ID: <umyaJjg7j_SZXtHNXQ578zedT5ksp7cGAqfOOevikmT_-jXZtDw2NpeFVeGR7t1VVAqHAKJg26Z6mtxqnqsJU3irWQ_MZpkep-ZfDuu0Q6I=@protonmail.com> (raw)
In-Reply-To: <d09744e0-504f-c8ec-4d61-bb3d3511077b@korwin-zmijowski.fr>


[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]

Hi Jérémy,


On Friday, September 2nd, 2022 at 10:25, Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> wrote:

> 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 grafts.

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
(use-modules (g-golf))
(gi-import "Gtk")

;; When the application is launched..
(define (activate app)
  ;; - Create a new window and a new button
  (let ((window (make <gtk-application-window>
                  #:title "Hello"
                  #:application app))
        (button (make <gtk-button>
                  #:label "Hello, World!")))
    ;; - Which closes the window when clicked
    (connect button
             'clicked
             (lambda (b)
               (close window)))
    ;; (set-child window button)  ; FIXME: Unbound variable: set-child
    (show window)))

;; Create a new application
(let ((app (make <gtk-application>
             #:application-id "org.example.GtkApplication")))
  (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¢ :)

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

  parent reply	other threads:[~2022-09-02 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 10:25 Setting up a development environment for guile-g-golf based software in KDE Jérémy Korwin-Zmijowski
2022-09-02 11:36 ` Ricardo Wurmus
2022-09-02 20:08   ` Jérémy Korwin-Zmijowski
2022-09-02 18:30 ` Luis Felipe [this message]
2022-09-03  1:13   ` Luis Felipe
2022-09-03 10:29     ` Ricardo Wurmus
2022-09-03 20:24       ` Luis Felipe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='umyaJjg7j_SZXtHNXQ578zedT5ksp7cGAqfOOevikmT_-jXZtDw2NpeFVeGR7t1VVAqHAKJg26Z6mtxqnqsJU3irWQ_MZpkep-ZfDuu0Q6I=@protonmail.com' \
    --to=luis.felipe.la@protonmail.com \
    --cc=help-guix@gnu.org \
    --cc=jeremy@korwin-zmijowski.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.