Gtk.ColorButton with signal set-color being called twice?
- From: rsm <admin rsm website>
- To: gtk-app-devel-list gnome org
- Subject: Gtk.ColorButton with signal set-color being called twice?
- Date: Tue, 29 Dec 2015 22:22:58 +0100
Hello,
I recently discovered that a bug of one my programs was due to the fact
of the `set-color` signal being called
twice in a ColorButton.
Since I wasn't sure if I was doing something wrong I took a minimal code
from learngtk.org and made a test..
#!/usr/bin/env python3 #
http://learngtk.org/tutorials/python_gtk3_tutorial/html/colorbutton.html
from gi.repository import Gtk def color_set(colorbutton): color =
colorbutton.get_rgba() red = (color.red * 255) green = (color.green *
255) blue = (color.blue * 255) print("Hex: #%02x%02x%02x" % (red, green,
blue)) window = Gtk.Window() window.connect("destroy", lambda q:
Gtk.main_quit()) colorbutton = Gtk.ColorButton()
colorbutton.connect("color-set", color_set) window.add(colorbutton)
window.show_all() Gtk.main() And it seems that even with this code, the
signal is being called twice. Is this a Bug?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]