Web lists-archives.com

Re: 'color-activated' signal not emitting




Hi,

Thanks for your responses.

On Mon, Jul 25, 2016 at 6:15 AM, Emmanuele Bassi <ebassi@xxxxxxxxx> wrote:
Hi;

On 23 July 2016 at 21:25, Craig Cabrey <craigcabrey@xxxxxxxxx> wrote:
> According to the docs [0], the "color-activated" signal is emitted upon
> the user making any changes to the current color.

Not really. The documentation says:

"""
Emitted when a color is activated from the color chooser. This usually happens
when the user clicks a color swatch, or a color is selected and the user presses
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 ("activated"). 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 ignore.
 

> I'm having trouble with this signal in two scenarios:
>
> 1) When a GtkColorChooserWidget is inside of a GtkPopover [1, 2]
> 2) When a GtkColorChooserWidget is inside of a GtkWindow [3, 4]
>
> I am not sure if I'm using GtkBuilder, signals, or pygobject
> incorrectly. The signal is being picked up correctly, because
> when I comment it out, GtkBuilder complains. However, even
> when I change a color, nothing is fired (and yes, I put a quick
> print statement in as a sanity check).

Can you create a small, self-contained test case that reproduces the
behaviour you experience, so that we don't have to clone, build, and
run a whole application?

I through together a standalone Python3 script really quick, hopefully this works for you.

https://gist.github.com/craigcabrey/367eb0b411c0ffb3c4851f6dcd921837


Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list