fix-ink-widgets set-fix-ink-widgets!
fix-ink-remove!
- <text-ink> set-text-ink-position!
+ <text-ink> text-ink? set-text-ink-position!
<simple-text-ink> simple-text-ink? make-simple-text-ink
simple-text-ink-text set-simple-text-ink-text!
(parse-geometry
geometry
(lambda (width height x y)
- ;; Set-screen-size! will not work here.
+ (declare (ignore x y))
+ ;; For make-editor-frame:
(set-screen-x-size! screen width)
(set-screen-y-size! screen height)
(let ((toplevel (gtk-screen-toplevel screen)))
- ;; This allows the luser to resize to smaller than the logical size.
+ ;; This allows the user to resize to smaller sizes.
(gtk-window-set-geometry-hints toplevel toplevel
'min-width 100 'min-height 100)))))
widget)
(define-method gtk-object-destroy-callback ((widget <text-widget>))
+ ;; NOTE that this callback can be called before a widget is realized(!).
(call-next-method widget)
(let ((cursor (text-widget-cursor-ink widget)))
(if cursor
- (begin
+ (let ((mark (cursor-ink-point cursor)))
(fix-ink-remove! cursor)
- (mark-temporary! (cursor-ink-point cursor)))))
- (gobject-unref!
- (text-ink-pango-layout
- (car (fix-drawing-display-list (text-widget-override-drawing widget))))))
+ (if mark (mark-temporary! mark)))))
+ (and-let* ((drawing (text-widget-override-drawing widget))
+ (ink (car (fix-drawing-display-list drawing)))
+ ((text-ink? ink))
+ (layout (text-ink-pango-layout ink)))
+ (gobject-unref! layout))
+ unspecific)
(define-method fix-layout-realize-callback ((widget <text-widget>))
(%trace ";(fix-layout-realize-callback <text-widget>) "widget"\n")