Author: danw
Date: 2005-03-08 14:36:46 -0500 (Tue, 08 Mar 2005)
New Revision: 41577
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/WidgetSite.cs
trunk/stetic/libstetic/wrapper/Box.cs
Log:
* libstetic/WidgetSite.cs (SetupFaults): Pass "false" to DND.DestSet,
not true, so that the whole widget isn't drop-on-able.
(AddHFault, AddVFault): don't create windows if we're not realized.
* libstetic/wrapper/Box.cs (Wrap): call box_ParentSet from here so
that the DropOn handler will be set up if the Parent is already
set when it's wrapped (ie, if it's an internal child)
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2005-03-08 17:55:18 UTC (rev 41576)
+++ trunk/stetic/ChangeLog 2005-03-08 19:36:46 UTC (rev 41577)
@@ -1,5 +1,15 @@
2005-03-08 Dan Winship <[EMAIL PROTECTED]>
+ * libstetic/WidgetSite.cs (SetupFaults): Pass "false" to DND.DestSet,
+ not true, so that the whole widget isn't drop-on-able.
+ (AddHFault, AddVFault): don't create windows if we're not realized.
+
+ * libstetic/wrapper/Box.cs (Wrap): call box_ParentSet from here so
+ that the DropOn handler will be set up if the Parent is already
+ set when it's wrapped (ie, if it's an internal child)
+
+2005-03-08 Dan Winship <[EMAIL PROTECTED]>
+
* libstetic/GladeException.cs: exception class for Glade import problems
* libstetic/GladeUtils.cs:
Modified: trunk/stetic/libstetic/WidgetSite.cs
===================================================================
--- trunk/stetic/libstetic/WidgetSite.cs 2005-03-08 17:55:18 UTC (rev
41576)
+++ trunk/stetic/libstetic/WidgetSite.cs 2005-03-08 19:36:46 UTC (rev
41577)
@@ -165,11 +165,13 @@
DND.DragEnd += HideFaults;
}
if (Occupancy == SiteOccupancy.Occupied)
- DND.DestSet (this, true);
+ DND.DestSet (this, false);
}
public void AddHFault (object id, int y, int x1, int x2)
{
+ if (!IsRealized)
+ return;
Gdk.Window win = NewWindow (GdkWindow,
Gdk.WindowClass.InputOnly);
win.MoveResize (x1, y - 2, x2 - x1 , 5);
if (faults == null || faults.Count == 0)
@@ -179,6 +181,8 @@
public void AddVFault (object id, int x, int y1, int y2)
{
+ if (!IsRealized)
+ return;
Gdk.Window win = NewWindow (GdkWindow,
Gdk.WindowClass.InputOnly);
win.MoveResize (x - 2, y1, 5, y2 - y1);
if (faults == null || faults.Count == 0)
Modified: trunk/stetic/libstetic/wrapper/Box.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Box.cs 2005-03-08 17:55:18 UTC (rev
41576)
+++ trunk/stetic/libstetic/wrapper/Box.cs 2005-03-08 19:36:46 UTC (rev
41577)
@@ -28,6 +28,7 @@
}
box.SizeAllocated += box_SizeAllocated;
box.ParentSet += box_ParentSet;
+ box_ParentSet (this, null);
}
Gtk.Box box {
@@ -42,7 +43,12 @@
if (site == null)
return;
+ site.ClearFaults ();
+
Gtk.Widget[] children = box.Children;
+ if (children.Length == 0)
+ return;
+
WidgetSite[] sorted = new WidgetSite[children.Length];
foreach (Gtk.Widget child in children) {
@@ -55,10 +61,6 @@
Gdk.Rectangle alloc = box.Allocation;
- site.ClearFaults ();
- if (sorted.Length == 0)
- return;
-
if (this is HBox) {
if (sorted[0] != null)
site.AddVFault (0, 0, 0, alloc.Height);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches