2002-02-18 Mike Kestner <mkestner@speakeasy.net>

* generator/StructBase.cs (GenCtor): StudCapsify static method names.
	* generator/SymbolTable.cs (Trim): strip const- prefix.
	* sample/ButtonApp.cs (Window_delete): handle RetVal.

svn path=/trunk/gtk-sharp/; revision=2482
This commit is contained in:
Mike Kestner 2002-02-18 19:26:33 +00:00
parent fe08134ba0
commit 179097cbf6
4 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2002-02-18 Mike Kestner <mkestner@speakeasy.net>
* 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 <mkestner@speakeasy.net> 2002-02-17 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs (MangleName): add object and event. * generator/StructBase.cs (MangleName): add object and event.

View file

@ -81,7 +81,12 @@ namespace GtkSharp.Generation {
if (clash) { if (clash) {
String mname = cname.Substring(cname.IndexOf("new")); 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\tpublic static " + Name + " " + mname + sig);
sw.WriteLine("\t\t{"); sw.WriteLine("\t\t{");
sw.WriteLine("\t\t\treturn new " + Name + "(" + cname + call + ");"); sw.WriteLine("\t\t\treturn new " + Name + "(" + cname + call + ");");

View file

@ -93,6 +93,7 @@ namespace GtkSharp.Generation {
{ {
char[] ast = {'*'}; char[] ast = {'*'};
String trim_type = type.TrimEnd(ast); String trim_type = type.TrimEnd(ast);
if (trim_type.StartsWith("const-")) return trim_type.Substring(6);
return trim_type; return trim_type;
} }

View file

@ -7,6 +7,7 @@
namespace GtkSamples { namespace GtkSamples {
using Gtk; using Gtk;
using GtkSharp;
using System; using System;
using System.Drawing; using System.Drawing;
@ -33,7 +34,9 @@ namespace GtkSamples {
static void Window_Delete (object obj, EventArgs args) static void Window_Delete (object obj, EventArgs args)
{ {
SignalArgs sa = (SignalArgs) args;
Application.Quit (); Application.Quit ();
sa.RetVal = true;
} }
} }