After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610615 - Improve enum support in gobject profile
Improve enum support in gobject profile
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: general
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-21 16:16 UTC by Luca Bruno
Modified: 2018-05-22 13:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
improve enum gtype support (3.48 KB, patch)
2010-02-21 16:16 UTC, Luca Bruno
none Details | Review

Description Luca Bruno 2010-02-21 16:16:37 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().
Comment 1 Marc-Andre Lureau 2010-02-22 08:54:24 UTC
Why not just properties "name" and "nick"?
Comment 2 Luca Bruno 2010-02-23 14:06:20 UTC
(In reply to comment #1)
> Why not just properties "name" and "nick"?

For me it's the same. You have to decide :)
Comment 3 GNOME Infrastructure Team 2018-05-22 13:29:22 UTC
-- 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.