Author: lluis
Date: 2007-01-17 13:50:05 -0500 (Wed, 17 Jan 2007)
New Revision: 71223
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/EnumDescriptor.cs
trunk/stetic/libstetic/wrapper/objects.xml
Log:
* libstetic/EnumDescriptor.cs: Avoid importing enum values which have
not been declared in the xml file. Shoud fix bugs 80007 and 80471.
* libstetic/wrapper/objects.xml: Removed missing property.
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2007-01-17 18:23:33 UTC (rev 71222)
+++ trunk/stetic/ChangeLog 2007-01-17 18:50:05 UTC (rev 71223)
@@ -1,5 +1,11 @@
2007-01-17 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+ * libstetic/EnumDescriptor.cs: Avoid importing enum values which have
+ not been declared in the xml file. Shoud fix bugs 80007 and 80471.
+ * libstetic/wrapper/objects.xml: Removed missing property.
+
+2007-01-17 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
* libsteticui/ApplicationBackend.cs: Fixed some warnings.
* libsteticui/WidgetDesignerBackend.cs,
libsteticui/WidgetEditSession.cs, libstetic/IDesignArea.cs,
Modified: trunk/stetic/libstetic/EnumDescriptor.cs
===================================================================
--- trunk/stetic/libstetic/EnumDescriptor.cs 2007-01-17 18:23:33 UTC (rev
71222)
+++ trunk/stetic/libstetic/EnumDescriptor.cs 2007-01-17 18:50:05 UTC (rev
71223)
@@ -33,11 +33,11 @@
values = new Hashtable ();
Array enumvalues = Enum.GetValues (enumType);
- values_array = new Enum[enumvalues.Length];
+ ArrayList list = new ArrayList ();
Hashtable evalues = new Hashtable ();
for (int i = 0; i < enumvalues.Length; i++) {
Enum value = (Enum)Enum.ToObject (enumType,
(int)enumvalues.GetValue (i));
- values_array[i] = value;
+ list.Add (value);
evalues[Enum.GetName (enumType, value)] = value;
}
@@ -49,7 +49,14 @@
values[value] = new EnumValue (value,
valueElem.GetAttribute ("label"),
valueElem.GetAttribute ("description"));
+ evalues.Remove (name);
}
+
+ // Remove from the array the values not declared in the
xml file
+ foreach (object val in evalues.Values)
+ list.Remove (val);
+
+ values_array = (Enum[]) list.ToArray (typeof(Enum));
}
public string Name {
Modified: trunk/stetic/libstetic/wrapper/objects.xml
===================================================================
--- trunk/stetic/libstetic/wrapper/objects.xml 2007-01-17 18:23:33 UTC (rev
71222)
+++ trunk/stetic/libstetic/wrapper/objects.xml 2007-01-17 18:50:05 UTC (rev
71223)
@@ -168,7 +168,6 @@
<property name="Title" init-with-name="true"
translatable="true" />
<property name="Icon" />
<property name="Type" glade-override="true" internal="true" />
- <property name="TypeVisible" internal="true"/>
<property name="TypeHint" glade-override="true" />
<property name="WindowPosition" />
<property name="Modal" glade-override="true" />
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches