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 135979 - Enum GType support
Enum GType support
Status: RESOLVED FIXED
Product: gnome-vfsmm
Classification: Deprecated
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-03-02 16:09 UTC by Bryan Forbes
Modified: 2011-01-16 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
enum-gtype.patch (10.95 KB, patch)
2004-03-02 16:10 UTC, Bryan Forbes
none Details | Review

Description Bryan Forbes 2004-03-02 16:09:50 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.
Comment 1 Bryan Forbes 2004-03-02 16:10:19 UTC
Created attachment 25049 [details] [review]
enum-gtype.patch
Comment 2 Murray Cumming 2004-03-28 11:52:23 UTC
Thanks. I have committed this, with //TODO comments for later.