Author: mkestner
Date: 2005-02-28 18:33:28 -0500 (Mon, 28 Feb 2005)
New Revision: 41296
Modified:
branches/gtk-sharp-1-0-branch/gtk-sharp/ChangeLog
branches/gtk-sharp-1-0-branch/gtk-sharp/glib/Object.cs
branches/gtk-sharp-1-0-branch/gtk-sharp/gtk/Widget.custom
Log:
2005-02-28 Mike Kestner <[EMAIL PROTECTED]>
* glib/Object.cs : mark CreateNativeObject virtual.
* gtk/Widget.custom : add the parent-set hack from trunk.
Modified: branches/gtk-sharp-1-0-branch/gtk-sharp/ChangeLog
===================================================================
--- branches/gtk-sharp-1-0-branch/gtk-sharp/ChangeLog 2005-02-28 22:31:18 UTC
(rev 41295)
+++ branches/gtk-sharp-1-0-branch/gtk-sharp/ChangeLog 2005-02-28 23:33:28 UTC
(rev 41296)
@@ -1,5 +1,10 @@
2005-02-28 Mike Kestner <[EMAIL PROTECTED]>
+ * glib/Object.cs : mark CreateNativeObject virtual.
+ * gtk/Widget.custom : add the parent-set hack from trunk.
+
+2005-02-28 Mike Kestner <[EMAIL PROTECTED]>
+
* glib/Idle.cs : add locking on the source_handlers.
* glib/Source.cs : add locking on the source_handlers.
* glib/Timeout.cs : add locking on the source_handlers.
Modified: branches/gtk-sharp-1-0-branch/gtk-sharp/glib/Object.cs
===================================================================
--- branches/gtk-sharp-1-0-branch/gtk-sharp/glib/Object.cs 2005-02-28
22:31:18 UTC (rev 41295)
+++ branches/gtk-sharp-1-0-branch/gtk-sharp/glib/Object.cs 2005-02-28
23:33:28 UTC (rev 41296)
@@ -187,7 +187,7 @@
[DllImport("glibsharpglue")]
static extern IntPtr gtksharp_object_newv (IntPtr gtype, int
n_params, string[] names, GLib.Value[] vals);
- protected void CreateNativeObject (string[] names, GLib.Value[]
vals)
+ protected virtual void CreateNativeObject (string[] names,
GLib.Value[] vals)
{
Raw = gtksharp_object_newv (LookupGType ().Val,
names.Length, names, vals);
}
Modified: branches/gtk-sharp-1-0-branch/gtk-sharp/gtk/Widget.custom
===================================================================
--- branches/gtk-sharp-1-0-branch/gtk-sharp/gtk/Widget.custom 2005-02-28
22:31:18 UTC (rev 41295)
+++ branches/gtk-sharp-1-0-branch/gtk-sharp/gtk/Widget.custom 2005-02-28
23:33:28 UTC (rev 41296)
@@ -23,6 +23,23 @@
// Boston, MA 02111-1307, USA.
+protected override void CreateNativeObject (string[] names, GLib.Value[] vals)
+{
+ base.CreateNativeObject (names, vals);
+ ParentSet += new ParentSetHandler (Widget_ParentSet);
+}
+
+private static Hashtable ParentedWidgets = new Hashtable ();
+
+private static void Widget_ParentSet (object o, ParentSetArgs args)
+{
+ Widget w = o as Widget;
+ if (w.Parent != null && args.PreviousParent == null)
+ ParentedWidgets[w] = w;
+ else if (w.Parent == null && args.PreviousParent != null)
+ ParentedWidgets.Remove (w);
+}
+
[DllImport("gtksharpglue")]
static extern IntPtr gtksharp_gtk_widget_get_allocation (IntPtr style);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches