public inbox for
 help / color / mirror / Atom feed
* GtkAdjustment setters
@ 2002-12-29 14:06 Kevin Ryde
  2003-01-02 23:54 ` Daniel Skarda
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2002-12-29 14:06 UTC (permalink / raw)
  To: guile-gtk

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

It'd be nice if there were setters for the GtkAdjustment fields.  If I
read the gtk doco right, it's normal for a program to mung them and
call gtk_adjustment_changed when wanting a new page size or whatever.

For the value field I guess there's gtk_adjustment_set_value, so
perhaps there's no need to directly set that, but apparently it's
valid to do so and later call gtk_adjustment_value_changed.

I get some joy from the diff below, if this is the right way to go
about it.

        * gtk-1.2.defs (GtkAdjustment): Add setters for the fields.

[-- Attachment #2: gtk-1.2.defs.adjustment-setter.diff --]
[-- Type: text/plain, Size: 606 bytes --]

--- gtk-1.2.defs.~1.5.~	2002-12-08 04:41:47.000000000 +1000
+++ gtk-1.2.defs	2002-12-29 13:24:19.000000000 +1000
@@ -1085,12 +1085,12 @@
 (define-object GtkAdjustment (GtkData)
-   (float value)
-   (float lower)
-   (float upper)
-   (float step_increment)
-   (float page_increment)
-   (float page_size)))
+   (float value          (setter #t))
+   (float lower          (setter #t))
+   (float upper          (setter #t))
+   (float step_increment (setter #t))
+   (float page_increment (setter #t))
+   (float page_size      (setter #t))))
 (define-func gtk_adjustment_new

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GtkAdjustment setters
  2002-12-29 14:06 GtkAdjustment setters Kevin Ryde
@ 2003-01-02 23:54 ` Daniel Skarda
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Skarda @ 2003-01-02 23:54 UTC (permalink / raw)
  To: guile-gtk; +Cc: Kevin Ryde


  thank you for your patch - I am going to commit it to CVS in few minutes
(unfortunately I am working offline, so maybe somebody already did it).

  There is only one issue I do not like about the patch - it creates a setter
gtk-adjustment-set-value!, while we already have gtk-adjustment-set-value
(without exclamation mark) binding for Gtk function. 

  Moreover, exclamation marks are not used in guile-gtk at all (so ! in
gtk-adjustment setters could be unwanted surprise to guile-gtk users) - but this
is not problem of your patch but it is more guile-gtk problem.

  So I removed *-set-value! setter from your patch in favour of Gtk *-set-value


ps: BTW - it is strange that "setter" feature has not been used. I am afraid which
Gtk features does not have their GuileGtk companions yet... It seems we have to
check it very soon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-02 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-29 14:06 GtkAdjustment setters Kevin Ryde
2003-01-02 23:54 ` Daniel Skarda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).