Sat Apr 3 19:29:08 CEST 2010 Tobias Rautenkranz * modular Smoke kdeui Thu Jun 11 21:13:13 CEST 2009 Tobias Rautenkranz * Set package for smoke module Tue May 26 17:46:14 CEST 2009 Tobias Rautenkranz * Workaround segfault on exit & run test on commit Sun May 24 23:29:37 CEST 2009 Tobias Rautenkranz * cleanup: remove static-call Sun May 24 17:11:10 CEST 2009 Tobias Rautenkranz * cleanup new Fri May 15 18:09:40 CEST 2009 Tobias Rautenkranz * Fix missing static-call function. diff -rN -u old-kde.ui/TODO new-kde.ui/TODO --- old-kde.ui/TODO 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/TODO 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -* fix segfault on exit after kde:application has run diff -rN -u old-kde.ui/cl-smoke.kde.ui.asd new-kde.ui/cl-smoke.kde.ui.asd --- old-kde.ui/cl-smoke.kde.ui.asd 1970-01-01 01:00:00.000000000 +0100 +++ new-kde.ui/cl-smoke.kde.ui.asd 2014-10-30 08:47:45.000000000 +0100 @@ -0,0 +1,13 @@ +(defsystem :cl-smoke.kde.ui + :name :kde.ui + :version (0 0 1) + :author "Tobias Rautenkranz" + :license "GPL with linking exception" + :description "Smoke KDE ui bindings." + :depends-on (:cl-smoke.kde.core :cl-smoke.qt.svg) + :components + ((:module "src" :components + ((:file "package") + (:file "kde" :depends-on ("package")) + (:file "application" :depends-on ("kde")) + (:file "standard-action" :depends-on ("kde")))))) diff -rN -u old-kde.ui/kde.mbd new-kde.ui/kde.mbd --- old-kde.ui/kde.mbd 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/kde.mbd 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- - -(in-package :sysdef-user) - -(define-system :kde () - (:version 0 0 1) - (:documentation "Smoke KDE bindings.") - (:keywords "GUI" "KDE") - (:author "Tobias Rautenkranz") - (:license "GPL with linking exception") - (:needs :qt) -; (:uses-macros-from :smoke) - (:components - ("src" module - (:components - "package" - ("dr-konqi" (:needs "package")) - ("kde" (:needs "package" "dr-konqi")) - ("application" (:needs "package" "kde")) - ("standard-action" (:needs "package" "kde")))))) diff -rN -u old-kde.ui/src/application.lisp new-kde.ui/src/application.lisp --- old-kde.ui/src/application.lisp 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/src/application.lisp 2014-10-30 08:47:45.000000000 +0100 @@ -1,30 +1,28 @@ -(in-package :kde) +(in-package :cl-smoke.kde.ui) -(declaim (optimize (debug 3))) - -(defun app () - (assert (app-p)) +(defun kde:app () + (assert (kde:app-p)) (qt:app)) -(defun app-p () +(defun kde:app-p () (and (qt:app-p) - (typep (qt:app) (find-class 'application)))) + (typep (qt:app) (find-class 'kde:application)))) -(defun make-aboutdata (app-name program-name version) +(defun kde:make-aboutdata (app-name program-name version) (let ((app-name (make-instance 'qt:byte-array :args (list app-name))) (catalog-name (make-instance 'qt:byte-array)) (program-name (kde:ki18n program-name)) (version (make-instance 'qt:byte-array :args (list version)))) - (make-instance 'about-data :args (list app-name catalog-name - program-name version)))) + (make-instance 'kde:about-data :args (list app-name catalog-name + program-name version)))) (let ((argv)) - (defun ensure-app (about-data &optional (application 'application) + (defun ensure-app (about-data &optional (application 'kde:application) (args #+sbcl sb-ext:*posix-argv* #-sbcl (list "lisp"))) (if (qt:app-p) (progn - (assert (typep (qt:app) (find-class application)) + (assert (typep (qt:app) (find-class 'kde:application)) () "The existing application object ~A is not of type ~A." (qt:app) (find-class application)) @@ -37,23 +35,23 @@ (setf argv (foreign-alloc :string :initial-contents args)) (kde:cmd-line-args.init (length args) argv about-data) - (values (make-instance 'application) t)))) + (values (make-instance 'kde:application) t)))) (defun kill-app () (qt:application.close-all-windows) - (setf qt::*widgets* nil) + (setf cl-smoke.qt.gui::*widgets* nil) ;; FIXME make it work without mem-faults - (cxx:delete-later (app)) - (trivial-garbage:cancel-finalization (app)) - (smoke::delete-pointer (smoke::pointer (app)) (class-of (app))) - (setf (slot-value (app) 'pointer) (null-pointer)))) + (trivial-garbage:cancel-finalization (kde:app)) + (cxx:delete-later (kde:app)) + ;(smoke::delete-pointer (smoke::pointer (app)) (class-of (app))) + (setf (slot-value (kde:app) 'pointer) (null-pointer)))) -(defmacro with-app (about-data &body body) - `(qt::with-application ((ensure-app ,about-data) +(defmacro kde:with-app (about-data &body body) + `(cl-smoke.qt.core::with-application ((ensure-app ,about-data) (kill-app)) ,@body)) -(defmacro with-kde ((app-name program-name version) &body body) +(defmacro kde:with-kde ((app-name program-name version) &body body) (let ((about-data (gensym))) - `(let ((,about-data (make-aboutdata ,app-name ,program-name ,version))) - (with-app ,about-data - ,@body)))) + `(let ((,about-data (kde:make-aboutdata ,app-name ,program-name ,version))) + (kde:with-app ,about-data + ,@body)))) diff -rN -u old-kde.ui/src/dr-konqi.lisp new-kde.ui/src/dr-konqi.lisp --- old-kde.ui/src/dr-konqi.lisp 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/src/dr-konqi.lisp 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -(in-package :kde) - -(defun disable-dr-konqi () - "Disables the Dr Konqi crash manager since it traps signals." - #+sbcl (sb-posix:putenv "KDE_DEBUG=true") - #-sbcl (warn "Can not disable Dr. Konqi.")) diff -rN -u old-kde.ui/src/kde.lisp new-kde.ui/src/kde.lisp --- old-kde.ui/src/kde.lisp 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/src/kde.lisp 2014-10-30 08:47:45.000000000 +0100 @@ -1,4 +1,4 @@ -;;; Copyright (C) 2009 Tobias Rautenkranz +;;; Copyright (C) 2009, 2010 Tobias Rautenkranz ;;; ;;; This program is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -25,11 +25,8 @@ ;;; do so. If you do not wish to do so, delete this exception statement ;;; from your version. -(in-package :kde) +(in-package :cl-smoke.kde.ui) -(smoke:define-smoke-module libsmokekde - (*kde-smoke* "kde_Smoke") - (init-kde-smoke "init_kde_Smoke")) - -(eval-when (:load-toplevel :compile-toplevel :execute) - (disable-dr-konqi)) +(smoke:define-smoke-module :kde libsmokekdeui + (*kdeui-smoke* "kdeui_Smoke") + (init-kdeui-smoke "init_kdeui_Smoke")) diff -rN -u old-kde.ui/src/package.lisp new-kde.ui/src/package.lisp --- old-kde.ui/src/package.lisp 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/src/package.lisp 2014-10-30 08:47:45.000000000 +0100 @@ -1,11 +1,3 @@ -(defpackage :kde +(defpackage :cl-smoke.kde.ui (:use :cl :smoke :cffi :cxx-support) - (:export #:new - #:call - #:static-call - - #:make-aboutdata - #:make-standard-action - #:init-app - #:with-kde - #:with-app)) + (:nicknames :kde.ui)) diff -rN -u old-kde.ui/src/standard-action.lisp new-kde.ui/src/standard-action.lisp --- old-kde.ui/src/standard-action.lisp 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/src/standard-action.lisp 2014-10-30 08:47:45.000000000 +0100 @@ -1,12 +1,12 @@ -(in-package :kde) +(in-package :cl-smoke.kde.ui) -(defun make-standard-action (action action-collection &optional slot) +(defun kde:make-standard-action (action action-collection &optional slot) "Adds the standard-action ACTION to ACTION-COLLECTION and connects the \"triggered()\" signal to SLOT when specified." - (let ((std-action (static-call "KStandardAction" "create$#$#" action - (null-pointer) - (null-pointer) - action-collection))) + (let ((std-action (kde:standard-action.create action + (null-pointer) + (null-pointer) + action-collection))) (when slot (qt:connect (qt:get-signal std-action "triggered()") slot)) diff -rN -u old-kde.ui/test.lisp new-kde.ui/test.lisp --- old-kde.ui/test.lisp 1970-01-01 01:00:00.000000000 +0100 +++ new-kde.ui/test.lisp 2014-10-30 08:47:45.000000000 +0100 @@ -0,0 +1,31 @@ +#| +cmake ./ && make || exit 1 +# LD_PRELOAD causes utf8 decoding errors in sbcl +# in run-progam used by sysdef.cmake +sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options -c || exit 1 +LD_PRELOAD=./util/libcl-smoke-disable-backtrace.so exec -a "$0" sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options +# do not use --script to allow loading mudballs with ${HOME}/.sbclrc +# Used for testing on darcs record. +|# + +(in-package :sysdef-user) + +(defun load-sysdef (pathname system) + (load pathname) + (setf (mb.sysdef::pathname-of (find-system system)) pathname)) + +(defun load-sysdef-file (system-name) + "Loads a mbd file in the current directory." + (load-sysdef (make-pathname :defaults *default-pathname-defaults* + :name (string-downcase system-name) + :type "mbd") + system-name)) + +(load-sysdef-file :kde) +(when (= 2 (length sb-ext:*posix-argv*)) + (mb:load :kde) + (sb-ext:quit)) + +(mb:test :kde) + +(sb-ext:quit) diff -rN -u old-kde.ui/tests/test.lisp new-kde.ui/tests/test.lisp --- old-kde.ui/tests/test.lisp 2014-10-30 08:47:45.000000000 +0100 +++ new-kde.ui/tests/test.lisp 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -(mb:test :kde.tests)