Permalink
Browse files

Don't leak label widgets.

  • Loading branch information...
1 parent d920a74 commit 1c423f9bc933a252c38ff723c92325f651e3a4a3 @Ramarren committed Dec 28, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 cells-gtk/layout.lisp
View
@@ -116,19 +116,23 @@
(def-widget frame (container)
((shadow :accessor shadow? :initarg :shadow :initform nil)
(markup :accessor markup :initarg :markup :initform nil)
+ (markup-label-widget :accessor markup-label-widget :owning t :initarg :markup-label-widget)
(label :accessor label :initarg :label :initform (c-in nil)))
(label-widget label-align shadow-type)
()
:shadow-type (c-in nil)
- :new-args (c_1 (list nil)))
+ :new-args (c_1 (list nil))
+ :markup-label-widget (c? (when (markup self)
+ (mk-label :markup (markup self)))))
(defobserver label ((self frame))
(when new-value
(gtk-frame-set-label (id self) new-value)))
(defobserver markup ((self frame))
(when new-value
- (gtk-frame-set-label-widget (id self) (id (mk-label :markup new-value)))))
+ (with-integrity (:change 'frame-markup)
+ (setf (label-widget self) (id (markup-label-widget self))))))
(defobserver shadow ((self frame))
(when new-value

0 comments on commit 1c423f9

Please sign in to comment.