This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gtk-standalone-main


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  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]