This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: gtk-standalone-main
- To: Ariel Rios <ariel at linuxppc dot org>
- Subject: Re: gtk-standalone-main
- From: David Pirotte <david at altosw dot be>
- Date: Wed, 18 Apr 2001 18:12:12 +0200
- CC: rm at mamma dot varadinet dot de, guile-gtk at sourceware dot cygnus dot com
- Organization: Alto Sotware (http://www.altosw.be)
- References: <3ADC0CC6.24373634@altosw.be> <987526914.1339.1.camel@soleil> <20010417225733.A20322@mail.aura.de> <987561319.1538.6.camel@soleil>
Ariel Rios wrote:
>
> El 17 Apr 2001 22:57:33 +0200, rm@mamma.varadinet.de escribió:
> > On Tue, Apr 17, 2001 at 01:01:54PM -0400, Ariel Rios wrote:
>
> > Not on my system, unfortunately ;-(
> > The call to gtk-widget-show-all will return 1 but
> > no widget apears on the screen. Only after the call
> > to gtk-standalone-main does the widget show.
> Which is your platform, guile-gtk and guile's version?
I had exactly the same problem and I was going to post a message, as I now
understand why I was unabble to discover by myself the solution Ariel proposed
I think there is a little difference between launching guile and loading the
module gtk or launching guile-gtk. here is an example of what happens on my
machine:
1. ;; first launching guile-gtk
david@faust:~/alto/projects/guile/tactus 95 $ guile-gtk
gtk> (use-modules (alto test))
gtk> (test-gui)
gtk>
==> ;; the window is realized and comes to the display normally
2. ;; launching guile
david@faust:~/alto/projects/guile/tactus 93 $ guile
guile> (use-modules (alto test))
guile> (test-gui)
==> ;; nothing happens, until I exit guile
guile> (exit)
==> ;; the window is realized but of course only remains a fraction
;; of a second on the screen
hope it helps
david
;; assuming the module (alto test) contains the following
(define-module (alto test)
;; from distribution
;; :use-module (database postgres)
;; :use-module (ice-9 format)
:use-module (gtk gtk)
;; from alto
;; :use-module (alto gtk-utils)
)
(export test-gui)
(define (test-gui)
(let ((window (gtk-window-new 'toplevel))
(button (gtk-button-new-with-label "Hello")))
(gtk-container-add window button)
(gtk-signal-connect button "clicked"
(lambda () (gtk-widget-destroy window)))
(gtk-widget-show-all window)
))