mirror of
https://github.com/libratbag/piper.git
synced 2026-04-21 06:47:50 -04:00
In C/GTK+, templates allow one to define the UI in .ui files, from which implementations can be instantiated. This significantly reduces boilerplate code that creates widgets, sets their desired properties and connects their signals[1, 2]. For several reasons, this does not work in Python[3]. gi_composites.py[4] is an implementation in Python that does make this work. It's been used by several projects for a few months now and none report issues. See the project's README for more information[5]. Taking these facts into mind, let's experiment for a bit and see how it can serve Piper. [1]: https://wiki.gnome.org/HowDoI/CustomWidgets#Templates [2]: https://blogs.gnome.org/tvb/2013/04/09/announcing-composite-widget-templates/ [3]: https://bugzilla.gnome.org/show_bug.cgi?id=701843 [4]: https://github.com/virtuald/pygi-composite-templates/ [5]: https://github.com/virtuald/pygi-composite-templates/blob/master/README.rst