2004-04-28 Mike Kestner <mkestner@ximian.com>

[Expanded from patch by John Luke attached to bug.]
	* gdk/Gdk.metadata : rename Atom.Name to GetName so it props.
	* gdk/Atom.custom : new string cast operator.
	* sample/TestDnd.cs : fix Atom.Name reference
	* sample/GtkDemo/DemoEditableCell.cs : fix a ListStore.Remove
	ref broken by last commit.
	[Fixes #57721]

svn path=/trunk/gtk-sharp/; revision=26208
This commit is contained in:
Mike Kestner 2004-04-28 20:58:11 +00:00
parent 4766d5bf75
commit 5f4ee87b5c
6 changed files with 23 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2004-04-28 Mike Kestner <mkestner@ximian.com>
[Expanded from patch by John Luke attached to bug.]
* gdk/Gdk.metadata : rename Atom.Name to GetName so it props.
* gdk/Atom.custom : new string cast operator.
* sample/TestDnd.cs : fix Atom.Name reference
* sample/GtkDemo/DemoEditableCell.cs : fix a ListStore.Remove
ref broken by last commit.
[Fixes #57721]
2004-04-28 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : mark ListStore.Remove iter pass_as=ref.

9
gdk/Atom.custom Normal file
View file

@ -0,0 +1,9 @@
//
// Atom.custom
//
public static implicit operator string (Gdk.Atom atom)
{
return atom.Name;
}

View file

@ -87,5 +87,6 @@
<attr path="/api/namespace/struct[@cname='GdkRegion']/method[@name='GetRectangles']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
<attr path="/api/namespace/struct[@cname='GdkWindowObject']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GdkAtom']/method[@name='Name']" name="name">GetName</attr>
</metadata>

View file

@ -39,6 +39,7 @@ sources = \
build_sources = $(addprefix $(srcdir)/, $(sources))
customs = \
Atom.custom \
Color.custom \
DeviceAxis.custom \
Display.custom \

View file

@ -195,7 +195,7 @@ namespace GtkDemo
if (treeView.Selection.GetSelected (out model, out iter))
{
TreePath path = store.GetPath (iter);
store.Remove (out iter);
store.Remove (ref iter);
//articles.RemoveAt (path.Indices[0]);
}

View file

@ -306,7 +306,7 @@ public class TestDnd {
Atom [] targets = args.Context.Targets;
foreach (Atom a in targets)
Console.WriteLine (a.Name ()); // FIXME shouldn't Name be a property?
Console.WriteLine (a.Name);
Gdk.Drag.Status (args.Context, args.Context.SuggestedAction, args.Time);
args.RetVal = true;