From 8c6de19aaad901f2450a4e0e1948e33c897f6332 Mon Sep 17 00:00:00 2001 From: eknauel Date: Tue, 27 Sep 2005 08:44:36 +0000 Subject: [PATCH] get-selection-as-ref for id-output part of darcs patch Fri Sep 16 23:02:04 EEST 2005 Martin Gasbichler --- scheme/nuit-packages.scm | 1 + scheme/user-group-info.scm | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scheme/nuit-packages.scm b/scheme/nuit-packages.scm index 32ee8d3..8637986 100644 --- a/scheme/nuit-packages.scm +++ b/scheme/nuit-packages.scm @@ -161,6 +161,7 @@ plugin layout select-list + (subset focus-table (make-focus-object-reference)) tty-debug) (files user-group-info)) diff --git a/scheme/user-group-info.scm b/scheme/user-group-info.scm index c1a2ee3..ad8c40e 100644 --- a/scheme/user-group-info.scm +++ b/scheme/user-group-info.scm @@ -129,6 +129,19 @@ prepare-selection-for-command-mode) infos))) + (define (get-selection-as-ref self focus-object-table) + (let ((infos (select-list-get-selection selection-list)) + (make-reference (lambda (obj) + (make-focus-object-reference + focus-object-table obj)))) + (string-append + "(list " + (string-join + (map exp->string + (map make-reference + (map cdr infos)))) + ")"))) + (lambda (message) (case message ((paint) @@ -166,7 +179,8 @@ self)))) ((get-selection-as-text) get-selection-as-text) - + ((get-selection-as-ref) + get-selection-as-ref) (else (error "unknown message in make-id-output-browser" message))))))