From: Matt Birkholz Date: Sun, 7 Apr 2013 21:14:01 +0000 (-0700) Subject: gtk: Only warn if DISPLAY not set. X-Git-Tag: mit-scheme-pucked-9.2.12~518 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8a94499e075ed2559307f0545142970e9d720203;p=mit-scheme.git gtk: Only warn if DISPLAY not set. Some of the Gtk libraries are useful without a DISPLAY. --- diff --git a/src/gtk/main.scm b/src/gtk/main.scm index 21165d9fb..dd494175a 100644 --- a/src/gtk/main.scm +++ b/src/gtk/main.scm @@ -44,16 +44,14 @@ USA. line) (list->vector val))))))))) - (define (start-gtk name args) - (if (let ((s (get-environment-variable "DISPLAY"))) - (and (string? s) (not (string-null? s)))) - (let ((path (system-library-pathname "gtk-shim.so" #f))) - (if path - (if (file-loadable? path) - (start-gtk* name args) - (error "Gtk shim not loadable.")) - (error "No Gtk shim"))) - (error "DISPLAY not set"))) +(define (start-gtk name args) + (if (let ((path (system-library-pathname "gtk-shim.so" #f))) + (and path (file-loadable? path))) + (if (let ((s (get-environment-variable "DISPLAY"))) + (and (string? s) (not (string-null? s)))) + (start-gtk* name args) + (warn "DISPLAY not set")) + (error "Gtk shim not loadable."))) (define (start-gtk* name args) ;; Call start_gtk. Signals an error if gtk_init_check returns 0.