mac setup: Fix crash on second form try

This commit is contained in:
Hylke Bons 2012-03-23 03:19:10 +00:00
parent bde2931853
commit 8b02a628a9

View file

@ -276,11 +276,12 @@ namespace SparkleShare {
AddressTextField = new NSTextField () {
Frame = new RectangleF (190, Frame.Height - 336, 196, 22),
Font = SparkleUI.Font,
StringValue = Controller.PreviousAddress,
Enabled = (Controller.SelectedPlugin.Address == null),
Delegate = new SparkleTextFieldDelegate ()
};
if (Controller.PreviousAddress != null)
AddressTextField.StringValue = Controller.PreviousAddress;
PathLabel = new NSTextField () {
Alignment = NSTextAlignment.Left,
@ -294,11 +295,12 @@ namespace SparkleShare {
PathTextField = new NSTextField () {
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 336, 196, 22),
StringValue = Controller.PreviousPath,
Enabled = (Controller.SelectedPlugin.Path == null),
Delegate = new SparkleTextFieldDelegate ()
};
if (Controller.PreviousPath != null)
PathTextField.StringValue = Controller.PreviousPath;
AddressTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
PathTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
@ -310,22 +312,26 @@ namespace SparkleShare {
TextColor = NSColor.DisabledControlText,
Editable = false,
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 355, 204, 17),
StringValue = Controller.SelectedPlugin.PathExample,
Font = NSFontManager.SharedFontManager.FontWithFamily
("Lucida Grande", NSFontTraitMask.Condensed, 0, 11)
};
if (Controller.SelectedPlugin.PathExample != null)
PathHelpLabel.StringValue = Controller.SelectedPlugin.PathExample;
AddressHelpLabel = new NSTextField () {
BackgroundColor = NSColor.WindowBackground,
Bordered = false,
TextColor = NSColor.DisabledControlText,
Editable = false,
Frame = new RectangleF (190, Frame.Height - 355, 204, 17),
StringValue = Controller.SelectedPlugin.AddressExample,
Font = NSFontManager.SharedFontManager.FontWithFamily
("Lucida Grande", NSFontTraitMask.Condensed, 0, 11)
};
if (Controller.SelectedPlugin.AddressExample != null)
AddressHelpLabel.StringValue = Controller.SelectedPlugin.AddressExample;
TableView = new NSTableView () {
Frame = new RectangleF (0, 0, 0, 0),
@ -869,13 +875,6 @@ namespace SparkleShare {
if (StringValueChanged != null)
StringValueChanged ();
}
public override string [] GetCompletions (NSControl control, NSTextView text_view,
string [] a, MonoMac.Foundation.NSRange range, int b)
{
return new string [0];
}
}