diff --git a/ChangeLog b/ChangeLog index f3aa196dc..d6763f18e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-18 Mike Kestner + + * generator/StructBase.cs (GenCtor): StudCapsify static method names. + * generator/SymbolTable.cs (Trim): strip const- prefix. + * sample/ButtonApp.cs (Window_delete): handle RetVal. + 2002-02-17 Mike Kestner * generator/StructBase.cs (MangleName): add object and event. diff --git a/generator/StructBase.cs b/generator/StructBase.cs index e97ac177f..148b5c40c 100644 --- a/generator/StructBase.cs +++ b/generator/StructBase.cs @@ -81,7 +81,12 @@ namespace GtkSharp.Generation { if (clash) { String mname = cname.Substring(cname.IndexOf("new")); - // mname = Regex.Replace(mname, "_(\\w)", "\\u\\1"); + mname = mname.Substring(0,1).ToUpper() + mname.Substring(1); + int idx; + while ((idx = mname.IndexOf("_")) > 0) { + mname = mname.Substring(0, idx) + mname.Substring(idx+1, 1).ToUpper() + mname.Substring(idx+2); + } + sw.WriteLine("\t\tpublic static " + Name + " " + mname + sig); sw.WriteLine("\t\t{"); sw.WriteLine("\t\t\treturn new " + Name + "(" + cname + call + ");"); diff --git a/generator/SymbolTable.cs b/generator/SymbolTable.cs index 1abe75206..f6d143283 100644 --- a/generator/SymbolTable.cs +++ b/generator/SymbolTable.cs @@ -93,6 +93,7 @@ namespace GtkSharp.Generation { { char[] ast = {'*'}; String trim_type = type.TrimEnd(ast); + if (trim_type.StartsWith("const-")) return trim_type.Substring(6); return trim_type; } diff --git a/sample/ButtonApp.cs b/sample/ButtonApp.cs index 939968a91..5d0a7f306 100755 --- a/sample/ButtonApp.cs +++ b/sample/ButtonApp.cs @@ -7,6 +7,7 @@ namespace GtkSamples { using Gtk; + using GtkSharp; using System; using System.Drawing; @@ -33,7 +34,9 @@ namespace GtkSamples { static void Window_Delete (object obj, EventArgs args) { + SignalArgs sa = (SignalArgs) args; Application.Quit (); + sa.RetVal = true; } }