|
|
@ -13,13 +13,17 @@ |
|
|
|
(defun ergebnis/se (n) |
|
|
|
(defun ergebnis/se (n) |
|
|
|
(format nil "~A Ergebnis~A" n (if (= n 1) "" "se"))) |
|
|
|
(format nil "~A Ergebnis~A" n (if (= n 1) "" "se"))) |
|
|
|
|
|
|
|
|
|
|
|
(defun search-in-bible (phrase canvas) |
|
|
|
(defun search-in-bible (phrase bible canvas) |
|
|
|
(let* ((win (window-content (create-gui-window canvas :title phrase |
|
|
|
(let* ((win (window-content |
|
|
|
:height 400 |
|
|
|
(create-gui-window canvas :title |
|
|
|
:width 650))) |
|
|
|
(format nil "~A: ~A" |
|
|
|
|
|
|
|
d:*translation* |
|
|
|
|
|
|
|
phrase) |
|
|
|
|
|
|
|
:height 400 |
|
|
|
|
|
|
|
:width 650))) |
|
|
|
(lift-search (create-button win :content "Lift Search")) |
|
|
|
(lift-search (create-button win :content "Lift Search")) |
|
|
|
(div (create-div win)) |
|
|
|
(div (create-div win)) |
|
|
|
(results (s:find-in-bible d:*bible* phrase))) |
|
|
|
(results (s:find-in-bible bible phrase))) |
|
|
|
(set-on-click lift-search (lift-search-window canvas results)) |
|
|
|
(set-on-click lift-search (lift-search-window canvas results)) |
|
|
|
(create-p div :content (ergebnis/se |
|
|
|
(create-p div :content (ergebnis/se |
|
|
|
(length results))) |
|
|
|
(length results))) |
|
|
@ -27,12 +31,32 @@ |
|
|
|
(v:verse-to-clog verse div :translation d:*translation*)) |
|
|
|
(v:verse-to-clog verse div :translation d:*translation*)) |
|
|
|
results))) |
|
|
|
results))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun %bible-book-or-chapter (bible book chapter) |
|
|
|
|
|
|
|
(if (string= book "") |
|
|
|
|
|
|
|
bible |
|
|
|
|
|
|
|
(let ((book (s:find-book bible book))) |
|
|
|
|
|
|
|
(if (string= chapter "") |
|
|
|
|
|
|
|
book |
|
|
|
|
|
|
|
(s:find-chapter book chapter))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun search-with-chapter (window) |
|
|
|
|
|
|
|
(lambda (data) |
|
|
|
|
|
|
|
(let ((book (cadr (assoc "book" data :test #'string=))) |
|
|
|
|
|
|
|
(chapter (cadr (assoc "chapter" data :test #'string=))) |
|
|
|
|
|
|
|
(phrase (cadr (assoc "phrase" data :test #'string=)))) |
|
|
|
|
|
|
|
(search-in-bible phrase |
|
|
|
|
|
|
|
(%bible-book-or-chapter d:*bible* book chapter) |
|
|
|
|
|
|
|
window)))) |
|
|
|
|
|
|
|
|
|
|
|
(defun searcher (window) |
|
|
|
(defun searcher (window) |
|
|
|
(lambda (obj) |
|
|
|
(lambda (obj) |
|
|
|
(declare (ignore obj)) |
|
|
|
(declare (ignore obj)) |
|
|
|
(input-dialog window "What do you want to search?" |
|
|
|
(form-dialog window "What do you want to search?" |
|
|
|
(lambda (phrase) |
|
|
|
'(("Phrase" "phrase" :text) |
|
|
|
(search-in-bible phrase window))))) |
|
|
|
("Book" "book" :text) |
|
|
|
|
|
|
|
("Chapter" "chapter" :text)) |
|
|
|
|
|
|
|
(search-with-chapter window) |
|
|
|
|
|
|
|
:title "Search a phrase"))) |
|
|
|
|
|
|
|
|
|
|
|
(defun reload (window) |
|
|
|
(defun reload (window) |
|
|
|
(lambda (obj) |
|
|
|
(lambda (obj) |
|
|
@ -49,7 +73,6 @@ |
|
|
|
("Schlachter 1951" :sch1951) |
|
|
|
("Schlachter 1951" :sch1951) |
|
|
|
("Ukrainische Version" :ukr)))) |
|
|
|
("Ukrainische Version" :ukr)))) |
|
|
|
(lambda (results) |
|
|
|
(lambda (results) |
|
|
|
(princ (cadar results)) |
|
|
|
|
|
|
|
(d:update-bible (cadar results)) |
|
|
|
(d:update-bible (cadar results)) |
|
|
|
:title "Load a Bible")))) |
|
|
|
:title "Load a Bible")))) |
|
|
|
|
|
|
|
|
|
|
@ -60,7 +83,7 @@ |
|
|
|
(if (string= chapter "") |
|
|
|
(if (string= chapter "") |
|
|
|
(load-book canvas book) |
|
|
|
(load-book canvas book) |
|
|
|
(load-chapter canvas book chapter))))) |
|
|
|
(load-chapter canvas book chapter))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun load-book (canvas book) |
|
|
|
(defun load-book (canvas book) |
|
|
|
(let* ((win (window-content |
|
|
|
(let* ((win (window-content |
|
|
|