guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gtk.notebook example


From: Max
Subject: Re: gtk.notebook example
Date: Sat, 26 Apr 2014 18:09:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

25.04.2014 19:19, Patrick Bernaud пишет:
> No missing module. Instead see the remark in my last message for the
> keyword read syntaxes (and the related section in Guile Reference
> Manual).

Ah, got that, thank you. It's not very obvious from the error message :)

> Also the code does not (directly) require anything from 'gnome
> gobject', 'gnome glib' and 'gnome gobject utils' so you can trim them
> out of the 'use-modules'.

Speaking of which - is guile-gnome-2 smart enough to do such trivial 
optimization by
itself?

And for the sake of completeness, here is the code which works for me:

(use-modules (oop goops) (gnome gobject) (gnome glib) (gnome gtk) (gnome 
gobject utils))

(define notebook (make <gtk-notebook> #:enable-popup #t #:scrollable #t))

(define (make-scrolled)
  (make <gtk-scrolled-window>
    #:hscrollbar-policy 'automatic
    #:vscrollbar-policy 'automatic))

(define (hello)
  (let* ((window (make <gtk-window> #:type 'toplevel))
     (child1 (make-scrolled))
     (child2 (make-scrolled)))
    (set-border-width window 10)
    (add window notebook)
    (append-page notebook child1
         (make <gtk-label> #:label "LOL1" #:use-underline #t))
    (append-page-menu notebook child2
         (make <gtk-label> #:label "LOL2" #:use-underline #t) (make <gtk-label>
#:label "menuLOL"))
    (show-all window)
    (gtk-main)))

(hello)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]