Fix generation of enum types

This commit is contained in:
Sebastian Dröge 2009-05-28 11:04:59 +02:00
parent ae346c8e03
commit 8d7ee5cb44

View file

@ -298,7 +298,8 @@ public class ElementGen {
} else if (managed_type == null) {
pinfo.enuminfo.name = pinfo.type;
enums.Add (pinfo.enuminfo);
managed_type = pinfo.type.StartsWith ("Gst") ? pinfo.type.Substring (3) : pinfo.type;
managed_type = pinfo.type.StartsWith (ei.gtype_name) ? pinfo.type.Substring (ei.gtype_name.Length) : pinfo.type.StartsWith ("Gst") ? pinfo.type.Substring (3) : pinfo.type;
managed_type += "Type";
}
writer.WriteLine ("\t\t[GLib.Property (\"" + pinfo.name + "\")]");
@ -415,6 +416,8 @@ public class ElementGen {
string enum_name = eni.name.StartsWith (ei.gtype_name) ? eni.name.Substring (ei.gtype_name.Length) : eni.name.StartsWith ("Gst") ? eni.name.Substring (3) : eni.name;
enum_name += "Type";
writer.WriteLine ("\t\tpublic enum " + enum_name + " {");
if (eni.flag) {
foreach (FlagValue ev in eni.values) {