Bug 19171 - [GTK] GTypes for enumeration
: [GTK] GTypes for enumeration
Status: RESOLVED FIXED
: WebKit
WebKit Gtk
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
: 16562
  Show dependency treegraph
 
Reported: 2008-05-21 11:53 PST by
Modified: 2008-06-18 04:38 PST (History)


Attachments
Generate webkit-enum-types.h and .cpp (4.83 KB, patch)
2008-05-21 12:05 PST, Marco Barisione
no flags Review Patch | Details | Formatted Diff | Diff
Generate webkit-enum-types.h and .cpp (4.91 KB, patch)
2008-06-12 11:15 PST, Marco Barisione
alp: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-05-21 11:53:23 PST
WebKit doesn't have gobject types for enums, so they cannot be used as properties.
------- Comment #1 From 2008-05-21 12:05:07 PST -------
Created an attachment (id=21273) [details]
Generate webkit-enum-types.h and .cpp
------- Comment #2 From 2008-05-22 06:21:56 PST -------
*** Bug 16119 has been marked as a duplicate of this bug. ***
------- Comment #3 From 2008-05-29 06:30:54 PST -------
Rather than using sed, is it better to use /*< underscore_name=foo >*/ in beside the enum decl?
------- Comment #4 From 2008-06-06 13:42:51 PST -------
(From update of attachment 21273 [details])
Um.  I have no clue if this is right or not.  Looks sane to me, but someone from GTK land should review.
------- Comment #5 From 2008-06-12 08:09:05 PST -------
(In reply to comment #3)
> Rather than using sed, is it better to use /*< underscore_name=foo >*/ in
> beside the enum decl?

I didn't know of its existence and on #gnome-hackers everyone suggested to use sed. What I don't like of underscore_name is that you have to remember to put it everywhere and if you forget it you will probably realise the error only when someone will start using a WebKit enum type for a property.

What do you prefer: the clean and error prone way or the ugly but working one? ;)
------- Comment #6 From 2008-06-12 08:16:21 PST -------
Working is good =)
------- Comment #7 From 2008-06-12 11:15:25 PST -------
Created an attachment (id=21663) [details]
Generate webkit-enum-types.h and .cpp

Same patch but that doesn't break out-of-tree builds.
------- Comment #8 From 2008-06-17 08:46:23 PST -------
(From update of attachment 21663 [details])
Please keep an eye on the bot when landing this to avoid build breakage.
------- Comment #9 From 2008-06-18 04:38:58 PST -------
Landed in r34646