Author: danw
Date: 2005-04-07 16:05:52 -0400 (Thu, 07 Apr 2005)
New Revision: 42653

Modified:
   trunk/gtk-sharp/ChangeLog
   trunk/gtk-sharp/gtk/Object.custom
   trunk/gtk-sharp/gtk/Window.custom
Log:
        * gtk/Object.custom (Raw): Always ref the object, even if it's not
        floating when we get it, since GLib assumes we hold a ref on it.
        [Fixes #74468]

        * gtk/Window.custom: remove refcount special-handling here


Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog   2005-04-07 20:03:56 UTC (rev 42652)
+++ trunk/gtk-sharp/ChangeLog   2005-04-07 20:05:52 UTC (rev 42653)
@@ -1,3 +1,11 @@
+2005-04-07  Dan Winship  <[EMAIL PROTECTED]>
+
+       * gtk/Object.custom (Raw): Always ref the object, even if it's not
+       floating when we get it, since GLib assumes we hold a ref on it.
+       [Fixes #74468]
+
+       * gtk/Window.custom: remove refcount special-handling here
+
 2005-04-06  Mike Kestner  <[EMAIL PROTECTED]>
 
        * gtk/FileFilter.custom : AddCustom delegate is destroy notified.

Modified: trunk/gtk-sharp/gtk/Object.custom
===================================================================
--- trunk/gtk-sharp/gtk/Object.custom   2005-04-07 20:03:56 UTC (rev 42652)
+++ trunk/gtk-sharp/gtk/Object.custom   2005-04-07 20:05:52 UTC (rev 42653)
@@ -39,11 +39,8 @@
                                if (value == IntPtr.Zero)
                                        return;
 
-                               if (gtksharp_object_is_floating (value)) {
-                                       g_object_ref (value);
-                                       Sink ();
-                               }
-//                             System.Diagnostics.Debug.WriteLine 
("Gtk.Object:set_Raw: object type is: " + (this as GLib.Object).GType.Name + " 
refcount now: " + RefCount + " needs_ref: " + needs_ref);
+                               g_object_ref (value);
+                               Sink ();
                        }
                }
 

Modified: trunk/gtk-sharp/gtk/Window.custom
===================================================================
--- trunk/gtk-sharp/gtk/Window.custom   2005-04-07 20:03:56 UTC (rev 42652)
+++ trunk/gtk-sharp/gtk/Window.custom   2005-04-07 20:05:52 UTC (rev 42653)
@@ -21,32 +21,6 @@
 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 // Boston, MA 02111-1307, USA.
 
-
-
-               [DllImport("libgobject-2.0-0.dll")]
-               private static extern void g_object_ref (IntPtr raw);
-
-               static Hashtable windows = new Hashtable ();
-
-               protected override IntPtr Raw {
-                       get {
-                               return base.Raw;
-                       }
-                       set {
-                               base.Raw = value;
-                               if (value == IntPtr.Zero)
-                                       return;
-                               g_object_ref (value);
-                               windows [value] = this;
-                       }
-               }
-
-               public override void Destroy ()
-               {
-                       base.Destroy ();
-                       windows [Handle] = null;
-               }
-
                public Window (String title) : this (WindowType.Toplevel)
                {
                        this.Title = title;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to