Current behavior:
$ DISPLAY=foo guile-gnome-2
guile> (use-modules (gnome gtk))
(<unknown>:2018): Gdk-WARNING **: cannot open display:
$
i.e. if the display can't be opened for some reason, trying to load
(gnome gtk) causes the program simply to exit... which I suppose is
correct behavior, but might it be nice to have a way of catching the
error so that a program could, for example, print out a "hey, I can't
open any displays, what should I do" type of message?
diff --git a/gnome/gw/gdk-spec.scm b/gnome/gw/gdk-spec.scm
index b002829..2a53a0d 100644
--- a/gnome/gw/gdk-spec.scm
+++ b/gnome/gw/gdk-spec.scm
@@ -48,7 +48,7 @@
(define-method (initializations-cg (self <gdk-wrapset>) err)
(list (next-method)
- "gdk_init (NULL, NULL);\n"))
+ "if(!gdk_init_check (NULL, NULL))
scm_throw(scm_from_locale_symbol(\"no-display\"), SCM_EOL);\n"))
(define-class <gdk-event-type> (<gobject-classed-pointer-type>))
_______________________________________________
guile-gtk-general mailing list
guile-gtk-general@gnu....
http://lists.gnu.org/mailman/listinfo/guile-gtk-general
opensubscriber is not affiliated with the authors of this message nor responsible for its content.