Add support for other types for GObject.Property
It would be cool to add support for other Python types for @GObject.Property(type=int)
, for example something like @GObject.Property(type=tuple)
, so later I could change two value at once.
Rationale: I have a set of thumbnails, and want to change their sizes (width and height) at once. If there is no tuple
support for property, my logic becomes:
- Change
thumbnail-width
property which iterates over all thumbnails and regenerate them accordingly (with old height) - Change
thumbnail-height
property which iterates over all thumbnails and regenerate them accordingly (with new width)
Which leads two twice of unneeded work. But I could do that at once with thumbnail.set_size_request(100, 100)
.
As I understood from GTK documentation https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-class-install-properties that should be possible.
Example: left bottom GtkScale is used to change thumbnail sizes.