From 8a94499e075ed2559307f0545142970e9d720203 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 7 Apr 2013 14:14:01 -0700 Subject: [PATCH] gtk: Only warn if DISPLAY not set. Some of the Gtk libraries are useful without a DISPLAY. --- src/gtk/main.scm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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. -- 2.25.1