+2008-03-26 Jonathan Pobst <monkey@jpobst.com>
+
+ * ComboBox.cs: Guard against NRE if an arrow key is hit while
+ we aren't dropped down. Support Home/End in DropDownList mode.
+ [Fixes bug #371990]
+
+2008-03-26 Jonathan Pobst <monkey@jpobst.com>
+
+ * TreeNodeCollection.cs: Don't increment count until we've
+ saved our index to return.
+ [Fixes bug #373603]
+
2008-03-25 Jonathan Pobst <monkey@jpobst.com>
* Label.cs: Add padding to the label's AutoSize calculation.
case Keys.Up:
SelectedIndex = Math.Max(SelectedIndex-1, 0);
- if (SelectedIndex < listbox_ctrl.FirstVisibleItem ())
- listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.FirstVisibleItem ());
+ if (DroppedDown)
+ if (SelectedIndex < listbox_ctrl.FirstVisibleItem ())
+ listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.FirstVisibleItem ());
break;
case Keys.Down:
else
SelectedIndex = Math.Min(SelectedIndex+1, Items.Count-1);
- if (SelectedIndex >= listbox_ctrl.LastVisibleItem ())
- listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.LastVisibleItem () + 1);
+ if (DroppedDown)
+ if (SelectedIndex >= listbox_ctrl.LastVisibleItem ())
+ listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.LastVisibleItem () + 1);
break;
case Keys.PageUp:
if (listbox_ctrl != null)
SelectedIndex = Math.Max(SelectedIndex- (listbox_ctrl.page_size-1), 0);
- if (SelectedIndex < listbox_ctrl.FirstVisibleItem ())
- listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.FirstVisibleItem ());
+ if (DroppedDown)
+ if (SelectedIndex < listbox_ctrl.FirstVisibleItem ())
+ listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.FirstVisibleItem ());
break;
case Keys.PageDown:
if (listbox_ctrl != null)
SelectedIndex = Math.Min(SelectedIndex+(listbox_ctrl.page_size-1), Items.Count-1);
- if (SelectedIndex >= listbox_ctrl.LastVisibleItem ())
- listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.LastVisibleItem () + 1);
+ if (DroppedDown)
+ if (SelectedIndex >= listbox_ctrl.LastVisibleItem ())
+ listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.LastVisibleItem () + 1);
break;
case Keys.Escape:
DropDownListBoxFinished ();
break;
+ case Keys.Home:
+ if (dropdown_style == ComboBoxStyle.DropDownList) {
+ SelectedIndex = 0;
+
+ if (DroppedDown)
+ if (SelectedIndex < listbox_ctrl.FirstVisibleItem ())
+ listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.FirstVisibleItem ());
+ }
+
+ break;
+ case Keys.End:
+ if (dropdown_style == ComboBoxStyle.DropDownList) {
+ SelectedIndex = Items.Count - 1;
+
+ if (DroppedDown)
+ if (SelectedIndex >= listbox_ctrl.LastVisibleItem ())
+ listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.LastVisibleItem () + 1);
+ }
+
+ break;
default:
break;
}
} else {
if (count >= nodes.Length)
Grow ();
- nodes [count++] = node;
+ nodes[count] = node;
res = count;
+ count++;
}
SetupNode (node);
+2008-03-26 Jonathan Pobst <monkey@jpobst.com>
+
+ * TreeViewTest.cs: Add test for bug #373603.
+
2008-03-25 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ListBindingHelper.cs: New test for GetListName method.
f.Dispose ();
}
+ [Test]
+ public void NodeAddIndex ()
+ {
+ TreeView tv = new TreeView ();
+
+ TreeNode tn1 = new TreeNode ("blah");
+ TreeNode tn2 = new TreeNode ("blah2");
+ TreeNode tn3 = new TreeNode ("blah3");
+
+ Assert.AreEqual (0, tv.Nodes.Add (tn1), "A1");
+ Assert.AreEqual (1, tv.Nodes.Add (tn2), "A2");
+ Assert.AreEqual (2, tv.Nodes.Add (tn3), "A3");
+ }
+
[Test]
public void NodesCopyToTest ()
{
+2008-03-26 Lluis Sanchez Gual <lluis@novell.com>
+
+ * ServiceDescriptionReflectorTest.cs: Added another test for bug
+ #345448.
+
2008-02-22 Atsushi Enomoto <atsushi@ximian.com>
* ServiceDescriptionReflectorTest.cs : mark Bug345448() NotWorking.
new ServiceDescriptionReflector ();
r.Reflect (typeof (Bug345448Service), "urn:foo");
Assert.IsNotNull (r.ServiceDescriptions [0].PortTypes ["Bug345448ServiceSoap"]);
+
+ // Make sure the map for service client is properly created
+ new Bug345448SoapHttpClientProtocol ();
}
#endif
return "Hello World";
}
}
+
+ [WebServiceBindingAttribute (Name = "AnotherBinding", Namespace = "http://tempuri.org/")]
+ public class Bug345448SoapHttpClientProtocol : SoapHttpClientProtocol
+ {
+ }
#endif
}
}
+2008-03-26 Lluis Sanchez Gual <lluis@novell.com>
+
+ * MapCodeGenerator.cs, XmlTypeMapMember.cs, XmlTypeMapMemberElement.cs:
+ If a value type field has the IsNullable property set to true,
+ generate it as System.Nullable<T>.
+
2008-03-26 Lluis Sanchez Gual <lluis@novell.com>
* XmlSchemaImporter.cs: Fix problem with primitive types with a forced
if (map.BaseMap != null && map.BaseMap.TypeData.SchemaType != SchemaTypes.XmlNode)
{
- CodeTypeReference ctr = GetDomType (map.BaseMap.TypeData);
+ CodeTypeReference ctr = GetDomType (map.BaseMap.TypeData, false);
codeClass.BaseTypes.Add (ctr);
if (map.BaseMap.IncludeInSchema) {
ExportMapCode (map.BaseMap, false);
CodeTypeMember CreateFieldMember (CodeTypeDeclaration codeClass, TypeData type, string name)
{
- return CreateFieldMember (codeClass, GetDomType (type), name, System.DBNull.Value, null, null);
+ return CreateFieldMember (codeClass, GetDomType (type, false), name, System.DBNull.Value, null, null);
}
CodeTypeMember CreateFieldMember (CodeTypeDeclaration codeClass, XmlTypeMapMember member)
{
- return CreateFieldMember (codeClass, GetDomType (member.TypeData), member.Name, member.DefaultValue, member.TypeData, member.Documentation);
+ return CreateFieldMember (codeClass, GetDomType (member.TypeData, member.RequiresNullable), member.Name, member.DefaultValue, member.TypeData, member.Documentation);
}
CodeTypeMember CreateFieldMember (CodeTypeDeclaration codeClass, CodeTypeReference type, string name, object defaultValue, TypeData defaultType, string documentation)
}
#endif
- CodeTypeReference GetDomType (TypeData data)
+ CodeTypeReference GetDomType (TypeData data, bool requiresNullable)
{
#if NET_2_0
- if (data.IsValueType && data.IsNullable)
+ if (data.IsValueType && (data.IsNullable || requiresNullable))
return new CodeTypeReference ("System.Nullable", new CodeTypeReference (data.FullTypeName));
#endif
if (data.SchemaType == SchemaTypes.Array)
- return new CodeTypeReference (GetDomType (data.ListItemTypeData),1);
+ return new CodeTypeReference (GetDomType (data.ListItemTypeData, false),1);
else
return new CodeTypeReference (data.FullTypeName);
}
throw new InvalidOperationException ("Type " + typeData.TypeName + " not supported");
IFormattable defaultValueFormattable = defaultValue as IFormattable;
- CodeFieldReferenceExpression fref = new CodeFieldReferenceExpression (new CodeTypeReferenceExpression (GetDomType (typeData)), defaultValueFormattable != null ? defaultValueFormattable.ToString(null, CultureInfo.InvariantCulture) : defaultValue.ToString ());
+ CodeFieldReferenceExpression fref = new CodeFieldReferenceExpression (new CodeTypeReferenceExpression (GetDomType (typeData, false)), defaultValueFormattable != null ? defaultValueFormattable.ToString(null, CultureInfo.InvariantCulture) : defaultValue.ToString ());
CodeAttributeArgument arg = new CodeAttributeArgument (fref);
AddCustomAttribute (externalField, "System.ComponentModel.DefaultValue", arg);
internalField.InitExpression = fref;
if (_specifiedMember is PropertyInfo) ((PropertyInfo)_specifiedMember).SetValue (ob, value, null);
else ((FieldInfo)_specifiedMember).SetValue (ob, value);
}
+
+ public virtual bool RequiresNullable {
+ get { return false; }
+ }
}
}
get { return _isTextCollector; }
set { _isTextCollector = value; }
}
+
+ public override bool RequiresNullable {
+ get {
+ foreach (XmlTypeMapElementInfo einfo in ElementInfo)
+ if (einfo.IsNullable)
+ return true;
+ return false;
+ }
+ }
}
// XmlTypeMapMemberList
+2008-03-26 Dick Porter <dick@ximian.com>
+
+ * FileVersionInfo.cs: Patch from Gert Driesen
+ (gert.driesen@pandora.be) for bug 355717.
+
2008-03-19 Zoltan Varga <vargaz@gmail.com>
* Stopwatch.cs: Fix visibility of GetTimestamp () method.
private FileVersionInfo ()
{
+#if NET_2_0
+ // no nulls (for unavailable items)
+ comments = null;
+ companyname = null;
+ filedescription = null;
+ filename = null;
+ fileversion = null;
+ internalname = null;
+ language = null;
+ legalcopyright = null;
+ legaltrademarks = null;
+ originalfilename = null;
+ privatebuild = null;
+ productname = null;
+ productversion = null;
+ specialbuild = null;
+#else
// no nulls (for unavailable items)
comments = String.Empty;
companyname = String.Empty;
productname = String.Empty;
productversion = String.Empty;
specialbuild = String.Empty;
+#endif
// This is here just to shut the compiler up
isdebug=false;
ispatched=false;
+2008-03-26 Massimiliano Mantione <massi@ximian.com>
+ * Thread.cs: Renamed "unused6" because it will be used to hold
+ the "mono_thread_manage" callback.
Tue Feb 26 17:51:58 CET 2008 Paolo Molaro <lupus@ximian.com>
* when a new field is added to the unmanaged MonoThread structure.
*/
private IntPtr small_id;
- private IntPtr unused6;
+ private IntPtr manage_callback;
private IntPtr unused7;
volatile int critical_region_level;
#endregion