https://github.com/virtuald/pygi-composite-templates
An implementation of GTK3 composite templates for PyGI
https://github.com/virtuald/pygi-composite-templates
Last synced: 3 months ago
JSON representation
An implementation of GTK3 composite templates for PyGI
- Host: GitHub
- URL: https://github.com/virtuald/pygi-composite-templates
- Owner: virtuald
- License: lgpl-2.1
- Created: 2015-05-17T23:16:12.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T00:16:24.000Z (about 9 years ago)
- Last Synced: 2025-09-15T18:52:02.296Z (9 months ago)
- Language: Python
- Size: 26.4 KB
- Stars: 18
- Watchers: 4
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
pygi-composite-templates
========================
A prototype implementation of Gtk+ composite widget templates for PyGI. This library
will allow you to declare a composite widget, and mark particular properties
as widgets or methods as signals that are declared in a GtkBuilder XML file
created with glade. Usage of this functionality reduces the amount of
boilerplate required to create a composite widget when using Python/GTK3
This implementation was developed for the `Exaile audio player `_
to help us as we move to GTK3. I'm still feeling this out to see what bugs
come up, so please provide feedback!
This implementation was inspired by this `blog post `_
and some comments on it, though I should point out that several years ago I
independently created something that was `very similar for PyGTK `_.
There is a `bug open at GTK's bugzilla `_
to get composite widget templates implemented in PyGI (it's been open for
awhile, I created this implementation before I realized it existed).
Ideally, this will get integrated into PyGI itself and will no longer be
necessary. Until then, if you find a bug, please report it or submit a
pull request on github!
Requirements
============
* Currently only tested on Linux, GTK 3.14, and Python 2.7.
* Composite templates requires GTK 3.10 or greater
* PyGObject 3.13.2 or greater
Installation
============
This project is easily installed via pip:
pip install pygi-composite-templates
Usage
=====
See `examples` on the github repo for simple yet complete examples. There are
two examples, one using a ui file embedded in a GResource, and the other using
local file paths.
Author
======
Dustin Spicuzza (dustin@virtualroadside.com)
License
=======
LGPL 2.1+ (Same as PyGI)