using GtkSpinButton "input" signal in Python segfaults program
Here is an example to demonstrate the problem:
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import re
def spin_input (spinbutton, input):
print (input, "input")
def spin_output (spinbutton):
value = spinbutton.get_value()
print (value, "output")
spinbutton.set_text("Example " + str(value))
return True
window = Gtk.Window()
window.connect("delete-event", Gtk.main_quit)
spin = Gtk.SpinButton.new_with_range(0, 100, 1)
spin.set_numeric(False)
spin.connect ("input", spin_input)
#spin.connect ("output", spin_output)
window.add(spin)
window.show_all()
Gtk.main()
The original bug report is here, and got closed (when Gtk moved to GitLab, possibly?). The output signal does work, but since the input doesn't, both are really unusable.
The old PyGtk version of spinbutton input can be found here.