mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
Fix generation of enum types
This commit is contained in:
parent
ae346c8e03
commit
8d7ee5cb44
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue