Hi Peter,

sorry for that late reply. Due to a misbehaving progmailrc your last
mail was sorted into the cells-devel folder where I didn't read it.

Please find the following patched attached:

0001-Remove-clisp-hack.patch

     Complete removes the clisp-call-next-method hack as I think
     it's no longer needed at all. See below.

0002-In-cells3-def-c-output-was-renamed-to-defobserver.patch

     Renames remaining occurrences of 'def-c-output'.
     I wonder why there weren't any errors as the macro
     was removed from cells3.

0003-Inactivate-optional-stuff-by-default.patch

     Inactivate optional features (threads, cairo, opengl and 
     libcellsgtk) by default. I think it's more convenient to
     activate those when needed instead of patching the .asd
     files all the time. Test-gtk.asd still does exactly this.

> > 2. Also if used in a single threading environment (like clisp)
> >   (g-thread-init...) and (gdk-threads-init) do get called which
> >   results in an error.
>
> Hmm, I never changed that, I think.  They were always called in
> cells-gtk if IIRC.  However, if it does no harm to leave them out,
> then that seems the right thing to do.
>
> Are you on windows or linux?  I'm just guessing, but it might be the
> case that it is a GTK issue and not a cells-gtk issue whether to call
> them:  On linux GTK supports threads, so it might be necessary to call
> those (even if you don't use threads yourself).  On windows it
> doesn't, so maybe you can't call them.  In this case, we should
> condition on :unix vs. :windows.  But again, I'm just guessing.  If
> you're on linux, then forget everything I said.

I'm primarily on sbcl/linux. Recently I started to maintain the
project for clisp/windows. As far as I remember thought, I realized
the described problem have way down on clisp/linux.

> As to the call-next-method thing, the background is this:
>
> [...]
>
>      I'd suggest you just go ahead and deactivate all
> those calls (e.g by conditioning on :no-progn-combination instead of
> :clisp), which should remove those warnings.

As mentioned above I decided against ':no-progn-combination'.

In my opinion the call-next-method hack is of little use since
'(:method-combination progn)' was removed for clisp in 'cells.lisp'.

Please tell me in case I'm wrong here so I can change the patch.


Thanks again (everybody)

  Ingo

_______________________________________________________________
Schon gehört? Der neue WEB.DE MultiMessenger kann`s mit allen: 
http://www.produkte.web.de/messenger/?did=3016

>From 6bb7cfe168470fe7fc8831a0f50e4fd0e1c4e73b Mon Sep 17 00:00:00 2001
From: Ingo Bormuth <[EMAIL PROTECTED]>
Date: Fri, 30 May 2008 20:50:43 +0200
Subject: [PATCH] Remove clisp hack:

CLisp used not to supports customized
method-combination for 'def-generic'.

As far as I can tell this shortcoming was
fixed in clisp v2.39. The equivalent hack
was removed from cells on 2006-06-11 by kt.
---
 cells-gtk/actions.lisp |    5 ++---
 cells-gtk/buttons.lisp |    6 ++----
 cells-gtk/layout.lisp  |   25 ++++++++-----------------
 cells-gtk/menus.lisp   |    9 +++------
 cells-gtk/widgets.lisp |    6 ++----
 5 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/cells-gtk/actions.lisp b/cells-gtk/actions.lisp
index b9ca323..f280a4e 100644
--- a/cells-gtk/actions.lisp
+++ b/cells-gtk/actions.lisp
@@ -47,8 +47,7 @@
   (dolist (kid old-value)
     (gtk-ffi::gtk-action-group-remove-action (id self) (id kid)))
   (dolist (kid new-value)
-    (gtk-ffi::gtk-action-group-add-action-with-accel (id self) (id kid) (accel kid)))
-  #+clisp (call-next-method))
+    (gtk-ffi::gtk-action-group-add-action-with-accel (id self) (id kid) (accel kid))))
 
 (def-object ui-manager ()
   ((action-groups :accessor action-groups :initform (c-in nil))
@@ -78,4 +77,4 @@
 			     :name "Action 2" :stock :network :label "Action 2" :accel "<Control>b")))
 			     
       :kids (kids-list?
-	     (mk-label :text "Actions test"))))
\ No newline at end of file
+	     (mk-label :text "Actions test")))
diff --git a/cells-gtk/buttons.lisp b/cells-gtk/buttons.lisp
index 192a3ac..ea1ae28 100644
--- a/cells-gtk/buttons.lisp
+++ b/cells-gtk/buttons.lisp
@@ -38,8 +38,7 @@
 (defobserver .kids ((self button))
   (assert-bin self)
   (dolist (kid (kids self))
-    (gtk-container-add (id self) (id kid)))
-  #+clisp (call-next-method))
+    (gtk-container-add (id self) (id kid))))
 
 (defobserver stock ((self button))
   (when new-value
@@ -98,5 +97,4 @@
 (defobserver .value ((self radio-button))
   (when (and new-value (upper self box))
     (with-integrity (:change 'radio-up-to-box)
-      (setf (value (upper self box)) (md-name self))))
-  #+clisp (call-next-method))
+      (setf (value (upper self box)) (md-name self)))))
diff --git a/cells-gtk/layout.lisp b/cells-gtk/layout.lisp
index 8734516..6f84960 100644
--- a/cells-gtk/layout.lisp
+++ b/cells-gtk/layout.lisp
@@ -30,8 +30,7 @@
   (when new-value
     (dolist (kid new-value)
         (gtk-box-pack-start (id self) (id kid) 
-                            (expand? kid) (fill? kid) (padding? kid)))
-    #+clisp (call-next-method)))
+                            (expand? kid) (fill? kid) (padding? kid)))))
 
 (def-widget hbox (box)
   () () ()
@@ -93,8 +92,7 @@
     (and (cadr new-value)
 	 (gtk-paned-add2 (id self) (id (make-be 'frame 
 						    :shadow 'in
-						    :kids (kids-list? (cadr new-value)))))))
-  #+clisp (call-next-method))
+						    :kids (kids-list? (cadr new-value))))))))
 
 (def-widget vpaned ()
   ((divider-pos :accessor divider-pos :initarg :divider-pos :initform (c-in 0)))
@@ -113,9 +111,7 @@
     (and (cadr new-value)
 	 (gtk-paned-add2 (id self) (id (make-be 'frame 
 						    :shadow 'in
-						    :kids (kids-list? (cadr new-value)))))))
-  #+clisp (call-next-method))
-  
+						    :kids (kids-list? (cadr new-value))))))))
 
 (def-widget frame (container)
   ((shadow :accessor shadow? :initarg :shadow :initform nil)
@@ -143,8 +139,7 @@
 (defobserver .kids ((self frame))
   (assert-bin self)
   (dolist (kid new-value)
-    (gtk-container-add (id self) (id kid)))
-  #+clisp (call-next-method))
+    (gtk-container-add (id self) (id kid))))
 
 (def-widget aspect-frame (frame)
   ((xalign :accessor xalign :initarg :xalign :initform 0.5)
@@ -178,8 +173,7 @@
 (defobserver .kids ((self expander))
   (assert-bin self)
   (dolist (kid new-value)
-    (gtk-container-add (id self) (id kid)))
-  #+clisp (call-next-method))
+    (gtk-container-add (id self) (id kid))))
 
 (def-widget scrolled-window (container)
   ()
@@ -194,8 +188,7 @@
   (dolist (kid new-value)
     (if (member (class-name (class-of kid)) '(listbox treebox tree-view text-view layout) :test #'equal)
 	(gtk-container-add (id self) (id kid))
-	(gtk-scrolled-window-add-with-viewport (id self) (id kid))))
-  #+clisp (call-next-method))
+	(gtk-scrolled-window-add-with-viewport (id self) (id kid)))))
 
 (def-widget notebook (container)
   ((tab-labels :accessor tab-labels :initarg :tab-labels :initform (c-in nil))
@@ -243,8 +236,7 @@
     (loop for page from 0 to (length new-value) do
 	 (setf (current-page self) page)) 
     (when (and (show-page self) (>= (show-page self) 0) (< (show-page self) (length new-value)))
-      (setf (current-page self) (show-page self)))
-    #+clisp (call-next-method)))
+      (setf (current-page self) (show-page self)))))
 
 (defobserver show-tabs ((self notebook))
  (gtk-notebook-set-show-tabs (id self) new-value))
@@ -304,5 +296,4 @@
 (defobserver .kids ((self alignment))
   (assert-bin self)
   (dolist (kid new-value)
-    (gtk-container-add (id self) (id kid)))
-  #+clisp (call-next-method))
+    (gtk-container-add (id self) (id kid))))
diff --git a/cells-gtk/menus.lisp b/cells-gtk/menus.lisp
index b731b6c..bcfabf1 100644
--- a/cells-gtk/menus.lisp
+++ b/cells-gtk/menus.lisp
@@ -160,8 +160,7 @@
   (assert-bin self)
   (when new-value
     (dolist (kid new-value)
-      (gtk-container-add (id self) (id kid))))
-  #+clisp (call-next-method))
+      (gtk-container-add (id self) (id kid)))))
 
 (def-widget separator-tool-item (tool-item)
   ()
@@ -202,8 +201,7 @@
 (defobserver .kids ((self menu-shell))  
   (when new-value
     (dolist (kid new-value)
-      (gtk-menu-shell-append (id self) (id kid))))
-  #+clisp (call-next-method))
+      (gtk-menu-shell-append (id self) (id kid)))))
 
 (def-widget menu-bar (menu-shell)
   () () ())
@@ -295,8 +293,7 @@
 (defobserver .value ((self radio-menu-item))
   (with-integrity (:change 'radio-menu-item-value)
    (when (and new-value (upper self menu-item))
-     (setf (value (upper self menu-item)) (md-name self))))
-  #+clisp (call-next-method))
+     (setf (value (upper self menu-item)) (md-name self)))))
 
 (def-widget image-menu-item (menu-item)
   ((stock :accessor stock :initarg :stock :initform nil)
diff --git a/cells-gtk/widgets.lisp b/cells-gtk/widgets.lisp
index 9716cd4..b74816f 100644
--- a/cells-gtk/widgets.lisp
+++ b/cells-gtk/widgets.lisp
@@ -473,8 +473,7 @@
   (dolist (kid new-value)
     ;    (when *gtk-debug* (format t "~% window ~A has kid ~A" self kid))
     (when *gtk-debug* (trc "WINDOW ADD KID" (md-name self) (md-name kid)) (force-output))
-    (gtk-container-add (id self) (id kid)))
-  #+clisp (call-next-method))
+    (gtk-container-add (id self) (id kid))))
 
 (def-widget event-box (container)
   ((visible-window :accessor visible-window :initarg :visible-window :initform nil))
@@ -488,8 +487,7 @@
 (defobserver .kids ((self event-box))
   (assert-bin self)
   (when new-value
-    (gtk-container-add (id self) (id (first new-value))))
-  #+clisp (call-next-method))
+    (gtk-container-add (id self) (id (first new-value)))))
 
 (declaim (inline widget-id))
 (defun widget-id (widget)
-- 
1.5.5.3

>From d4febfc0c503e84d2793f99aca92c492d8c8a5eb Mon Sep 17 00:00:00 2001
From: Ingo Bormuth <[EMAIL PROTECTED]>
Date: Fri, 30 May 2008 20:54:13 +0200
Subject: [PATCH] In cells3 'def-c-output' was renamed to 'defobserver'.

---
 cells-gtk/actions.lisp  |   16 ++++++++--------
 cells-gtk/callback.lisp |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/cells-gtk/actions.lisp b/cells-gtk/actions.lisp
index f280a4e..6df5b60 100644
--- a/cells-gtk/actions.lisp
+++ b/cells-gtk/actions.lisp
@@ -14,17 +14,17 @@
   ()
   :new-args (c_1 (list (name self) nil nil (stock-id self))))
 
-(def-c-output visible ((self action))
+(defobserver visible ((self action))
   (gtk-ffi::gtk-object-set-property (id self) "visible" 'boolean new-value))
-(def-c-output sensitive ((self action))
+(defobserver sensitive ((self action))
   (gtk-ffi::gtk-object-set-property (id self) "sensitive" 'boolean new-value))
 
-(def-c-output label ((self action))
+(defobserver label ((self action))
   (when new-value
     (gtk-ffi::with-gtk-string (str new-value)
       (gtk-ffi::gtk-object-set-property (id self) "label" 'c-pointer str))))
 
-(def-c-output tooltip ((self action))
+(defobserver tooltip ((self action))
   (when new-value
     (gtk-ffi::with-gtk-string (str new-value)      
       (gtk-ffi::gtk-object-set-property (id self) "tooltip" 'c-pointer str))))
@@ -37,13 +37,13 @@
   ()
   :new-args (c_1 (list (name self))))
 
-(def-c-output sensitive ((self action-group))
+(defobserver sensitive ((self action-group))
   (gtk-ffi::gtk-action-group-set-sensitive (id self) new-value))
 
-(def-c-output visible ((self action-group))
+(defobserver visible ((self action-group))
   (gtk-ffi::gtk-action-group-set-visible (id self) new-value))
 
-(def-c-output .kids ((self action-group))
+(defobserver .kids ((self action-group))
   (dolist (kid old-value)
     (gtk-ffi::gtk-action-group-remove-action (id self) (id kid)))
   (dolist (kid new-value)
@@ -55,7 +55,7 @@
   ()
   ())
 
-(def-c-output tearoffs ((self ui-manager))
+(defobserver tearoffs ((self ui-manager))
   (gtk-ffi::gtk-ui-manager-set-add-tearoffs (id self) new-value))
 
 (defmethod add-action-group ((self ui-manager) (group action-group) &optional pos)
diff --git a/cells-gtk/callback.lisp b/cells-gtk/callback.lisp
index 7376975..0029786 100644
--- a/cells-gtk/callback.lisp
+++ b/cells-gtk/callback.lisp
@@ -29,7 +29,7 @@
   (format nil "gtk_server_connect(~A, ~A, :callback ~A)"
 	  (id self) event (register-callback self event fn)))
 
-(def-c-output bindings () ;;; (w widget) event fun)
+(defobserver bindings () ;;; (w widget) event fun)
   (loop for binding in new-value
         do (destructuring-bind (event . fn) binding
              (declare (ignorable event))
-- 
1.5.5.3

>From 9eb05799b53279e1364048ddb9be59b05df37997 Mon Sep 17 00:00:00 2001
From: Ingo Bormuth <[EMAIL PROTECTED]>
Date: Sun, 1 Jun 2008 04:49:21 +0200
Subject: [PATCH] Inactivate optional stuff by default.

You can activate them before depending on
'cells-get' just as 'test-gtk.asd' does.
---
 cells-gtk/cells-gtk.asd         |    6 +++---
 cells-gtk/test-gtk/test-gtk.asd |    6 +++---
 gtk-ffi/gtk-ffi.asd             |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cells-gtk/cells-gtk.asd b/cells-gtk/cells-gtk.asd
index 996ed55..8d08815 100644
--- a/cells-gtk/cells-gtk.asd
+++ b/cells-gtk/cells-gtk.asd
@@ -11,13 +11,13 @@
 ;;;
 
 ;;; run gtk in its own thread (requires bordeaux-threads)
-(pushnew :cells-gtk-threads *features*)
+;;(pushnew :cells-gtk-threads *features*)
 
 ;;; drawing-area widget using cairo (requires cl-cairo2)
-(pushnew :cells-gtk-cairo *features*)
+;;(pushnew :cells-gtk-cairo *features*)
 
 ;;; drawing-area widget using OpenGL (requires libgtkglext1)
-(pushnew :cells-gtk-opengl *features*)
+;;(pushnew :cells-gtk-opengl *features*)
 
 (asdf:defsystem :cells-gtk
   :name "cells-gtk"
diff --git a/cells-gtk/test-gtk/test-gtk.asd b/cells-gtk/test-gtk/test-gtk.asd
index 46ec071..4bdb2b7 100644
--- a/cells-gtk/test-gtk/test-gtk.asd
+++ b/cells-gtk/test-gtk/test-gtk.asd
@@ -3,11 +3,11 @@
 ;;; run gtk in its own thread (requires bordeaux-threads)
 (pushnew :cells-gtk-threads *features*)
 
-;;; drawing-area widget using cairo (requires cl-cairo2)
+;;; drawing-area widget using cairo 
+;;; (requires cl-cairo2, libgtkglext1 and libcellsgtk)
 (pushnew :cells-gtk-cairo *features*)
-
-;;; drawing-area widget using OpenGL (requires libgtkglext1)
 (pushnew :cells-gtk-opengl *features*)
+(pushnew :libcellsgtk *features*)
 
 
 (asdf:defsystem :test-gtk
diff --git a/gtk-ffi/gtk-ffi.asd b/gtk-ffi/gtk-ffi.asd
index f8e07d1..4c507fa 100644
--- a/gtk-ffi/gtk-ffi.asd
+++ b/gtk-ffi/gtk-ffi.asd
@@ -9,7 +9,7 @@
 ;;; Step 2 -- If you built or downloaded the libcellsgtk library, uncomment the next line.
 
 ;;; features
-(pushnew :libcellsgtk *features*)
+;;(pushnew :libcellsgtk *features*)
 
 (asdf:defsystem :gtk-ffi
   :name "gtk-ffi"
-- 
1.5.5.3

_______________________________________________
cells-gtk-devel site list
cells-gtk-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/cells-gtk-devel

Reply via email to