diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-09-28 21:56:46 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-10-04 22:48:42 +0200 |
commit | 668aa5736b2709e15e3ea14381e010c8646a4c38 (patch) | |
tree | 32d30ec4af73d3cc6acf9ebba0745bec33697627 /src/scm/webid-oidc/client/gui.scm | |
parent | 316cddd43a7c04f994bf405035b65b3881fbd531 (diff) |
gui: Add a client widget
Diffstat (limited to 'src/scm/webid-oidc/client/gui.scm')
-rw-r--r-- | src/scm/webid-oidc/client/gui.scm | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/scm/webid-oidc/client/gui.scm b/src/scm/webid-oidc/client/gui.scm index 45910e3..be557bd 100644 --- a/src/scm/webid-oidc/client/gui.scm +++ b/src/scm/webid-oidc/client/gui.scm @@ -36,6 +36,7 @@ #:use-module (webid-oidc client) #:use-module (webid-oidc client accounts) #:use-module ((webid-oidc client gui settings) #:prefix settings:) + #:use-module ((webid-oidc client gui application) #:prefix app:) #:use-module (web uri) #:use-module (web response) #:use-module (rnrs bytevectors) @@ -57,27 +58,13 @@ (add-hook! settings:client-changed-hook (lambda (client) - (format #t (G_ "The client changed: it is now ~a.\n") client))) + (format #t (G_ "The client changed: it is now ~a.\n") client) + ((@ (webid-oidc client) client) client))) (add-hook! settings:accounts-changed-hook (lambda (main other) (format #t (G_ "The accounts changed: the main account is ~a, and the others are ~a.\n") main other))) -(define (print-hello button) - (format #t (G_ "Hello, world!\n"))) - -(define (on-activate application) - (let ((window (make <GtkApplicationWindow> - #:application application)) - (button (make <GtkButton> #:label (G_ "Hello, world!")))) - (connect button clicked print-hello) - (add window button) - (show-all window))) - (define (main) - (let ((app (application:new - "eu.planete_kraus.Disfluid" - (list->application-flags '(flags-none))))) - (connect app activate on-activate) - (run app (command-line)))) + (run app:application (command-line))) |