Author: danw
Date: 2005-04-11 18:00:04 -0400 (Mon, 11 Apr 2005)
New Revision: 42811
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/wrapper/Container.cs
trunk/stetic/libstetic/wrapper/HBox.cs
trunk/stetic/libstetic/wrapper/HPaned.cs
trunk/stetic/libstetic/wrapper/Notebook.cs
trunk/stetic/libstetic/wrapper/OptionMenu.cs
trunk/stetic/libstetic/wrapper/VBox.cs
trunk/stetic/libstetic/wrapper/VPaned.cs
trunk/stetic/libstetic/wrapper/Widget.cs
Log:
* libstetic/wrapper/HBox.cs:
* libstetic/wrapper/HPaned.cs:
* libstetic/wrapper/Notebook.cs:
* libstetic/wrapper/OptionMenu.cs:
* libstetic/wrapper/VBox.cs:
* libstetic/wrapper/VPaned.cs: s/.Children//
* libstetic/wrapper/Container.cs (FindInternalChild): use
AllChildren
(RealChildren): use AllChildren. kill RealChildEnumerator.
* libstetic/wrapper/Widget.cs (InterceptClicks, FindWrapper): use
AllChildren, kill ChildEnumerator
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2005-04-11 21:56:46 UTC (rev 42810)
+++ trunk/stetic/ChangeLog 2005-04-11 22:00:04 UTC (rev 42811)
@@ -1,5 +1,23 @@
2005-04-11 Dan Winship <[EMAIL PROTECTED]>
+ * libstetic/wrapper/HBox.cs:
+ * libstetic/wrapper/HPaned.cs:
+ * libstetic/wrapper/Notebook.cs:
+ * libstetic/wrapper/OptionMenu.cs:
+ * libstetic/wrapper/VBox.cs:
+ * libstetic/wrapper/VPaned.cs: s/.Children//
+
+ * libstetic/wrapper/Container.cs (FindInternalChild): use
+ AllChildren
+ (RealChildren): use AllChildren. kill RealChildEnumerator.
+
+ * libstetic/wrapper/Widget.cs (InterceptClicks, FindWrapper): use
+ AllChildren, kill ChildEnumerator
+
+ * stetic/Grid.cs (ForAll): use new signature
+
+2005-04-11 Dan Winship <[EMAIL PROTECTED]>
+
* glue/custom.c (custom_new): new method
* libstetic/RadioGroupManager.cs (this[Gtk.Widget]): track the
@@ -14,8 +32,6 @@
* libstetic/wrapper/Custom.cs (Stetic.Custom.ctor()): call
custom_new()
- * stetic/Grid.cs (ForAll): use new signature
-
* TODO: misc updates
2005-04-07 Dan Winship <[EMAIL PROTECTED]>
Modified: trunk/stetic/libstetic/wrapper/Container.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Container.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/Container.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -113,7 +113,7 @@
Widget FindInternalChild (string childId)
{
- foreach (Gtk.Widget w in container.Children) {
+ foreach (Gtk.Widget w in container.AllChildren) {
Widget wrapper = Lookup (w);
if (wrapper != null && wrapper.InternalChildId
== childId)
return wrapper;
@@ -235,20 +235,14 @@
EmitContentsChanged ();
}
- class RealChildEnumerator {
- public ArrayList Children = new ArrayList ();
- public void Add (Gtk.Widget widget)
- {
- if (!(widget is Placeholder))
- Children.Add (widget);
- }
- }
-
public virtual IEnumerable RealChildren {
get {
- RealChildEnumerator rce = new
RealChildEnumerator ();
- container.Forall (rce.Add);
- return rce.Children;
+ ArrayList children = new ArrayList ();
+ foreach (Gtk.Widget widget in
container.AllChildren) {
+ if (!(widget is Placeholder))
+ children.Add (widget);
+ }
+ return children;
}
}
Modified: trunk/stetic/libstetic/wrapper/HBox.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/HBox.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/HBox.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -9,7 +9,7 @@
public override bool HExpandable {
get {
- foreach (Gtk.Widget w in box.Children) {
+ foreach (Gtk.Widget w in box) {
if (ChildHExpandable (w))
return true;
}
@@ -19,7 +19,7 @@
public override bool VExpandable {
get {
- foreach (Gtk.Widget w in box.Children) {
+ foreach (Gtk.Widget w in box) {
if (!ChildVExpandable (w))
return false;
}
Modified: trunk/stetic/libstetic/wrapper/HPaned.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/HPaned.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/HPaned.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -10,7 +10,7 @@
public override bool HExpandable { get { return true; } }
public override bool VExpandable {
get {
- foreach (Gtk.Widget w in paned.Children) {
+ foreach (Gtk.Widget w in paned) {
if (!ChildVExpandable (w))
return false;
}
Modified: trunk/stetic/libstetic/wrapper/Notebook.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Notebook.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/Notebook.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -168,7 +168,7 @@
public override bool HExpandable {
get {
- foreach (Gtk.Widget w in notebook.Children) {
+ foreach (Gtk.Widget w in notebook) {
if (ChildHExpandable (w))
return true;
}
@@ -178,7 +178,7 @@
public override bool VExpandable {
get {
- foreach (Gtk.Widget w in notebook.Children) {
+ foreach (Gtk.Widget w in notebook) {
if (ChildVExpandable (w))
return true;
}
Modified: trunk/stetic/libstetic/wrapper/OptionMenu.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/OptionMenu.cs 2005-04-11 21:56:46 UTC
(rev 42810)
+++ trunk/stetic/libstetic/wrapper/OptionMenu.cs 2005-04-11 22:00:04 UTC
(rev 42811)
@@ -52,7 +52,7 @@
Gtk.Menu menu = optionmenu.Menu as Gtk.Menu;
System.Text.StringBuilder sb = new
System.Text.StringBuilder ();
- foreach (Gtk.Widget w in menu.Children) {
+ foreach (Gtk.Widget w in menu) {
Gtk.MenuItem item = w as Gtk.MenuItem;
if (item == null)
continue;
Modified: trunk/stetic/libstetic/wrapper/VBox.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/VBox.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/VBox.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -9,7 +9,7 @@
public override bool HExpandable {
get {
- foreach (Gtk.Widget w in box.Children) {
+ foreach (Gtk.Widget w in box) {
if (!ChildHExpandable (w))
return false;
}
@@ -19,7 +19,7 @@
public override bool VExpandable {
get {
- foreach (Gtk.Widget w in box.Children) {
+ foreach (Gtk.Widget w in box) {
if (ChildVExpandable (w))
return true;
}
Modified: trunk/stetic/libstetic/wrapper/VPaned.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/VPaned.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/VPaned.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -9,7 +9,7 @@
public override bool HExpandable {
get {
- foreach (Gtk.Widget w in paned.Children) {
+ foreach (Gtk.Widget w in paned) {
if (!ChildHExpandable (w))
return false;
}
Modified: trunk/stetic/libstetic/wrapper/Widget.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Widget.cs 2005-04-11 21:56:46 UTC (rev
42810)
+++ trunk/stetic/libstetic/wrapper/Widget.cs 2005-04-11 22:00:04 UTC (rev
42811)
@@ -51,7 +51,7 @@
Gtk.Container container = widget as Gtk.Container;
if (container != null) {
- foreach (Gtk.Widget child in new
ChildEnumerator (container)) {
+ foreach (Gtk.Widget child in
container.AllChildren) {
if (Lookup (child) == null)
InterceptClicks (child);
}
@@ -106,33 +106,13 @@
}
}
- class ChildEnumerator : IEnumerable {
- public ChildEnumerator (Gtk.Container container)
- {
- children = new ArrayList ();
- container.Forall (Add);
- }
-
- ArrayList children;
-
- public void Add (Gtk.Widget widget)
- {
- children.Add (widget);
- }
-
- public IEnumerator GetEnumerator ()
- {
- return children.GetEnumerator ();
- }
- }
-
Widget FindWrapper (Gtk.Widget top, int x, int y)
{
Gtk.Container container = top as Gtk.Container;
if (container == null)
return Lookup (top);
- foreach (Gtk.Widget child in new ChildEnumerator
(container)) {
+ foreach (Gtk.Widget child in container.AllChildren) {
if (!child.IsDrawable)
continue;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches