]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/lily.scm (running-from-gui?): Darwin never runs from GUI.
authorhanwen <hanwen>
Tue, 17 May 2005 12:00:20 +0000 (12:00 +0000)
committerhanwen <hanwen>
Tue, 17 May 2005 12:00:20 +0000 (12:00 +0000)
* lily/font-config.cc (init_fontconfig): add warning about cache.

ChangeLog
lily/font-config.cc
scm/lily.scm

index 927ed21c39fb43e180277fb6e7901f6344c8a2f8..2c09fedc70c688248f2a0f269e9108b17fb1b0a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-17  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/lily.scm (running-from-gui?): Darwin never runs from GUI.
+
+       * lily/font-config.cc (init_fontconfig): add warning about cache.
+
 2005-05-16  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * lily/main.cc (setup_paths)[ARGV0_RELOCATION]: 
index d74dec9691aa8a7713702fca7692bbb14a5f1ba7..8a2303d52d1f12171023fc5568b53655c81b1b39 100644 (file)
@@ -26,6 +26,13 @@ init_fontconfig ()
     error (_ ("initializing FontConfig"));
 
   FcConfig *fcc = FcConfigGetCurrent ();
+
+  FcChar8 *cache = FcConfigGetCache (fcc);
+  if (!FcDirCacheValid (cache))
+    {
+      warning (_ ("FontConfig cache out of date. Rebuilding may take some time."));
+    }
+  
   Array<String> dirs;
   struct stat statbuf; 
   String builddir = prefix_directory + "/mf/out/";
index 160fdd173b20ff9265a562b8c8c5766675788419..a4ba292859ef74ef29c8eb99e6e27b05e6eb3ac9 100644 (file)
@@ -375,10 +375,15 @@ The syntax is the same as `define*-public'."
 
 (define (running-from-gui?)
   (let ((have-tty? (isatty? (current-input-port))))
+    
     ;; If no TTY and not using safe, assume running from GUI.
     ;; For mingw, the test must be inverted.
-    (if (eq? PLATFORM 'windows)
-       have-tty? (not have-tty?))))
+
+    (cond
+     ((eq? PLATFORM 'windows) have-tty?)
+     ((eq? PLATFORM 'Darwin) #f)
+     (else
+      (not have-tty?)))))
 
 (define-public (gui-main files)
   (if (null? files) (gui-no-files-handler))