Lisp image loading
src/i18n-hello-world.lisp
Thu May 14 14:27:03 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Lisp image loading
--- old-qt.examples/src/i18n-hello-world.lisp 2014-10-30 07:38:38.000000000 +0100
+++ new-qt.examples/src/i18n-hello-world.lisp 2014-10-30 07:38:38.000000000 +0100
@@ -6,22 +6,23 @@
(defun i18n-hello-world ()
"i18n hello world"
(qt:with-app
- (qt:with-translator
- ;; ensures that the message catalogs are found regardless
- ;; of the current directory.
- (concatenate 'string
- (directory-namestring
- (mb.sysdef:input-file
- (mb.sysdef:find-component :qt.examples "src" "i18n-hello-world")))
- "hello-world")
- (let ((widget (make-instance 'qt:label)))
- (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
- (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
+ ;; ensures that the message catalogs are found regardless
+ ;; of the current directory.
+ (let ((source-path (directory-namestring
+ (mb.sysdef:input-file
+ (mb.sysdef:find-component :qt.examples "src"
+ "i18n-hello-world")))))
+ (qt:with-translator ("hello-world"
+ *default-pathname-defaults*
+ source-path)
+ (let ((widget (make-instance 'qt:label)))
+ (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
+ (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
You are running ~A version ~A on a ~A ~A")
- (lisp-implementation-type)
- (lisp-implementation-version)
- (software-type)
- (software-version)))
- (cxx:show widget)
- (qt:exec widget)))))
+ (lisp-implementation-type)
+ (lisp-implementation-version)
+ (software-type)
+ (software-version)))
+ (cxx:show widget)
+ (qt:exec widget))))))