GNOME Bugzilla – Bug 135979
Enum GType support
Last modified: 2011-01-16 23:36:24 UTC
Because gmmproc does not generate Glib::Value<>::value_type() stuff right, I have hand-coded them (it wasn't hard). Here is an example of what gmmproc generates without the NO_GTYPE keyword at the end of the _WRAP_ENUM() macro: In the .h file (this is correct): #ifndef DOXYGEN_SHOULD_SKIP_THIS namespace Glib { template <> class Value<Gnome::Vfs::FileInfoOptions> : public Glib::Value_Flags<Gnome::Vfs::FileInfoOptions> { public: static GType value_type() G_GNUC_CONST; }; } // namespace Glib #endif /* DOXYGEN_SHOULD_SKIP_THIS */ in the .cc file (this is not correct): // static GType Glib::Value<Gnome::Vfs::FileInfoOptions>::value_type() { return gnome_vf_sfile_info_options_get_type(); } this is because of the _GET_TYPE_FUNC() m4 macro that is defined in base.m4 (line 124) of gmmproc. Maybe we can override that in vfsmm, but I'm not sure. Anyway, here's the patch with the hand-coded Glib::Value<> stuff.
Created attachment 25049 [details] [review] enum-gtype.patch
Thanks. I have committed this, with //TODO comments for later.