~ubuntu-branches/ubuntu/saucy/texmacs/saucy-proposed

« back to all changes in this revision

Viewing changes to TeXmacs/progs/remote/tmfs-menu.scm

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA
  • Date: 2011-04-04 13:58:09 UTC
  • mfrom: (4.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110404135809-6f6jvotefb694vgp
Tags: 1:1.0.7.10-1
* New Upstream Release.
* Added gostscript to Build-Depends.  (Closes: #582228)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
(define (std-property-types)
22
22
  '(owner type date read write classify-type classify-value project))
23
23
 
24
 
(define (remote-set-property-menu-entry type)
25
 
  (list (upcase-first type)
26
 
        (lambda () (interactive-remote-set-property type))))
27
 
 
28
 
(tm-define (remote-set-property-menu)
 
24
(tm-menu (remote-set-property-menu)
29
25
  (let* ((l1 (or (remote-get-property-types) '()))
30
26
         (l2 (list-difference l1 (std-property-types)))
31
27
         (l3 (list-sort (map symbol->string l2) string<=?)))
32
 
    (menu-dynamic
33
 
      ,@(map remote-set-property-menu-entry l3)
34
 
      ---
35
 
      ("Other" (interactive-remote-set-property-and-value)))))
 
28
    (for (type l3)
 
29
      ((eval (upcase-first type))
 
30
       (interactive-remote-set-property type)))
 
31
    ---
 
32
    ("Other" (interactive-remote-set-property-and-value))))
36
33
 
37
34
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
38
35
;; Menu for setting the current project
39
36
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
40
37
 
41
 
(define (remote-set-project-menu-entry val new-file old-file)
42
 
  (list (list 'check val "v" (lambda () (== new-file old-file)))
43
 
        (lambda () (remote-set-property "project" new-file))))
44
 
 
45
 
(tm-define (remote-set-project-menu)
 
38
(tm-menu (remote-set-project-menu)
46
39
  (let* ((l1 (or (remote-get-projects) '()))
47
40
         (l2 (list-sort l1 (lambda (x y) (string<=? (car x) (car y)))))
48
41
         (prj (remote-get-property "project")))
49
 
    (menu-dynamic
50
 
      ,@(map (lambda (x) (remote-set-project-menu-entry (car x) (cdr x) prj))
51
 
             l2))))
 
42
    (for (x l2)
 
43
      (let* ((val (car x))
 
44
             (new-file (cdr x))
 
45
             (old-file prj))
 
46
        ((check (eval val) "v" (== new-file old-file))
 
47
         (remote-set-property "project" new-file))))))
52
48
 
53
49
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54
50
;; Main remote file menu