GNOME Bugzilla – Bug 693099
Enum methods missing
Last modified: 2014-01-07 01:39:48 UTC
> self.assertEqual(Gtk.IconSize.from_name("gtk-menu"), 1) > self.assertEqual(Gtk.IconSize.get_name(2), "gtk-small-toolbar") > self.assertEqual(Gtk.IconSize.lookup(1), (True, 16, 16)) The following methods are also available under "Gtk.icon_size_from_name", but the versions above are in the gir and seem clearer. Since the enum class is a subtype of int, this would need name escaping to avoid conflicts.
Agreed. Your attention to detail is appreciated. > Since the enum class is a subtype of int, this would need name escaping to > avoid conflicts. I consider this somewhat of an implementation detail which gives us bitwise operators for free and an easy way to marshal the values. So I don't think we need to worry about method name conflicts in this sense.
Incredibly trivial fix for once.
https://git.gnome.org/browse/pygobject/commit/?id=43b35b1