Thu May 14 14:27:03 CEST 2009 Tobias Rautenkranz * Lisp image loading diff -rN -u old-qt.examples/make-bundle.sh new-qt.examples/make-bundle.sh --- old-qt.examples/make-bundle.sh 1970-01-01 01:00:00.000000000 +0100 +++ new-qt.examples/make-bundle.sh 2014-10-30 07:38:27.000000000 +0100 @@ -0,0 +1,15 @@ +#!/bin/sh +if [[ $# -ne 0 ]]; then + echo "Create a qt.examples bundle." + echo "Usage: $0" + exit 1 +fi + +sbcl \ + --eval '(mb:load :qt.examples)' \ + --eval "(smoke::add-startup-function #'(lambda() (format t \"\ +cl-smoke: build: `date -R`~%\ +Run examples with: (qt.examples:launcher)\")))" \ + --eval "(smoke:save-bundle \"cl-smoke-qt.examples.linux.x86.run\"\ + '(\"src/widget.ui\" \"src/hello-world_de.qm\"))" \ + --eval '(quit)' diff -rN -u old-qt.examples/src/hello-world.lisp new-qt.examples/src/hello-world.lisp --- old-qt.examples/src/hello-world.lisp 2014-10-30 07:38:26.000000000 +0100 +++ new-qt.examples/src/hello-world.lisp 2014-10-30 07:38:27.000000000 +0100 @@ -8,4 +8,4 @@ (qt:with-app (let ((widget (make-instance 'qt:push-button :args '("Hello world")))) (cxx:show widget) - (qt:exec)))) + (qt:exec widget)))) diff -rN -u old-qt.examples/src/hello-world_de.po new-qt.examples/src/hello-world_de.po --- old-qt.examples/src/hello-world_de.po 2014-10-30 07:38:26.000000000 +0100 +++ new-qt.examples/src/hello-world_de.po 2014-10-30 07:38:27.000000000 +0100 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: hello-world\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-11 18:00+0200\n" +"POT-Creation-Date: 2009-05-14 13:56+0200\n" "PO-Revision-Date: 2009-03-21 11:41+0100\n" "Last-Translator: Tobias Rautenkranz \n" "Language-Team: German <>\n" @@ -16,12 +16,12 @@ "X-Generator: Lokalize 0.3\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: i18n-hello-world.lisp:18 +#: i18n-hello-world.lisp:19 msgctxt "hello-world" msgid "Lisp Qt Example" msgstr "Lisp Qt Beispiel" -#: i18n-hello-world.lisp:19 +#: i18n-hello-world.lisp:20 #, lisp-format msgid "" "

Hello world

\n" diff -rN -u old-qt.examples/src/i18n-hello-world.lisp new-qt.examples/src/i18n-hello-world.lisp --- old-qt.examples/src/i18n-hello-world.lisp 2014-10-30 07:38:26.000000000 +0100 +++ new-qt.examples/src/i18n-hello-world.lisp 2014-10-30 07:38:27.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 "

Hello world

+ ;; 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 "

Hello world

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)))))) diff -rN -u old-qt.examples/src/ui.lisp new-qt.examples/src/ui.lisp --- old-qt.examples/src/ui.lisp 2014-10-30 07:38:26.000000000 +0100 +++ new-qt.examples/src/ui.lisp 2014-10-30 07:38:27.000000000 +0100 @@ -10,11 +10,12 @@ (file (make-instance 'qt:file)) (widget)) (setf (cxx:file-name file) - (concatenate 'string - (directory-namestring - (mb.sysdef:input-file - (mb.sysdef:find-component :qt.examples "src" "ui"))) - "widget.ui")) + (namestring + (qt:search-file "widget.ui" + *default-pathname-defaults* + (directory-namestring + (mb.sysdef:input-file + (mb.sysdef:find-component :qt.examples "src" "ui")))))) (assert (cxx:exists file) (file) "File ~A does not exists" (cxx:file-name file)) (unless (cxx:open file qt:iodevice.+read-only+)