Try to get result window size stuff right
part of darcs patch Sun Sep 18 14:32:07 EEST 2005 Eric Knauel <knauel@informatik.uni-tuebingen.de>
This commit is contained in:
parent
a4ee4822df
commit
93ee18ce47
|
@ -164,7 +164,8 @@
|
|||
(select-list
|
||||
(make-file-select-list
|
||||
fs-objects working-dir
|
||||
(- (result-buffer-num-lines buffer) 2)
|
||||
;; we need one line for the header
|
||||
(- (result-buffer-num-lines buffer) 1)
|
||||
(result-buffer-num-cols buffer))))
|
||||
|
||||
(define (handle-return-key self selected-entry num-lines)
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
(make-unmarked-element
|
||||
job #t (format-job job num-cols)))
|
||||
jobs)
|
||||
(- (result-buffer-num-lines buffer) 1))))
|
||||
(- (result-buffer-num-lines buffer) 2))))
|
||||
|
||||
(define get-selection-as-ref
|
||||
(make-get-selection-as-ref-method select-list))
|
||||
|
@ -216,7 +216,7 @@
|
|||
,@(if (job-with-console? job)
|
||||
`((,console-viewer "<View Console>" ""))
|
||||
'())))
|
||||
(- (result-buffer-num-lines buffer) 1)))
|
||||
(- (result-buffer-num-lines buffer) 3)))
|
||||
|
||||
(define (handle-key-press self key control-x-pressed?)
|
||||
(cond
|
||||
|
|
|
@ -304,8 +304,8 @@
|
|||
(make-job-with-console
|
||||
s-expr proc pty-in pty-out
|
||||
(make-terminal-buffer
|
||||
(- (result-buffer-num-cols (result-buffer)) 1)
|
||||
(- (result-buffer-num-lines (result-buffer)) 1))))))
|
||||
(result-buffer-num-cols (result-buffer))
|
||||
(result-buffer-num-lines (result-buffer)))))))
|
||||
|
||||
;; for use in Scheme mode
|
||||
(define-syntax run/console
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
(select-list
|
||||
(make-process-selection-list
|
||||
(result-buffer-num-cols buffer)
|
||||
;; we need one line for the header
|
||||
(- (result-buffer-num-lines buffer) 1)
|
||||
processes))
|
||||
(header (make-header-line (result-buffer-num-cols buffer))))
|
||||
|
|
|
@ -302,3 +302,25 @@
|
|||
(completions-for cs (or (to-complete-prefix to-complete) ""))))
|
||||
just-run-in-foreground))
|
||||
|
||||
(define (make-debug-plugin val buffer)
|
||||
(lambda (message)
|
||||
(case message
|
||||
((paint)
|
||||
(lambda (self win buffer have-focus?)
|
||||
(let ((cols (+ 0 (result-buffer-num-cols buffer)))
|
||||
(lines (+ 0 (result-buffer-num-lines buffer))))
|
||||
(wmove win 0 0)
|
||||
(waddstr win "A")
|
||||
(wmove win 0 cols)
|
||||
(waddstr win "B")
|
||||
(wmove win lines cols)
|
||||
(waddstr win "C")
|
||||
(wmove win lines 0)
|
||||
(waddstr win "D")
|
||||
(wrefresh win))))
|
||||
(else
|
||||
(lambda (self . more)
|
||||
self)))))
|
||||
|
||||
(register-plugin!
|
||||
(make-view-plugin make-debug-plugin (lambda (v) (eq? v 'debug))))
|
||||
|
|
|
@ -86,23 +86,29 @@
|
|||
(make-app-window 1 1
|
||||
(- (COLS) 2) 2
|
||||
#f))
|
||||
(debug-message '*bar-1* *bar-1*)
|
||||
(set! *active-command-window*
|
||||
(make-app-window 1 (+ (round (/ (LINES) 3)) 2)
|
||||
(- (COLS) 2) 3
|
||||
#f))
|
||||
(debug-message '*active-command-window* *active-command-window*)
|
||||
(set! *command-frame-window*
|
||||
(make-app-window 1 2
|
||||
(- (COLS) 2) (- (app-window-y (active-command-window)) 2)
|
||||
#f))
|
||||
(debug-message '*command-frame-window* *command-frame-window*)
|
||||
(set! *command-window*
|
||||
(make-inlying-app-window (command-frame-window)))
|
||||
(debug-message '*command-window* *command-window*)
|
||||
(set! *result-frame-window*
|
||||
(make-app-window 1 (+ (app-window-y (active-command-window)) 3)
|
||||
(- (COLS) 2)
|
||||
(- (- (LINES) 6) (app-window-height (command-frame-window)))
|
||||
#f))
|
||||
(debug-message '*result-frame-window* *result-frame-window*)
|
||||
(set! *result-window*
|
||||
(make-inlying-app-window (result-frame-window)))
|
||||
(debug-message '*result-window* *result-window*)
|
||||
|
||||
(let ((all-windows
|
||||
(list (bar-1) (active-command-window)
|
||||
|
@ -113,7 +119,7 @@
|
|||
(set-result-buffer-num-lines!
|
||||
*result-buffer* (- (app-window-height (result-window)) 2))
|
||||
(set-result-buffer-num-cols!
|
||||
*result-buffer* (- (app-window-width (result-window)) 3))
|
||||
*result-buffer* (- (app-window-width (result-window)) 1))
|
||||
|
||||
(for-each wclear
|
||||
(map app-window-curses-win all-windows))))
|
||||
|
|
Loading…
Reference in New Issue