select-list now accepts width instead of result-buffer

part of darcs patch Wed Sep 21 20:47:51 EEST 2005  Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
eknauel 2005-09-27 16:31:54 +00:00
parent 76570de92e
commit 35ec8720e1
8 changed files with 28 additions and 29 deletions

View File

@ -121,7 +121,8 @@
header header
(iota hdr-len)) (iota hdr-len))
(paint-selection-list-at (paint-selection-list-at
select-list 0 hdr-len win buffer have-focus?)))) select-list 0 hdr-len win (result-buffer-num-cols buffer)
have-focus?))))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)

View File

@ -145,7 +145,7 @@
(wattrset win (A-NORMAL)) (wattrset win (A-NORMAL))
(paint-select-line-at select-line 1 1 win buffer) (paint-select-line-at select-line 1 1 win buffer)
(paint-selection-list-at select-list 1 2 win (paint-selection-list-at select-list 1 2 win
buffer have-focus?)) (result-buffer-num-cols buffer) have-focus?))
(define (find-common-parent paths) (define (find-common-parent paths)
(if (null? paths) (if (null? paths)

View File

@ -183,7 +183,7 @@
(paint-selection-list-at (paint-selection-list-at
selection-list selection-list
0 hdr-len 0 hdr-len
win result-buffer have-focus?)))) win (result-buffer-num-cols result-buffer) have-focus?))))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)
(cond (cond

View File

@ -95,7 +95,8 @@
(lambda (self win buffer have-focus?) (lambda (self win buffer have-focus?)
(mvwaddstr win 0 0 headline) (mvwaddstr win 0 0 headline)
(paint-selection-list-at (paint-selection-list-at
select-list 0 1 win buffer have-focus?))) select-list 0 1 win (result-buffer-num-cols buffer)
have-focus?)))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)
@ -250,7 +251,8 @@
(mvwaddstr (mvwaddstr
win 0 0 (cut-to-size num-cols "Viewing job")) win 0 0 (cut-to-size num-cols "Viewing job"))
(paint-selection-list-at (paint-selection-list-at
select-list 0 1 win buffer have-focus?))) select-list 0 1 win (result-buffer-num-cols buffer)
have-focus?)))
((key-press) handle-key-press) ((key-press) handle-key-press)

View File

@ -806,7 +806,8 @@
(string-append "Possible completions for " command)) (string-append "Possible completions for " command))
(wattrset win (A-NORMAL)) (wattrset win (A-NORMAL))
(paint-selection-list-at select-list 0 2 (paint-selection-list-at select-list 0 2
win (result-buffer) (focus-on-result-buffer?)) win (result-buffer-num-cols (result-buffer))
(focus-on-result-buffer?))
(refresh-result-window))) (refresh-result-window)))
(define (current-cursor-index) (define (current-cursor-index)

View File

@ -53,14 +53,6 @@
(result-buffer-num-lines buffer) (result-buffer-num-lines buffer)
processes))) processes)))
(define (set-processes! new-processes)
(set! processes new-processes)
(set! select-list
(make-process-selection-list
(result-buffer-num-cols buffer)
(- (result-buffer-num-lines buffer) 1)
new-processes)))
(define (get-selection-as-text self for-scheme-mode? focus-object-table) (define (get-selection-as-text self for-scheme-mode? focus-object-table)
(let* ((marked (select-list-get-marked select-list))) (let* ((marked (select-list-get-marked select-list)))
(cond (cond
@ -83,7 +75,8 @@
(lambda (self win buffer have-focus?) (lambda (self win buffer have-focus?)
(paint-select-line-at header-line 0 0 win buffer) (paint-select-line-at header-line 0 0 win buffer)
(paint-selection-list-at (paint-selection-list-at
select-list 0 1 win buffer have-focus?))) select-list 0 1 win (result-buffer-num-cols buffer)
have-focus?)))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)

View File

@ -125,14 +125,13 @@
(select-list-view-index select-list)) (select-list-view-index select-list))
(+ 1 num-lines))) (+ 1 num-lines)))
(define (paint-selection-list select-list win result-buffer have-focus?) (define (paint-selection-list select-list win width have-focus?)
(paint-selection-list-at select-list 0 0 win result-buffer have-focus?)) (paint-selection-list-at select-list 0 0 win width have-focus?))
(define (paint-selection-list-at select-list x y win result-buffer (define (paint-selection-list-at select-list x y win width
have-focus?) have-focus?)
(let ((num-lines (select-list-num-lines select-list)) (let ((num-lines (select-list-num-lines select-list))
(cursor-index (select-list-cursor-index select-list)) (cursor-index (select-list-cursor-index select-list)))
(width (result-buffer-num-cols result-buffer)))
(let lp ((elts (let lp ((elts
(select-visible-elements select-list num-lines)) (select-visible-elements select-list num-lines))
(y y) (y y)

View File

@ -203,9 +203,10 @@
(lambda (message) (lambda (message)
(case message (case message
((paint) ((paint)
(lambda (self . args) (lambda (self win buffer have-focus?)
(apply paint-selection-list (paint-selection-list selection-list
selection-list args))) win (result-buffer-num-cols buffer)
have-focus?)))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)
(cond (cond
@ -340,9 +341,10 @@
(lambda (message) (lambda (message)
(case message (case message
((paint) ((paint)
(lambda (self . args) (lambda (self win buffer have-focus?)
(apply paint-selection-list (paint-selection-list selection-list
selection-list args))) win (result-buffer-num-cols buffer)
have-focus?)))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)
(cond (cond
@ -421,9 +423,10 @@
(lambda (message) (lambda (message)
(case message (case message
((paint) ((paint)
(lambda (self . args) (lambda (self win buffer have-focus?)
(apply paint-selection-list (paint-selection-list selection-list
selection-list args))) win (result-buffer-num-cols buffer)
have-focus?)))
((key-press) ((key-press)
(lambda (self key control-x-pressed?) (lambda (self key control-x-pressed?)
(cond (cond