Improve enum support in gobject profile
Submitted by Luca Bruno
Link to original bug (#610615)
Description
Created attachment 154326 improve enum gtype support
Hello, this bug is here to cover two missing features for enum gtypes.
- Currently to get the EnumClass of an enum you have to (EnumClass)typeof(YourEnum).class_ref(). By Jurg suggestion, it would be nice to have a YourEnum.class field that holds the EnumClass.
- EnumValue has value_name and value_nick. Currently doing YourEnum.SOMETHING.to_string() will use value_name. So I'd like to suggest a to_nick() method too. Why to_nick? I think even it can sound weird, it means you're casting to a string containing the nick. So to_nick is like to_nick_string or such. Otherwise I'd break to_string to rename it in get_name() and get_nick().
Patch 154326, "improve enum gtype support":
0001-Improve-GObject-enums-support.patch
Version: 0.7.x