Hi,
here are some patches improving loading of glade generated files
$ diff -Naur /usr/share/common-lisp/source/clg/gtk/gtkobject.lisp
gtk/gtkobject.lisp
--- /usr/share/common-lisp/source/clg/gtk/gtkobject.lisp 2008-10-09
20:45:01.000000000 +0200
+++ gtk/gtkobject.lisp 2009-09-10 12:36:36.000000000 +0200
@@ -254,11 +254,10 @@
`(progn
,(expand-gobject-type type nil options)
,(let ((child-properties (query-container-class-child-properties type
t)))
- (when child-properties
- `(defclass ,child-class (,(default-container-child-name super))
+ `(defclass ,child-class (,(default-container-child-name super))
,(slot-definitions child-class child-properties nil)
(:metaclass container-child-class)
- (:container ,class))))))))
+ (:container ,class)))))))
(defun container-dependencies (type options)
(delete-duplicates
$ diff -Naur /usr/share/common-lisp/source/clg/glade-xml/glade-xml.lisp
glade-xml/glade-xml.lisp
--- /usr/share/common-lisp/source/clg/glade-xml/glade-xml.lisp 2008-10-09
20:45:33.000000000 +0200
+++ glade-xml/glade-xml.lisp 2009-09-10 12:13:05.000000000 +0200
@@ -157,11 +157,17 @@
(declare (ignore args))
(setf (menu-item-submenu menu-item) menu))
-
+(defun %type-from-glib-name (glib-name)
+ (handler-case (type-from-glib-name glib-name)
+ (simple-error ()
+ (register-type
+ (default-type-name glib-name)
+ (glib::register-type-as (type-number-from-glib-name glib-name)))
+ (type-from-glib-name glib-name))))
(defun build-widget (spec)
(let* ((attributes (rest (first spec)))
- (class (find-class (type-from-glib-name (getf attributes :|class|))))
+ (class (find-class (%type-from-glib-name (getf attributes :|class|))))
(id (getf attributes :|id|)))
;; Get properties and create widget
to load a some ui.glade file use commands
(require :glade-xml)
(gtk:clg-init)
(glade-xml:load-interface "ui.glade")
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]