GNOME Bugzilla – Bug 567788
Make EvJobPriority a proper GType
Last modified: 2009-01-18 16:01:44 UTC
Need it to be a GType so it can be used by language bindings like python.
Created attachment 126447 [details] [review] first try
Why not use glib-mkenums for this?
Created attachment 126522 [details] [review] use glib-mkenums
+ --vtail "GType\n@enum_name@_get_type (void)\n{\n" \ + --vtail " static GType type = 0;\n\n" \ + --vtail " if (G_UNLIKELY (type == 0))\n" \ That's still using the wrong get_type function code, instead of g_once_*. You can copy for example from gucharmap (gucharmap/gucharmap-type-builtins.[ch].template + gucharmap/Makefile.am) for the right form.
Created attachment 126696 [details] [review] base use of glib-mkenums on gucharmap
Applied to svn trunk (r3353) slightly modified, though (added G_GNUC_CONST and moved ev-job-scheduler.h to the .c template using @filename@) Thanks.