Re: 'color-activated' signal not emitting


On 25 July 2016 at 13:47, Craig Cabrey <craigcabrey gmail com> wrote:

Not really. The documentation says:

Emitted when a color is activated from the color chooser. This usually
when the user clicks a color swatch, or a color is selected and the user
one of the keys Space, Shift+Space, Return or Enter.

i.e. you need to activate the color, just like you'd activate a widget
or a menu item.

That seems confusing to me. The way its written (or rather, the way I'm
reading it) implies the signal will be emitted on any color change

Nope. The term "activated" has a fairly specific meaning, in GTK+, and
it usually refers to the behaviour of widgets with regards to keyboard
interaction. See, for instance:

In your case, you're using the color editor, which does not have
"activatable" parts.

However, using the "notify" signal seems to work as well,
although the signal is emitted a few times on startup that I'll have to

The `notify` signal is emitted every time a property changes; if you
use `notify::rgba` signal you'll, thus, be notified every time the
`rgba` property changes to a different value.

In general, GTK+ uses ::changed signals on classes where multiple
properties can change at the same time, or if what changes is not
mapped to a property at all; if there are readable properties, it's
much easier to get notification of changes straight from them.


[@] ebassi []

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