This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gtk-color-selection-get-color opacity


I noticed gtk-color-selection-get/set-color don't take into account
the opacity array element which the C functions expect (when enabled
in the widget).

        * gtk-compat.c (gtk_color_selection_set_color_interp): Don't change
        opacity, when in use.
        (gtk_color_selection_get_color_interp): Use 4 doubles to allow for
        opacity return, but ignore that value.

Leaving the opacity unchanged in the set is what gtk 2
gtk_color_selection_set_current_color does with a GdkColor, and seems
fairly sensible.

(These guile-gtk functions are rather unfortunately named, it would
have been better for them to take/return doubles like the C functions
do, and introduce "current-color" functions operating on GdkColor like
gtk 2.  But I think it's too late to do anything about this now.
Maybe "-d" or some such name variants could be introduced to get at
the doubles.)

Attachment: gtk-compat.c.colorsel.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]