]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-gnome.scm
* The grand 2005-2006 replace.
[lilypond.git] / scm / framework-gnome.scm
index 2eb9eae400f949acd15cdb560fa4a7e5022bddc0..f66c6bfd314eec1b4b7f3a6b052f7ef7341d7fbc 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2004--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2004--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;;;; See output-gnome.scm for usage information.
 
 (define OUTPUT-SCALE (* 2.5 PIXELS-PER-UNIT))
 (define-public output-scale OUTPUT-SCALE)
 
-(define (stderr string . rest)
-  (apply format (cons (current-error-port) (cons string rest)))
-  (force-output (current-error-port)))
-
 (define (debugf string . rest)
   (if #f
       (apply stderr (cons string rest))))
        (add (scrolled go) (canvas go))
        (show (canvas go)))))
 
-(define x-editor #f)
-(define (get-x-editor)
-  (if (not x-editor)
-      (set! x-editor (getenv "XEDITOR")))
-  x-editor)
-
 (define ifs #f)
 (define (get-ifs)
   (if (not ifs)
 (define (spawn-editor location)
   (let* ((file-name (car location))
         (line (cadr location))
-        (column (caddr location))
-        (template (substring (get-x-editor) 0))
-        
-        ;; Adhere to %l %c %f?
-        (command
-         (regexp-substitute/global
-          #f "%l" (regexp-substitute/global
-                   #f "%c"
-                   (regexp-substitute/global
-                    #f "%f" template 'pre file-name 'post)
-                   'pre (number->string column)
-                   'post)
-          'pre (number->string line) 'post)))
-    
+        (char (caddr location))
+        (column (cadddr location))
+        (command (get-editor-command file line char column)))
     (debugf "spawning: ~s\n" command)
     (if (= (primitive-fork) 0)
        (let ((command-list (string-split command #\ )));; (get-ifs))))
                (ly:input-location music-origin)
                #f)))
 
+;; todo: how to integrate nicely?
+;(define-public (tweak-grob-property grob sym val)
+;  (set! (ly:grob-property grob sym) val))
+
 
 (define-method (tweak (go <gnome-outputter>) item offset)
   (let* ((grob (hashq-ref (item-grobs go) item #f))