GNOME Bugzilla – Bug 610615
Improve enum support in gobject profile
Last modified: 2018-05-22 13:29:22 UTC
Created attachment 154326 [details] [review] improve enum gtype support Hello, this bug is here to cover two missing features for enum gtypes. 1) 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. 2) 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().
Why not just properties "name" and "nick"?
(In reply to comment #1) > Why not just properties "name" and "nick"? For me it's the same. You have to decide :)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/74.