From 3aac876ec530d646852acfd28ed60de0b50a3371 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Sat, 31 Aug 2013 01:09:23 +0200 Subject: [PATCH] Move registration before first type query. Fixes warnings, but may not be completely correct. --- gtk-glext/gtkglext-drawing-area.lisp | 4 ++-- gtk/gtk.tree-model.lisp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk-glext/gtkglext-drawing-area.lisp b/gtk-glext/gtkglext-drawing-area.lisp index 65996e1..dcfd9ce 100644 --- a/gtk-glext/gtkglext-drawing-area.lisp +++ b/gtk-glext/gtkglext-drawing-area.lisp @@ -1,5 +1,7 @@ (in-package :gtkglext) +(register-object-type-implementation "GtkGLDrawingArea" gl-drawing-area "GtkDrawingArea" nil nil) + (defclass gl-drawing-area (drawing-area) ((on-expose :initarg :on-expose :initform nil :accessor gl-drawing-area-on-expose) (on-init :initarg :on-init :initform nil :accessor gl-drawing-area-on-init) @@ -62,8 +64,6 @@ :rgba-type) (warn "set gl capability for ~A (with ~A) failed~%" widget *gl-config*))) -(register-object-type-implementation "GtkGLDrawingArea" gl-drawing-area "GtkDrawingArea" nil nil) - (defmethod initialize-instance :after ((widget gl-drawing-area) &key &allow-other-keys) (connect-signal widget "realize" #'gl-drawing-area-realize) (connect-signal widget "unrealize" #'gl-drawing-area-unrealize) diff --git a/gtk/gtk.tree-model.lisp b/gtk/gtk.tree-model.lisp index edbcbd1..6b630d8 100644 --- a/gtk/gtk.tree-model.lisp +++ b/gtk/gtk.tree-model.lisp @@ -134,6 +134,8 @@ ; TODO: GtkTreeModelFilter +(register-object-type-implementation "LispArrayListStore" array-list-store "GObject" ("GtkTreeModel") nil) + (defclass array-list-store (tree-model) ((items :initform (make-array 0 :adjustable t :fill-pointer t) :reader store-items) (columns-getters :initform (make-array 0 :adjustable t :fill-pointer t) :reader store-getters) @@ -143,8 +145,6 @@ (export 'array-list-store) -(register-object-type-implementation "LispArrayListStore" array-list-store "GObject" ("GtkTreeModel") nil) - (defun store-items-count (store) (length (store-items store))) @@ -445,6 +445,8 @@ (item nil) (children (make-array 0 :element-type 'tree-node :adjustable t :fill-pointer t))) +(register-object-type-implementation "LispTreeStore" tree-lisp-store "GObject" ("GtkTreeModel") nil) + (defclass tree-lisp-store (tree-model) ((columns-getters :initform (make-array 0 :adjustable t :fill-pointer t) :reader tree-lisp-store-getters) (columns-types :initform (make-array 0 :adjustable t :fill-pointer t) :reader tree-lisp-store-types) @@ -457,8 +459,6 @@ (defmethod initialize-instance :after ((object tree-lisp-store) &key &allow-other-keys) (setf (tree-node-tree (tree-lisp-store-root object)) object)) -(register-object-type-implementation "LispTreeStore" tree-lisp-store "GObject" ("GtkTreeModel") nil) - (defun map-subtree (node fn) (funcall fn node) (iter (for child in-vector (tree-node-children node)) -- 1.7.10.4