This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: gtk-standalone-main
- To: David Pirotte <david at altosw dot be>
- Subject: Re: gtk-standalone-main
- From: Ariel Rios <ariel at linuxppc dot org>
- Date: 17 Apr 2001 13:01:54 -0400
- Cc: guile-gtk <guile-gtk at sourceware dot cygnus dot com>
- References: <3ADC0CC6.24373634@altosw.be>
El 17 Apr 2001 11:28:38 +0200, David Pirotte escribió:
> I'd like to launch guile (or guile-gtk) 'manually', in order to
> have a listener that remains active while I am working and:
>
> 1. launching a little gtk app in a way that I can still
> type things in the listener from where I launched it
> so I can 'get 'set widgets and learn ...
> (is there another way then: gtk-standalone-main ?)
>
> 2. avoiding that hitting the 'destroy provoques the guile
> listener exit as well: I tried the following:
>
> (gtk-signal-connect window "destroy" gtk-false)
>
> but as the little app is launched with gtk-standalone-main,
> it appears not to be sufficient
In this case, avoid using gtk-standalone-main.
You can do, for eg:
(define window (gtk-window-new 'toplevel))
(define button (gtk-button-new-with-label "Hello"))
(gtk-container-add window button)
(gtk-widget-show-all window)
(gtk-widget-hide-all window)
(gtk-signal-connect button "clicked" (lambda () (gtk-widget-destroy
window))
(gtk-widget-show-all window)
Which enables you to play w/guile-gtk from your guile prompt
ariel