Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2015-04-08 02:48:18 +0300
committerAlan McGovern <alan@xamarin.com>2015-05-12 02:12:44 +0300
commit1c286b185c164b95d65a7f77e6b9341f993bca33 (patch)
treea6b00d2bcee272f8c409dd5651eece23d8c30973 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components
parent0c38cde1f37efacb5359223f3b258796e1b06e30 (diff)
[Mac] Fix build with Xamarin.Mac 2.0
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/Util.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/Util.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/Util.cs
index 935008eae3..67d1c0ad12 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/Util.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/Util.cs
@@ -109,25 +109,25 @@ namespace MonoDevelop.Components.Mac
var r = new NSRange (att.StartIndex, att.Count);
if (att is BackgroundTextAttribute) {
var xa = (BackgroundTextAttribute)att;
- ns.AddAttribute (NSAttributedString.BackgroundColorAttributeName, xa.Color.ToNSColor (), r);
+ ns.AddAttribute (NSStringAttributeKey.BackgroundColor, xa.Color.ToNSColor (), r);
}
else if (att is ColorTextAttribute) {
var xa = (ColorTextAttribute)att;
- ns.AddAttribute (NSAttributedString.ForegroundColorAttributeName, xa.Color.ToNSColor (), r);
+ ns.AddAttribute (NSStringAttributeKey.ForegroundColor, xa.Color.ToNSColor (), r);
}
else if (att is UnderlineTextAttribute) {
var xa = (UnderlineTextAttribute)att;
int style = xa.Underline ? 0x01 /*NSUnderlineStyleSingle*/ : 0;
- ns.AddAttribute (NSAttributedString.UnderlineStyleAttributeName, (NSNumber)style, r);
+ ns.AddAttribute (NSStringAttributeKey.UnderlineStyle, (NSNumber)style, r);
}
else if (att is FontStyleTextAttribute) {
var xa = (FontStyleTextAttribute)att;
if (xa.Style == FontStyle.Italic) {
Messaging.void_objc_msgSend_int_NSRange (ns.Handle, applyFontTraits.Handle, (IntPtr)(long)NSFontTraitMask.Italic, r);
} else if (xa.Style == FontStyle.Oblique) {
- ns.AddAttribute (NSAttributedString.ObliquenessAttributeName, (NSNumber)0.2f, r);
+ ns.AddAttribute (NSStringAttributeKey.Obliqueness, (NSNumber)0.2f, r);
} else {
- ns.AddAttribute (NSAttributedString.ObliquenessAttributeName, (NSNumber)0.0f, r);
+ ns.AddAttribute (NSStringAttributeKey.Obliqueness, (NSNumber)0.0f, r);
Messaging.void_objc_msgSend_int_NSRange (ns.Handle, applyFontTraits.Handle, (IntPtr)(long)NSFontTraitMask.Unitalic, r);
}
}
@@ -138,19 +138,19 @@ namespace MonoDevelop.Components.Mac
}
else if (att is LinkTextAttribute) {
var xa = (LinkTextAttribute)att;
- ns.AddAttribute (NSAttributedString.LinkAttributeName, new NSUrl (xa.Target.ToString ()), r);
- ns.AddAttribute (NSAttributedString.ForegroundColorAttributeName, NSColor.Blue, r);
- ns.AddAttribute (NSAttributedString.UnderlineStyleAttributeName, NSNumber.FromInt32 ((int)NSUnderlineStyle.Single), r);
+ ns.AddAttribute (NSStringAttributeKey.Link, new NSUrl (xa.Target.ToString ()), r);
+ ns.AddAttribute (NSStringAttributeKey.ForegroundColor, NSColor.Blue, r);
+ ns.AddAttribute (NSStringAttributeKey.UnderlineStyle, NSNumber.FromInt32 ((int)NSUnderlineStyle.Single), r);
}
else if (att is StrikethroughTextAttribute) {
var xa = (StrikethroughTextAttribute)att;
int style = xa.Strikethrough ? 0x01 /*NSUnderlineStyleSingle*/ : 0;
- ns.AddAttribute (NSAttributedString.StrikethroughStyleAttributeName, (NSNumber)style, r);
+ ns.AddAttribute (NSStringAttributeKey.StrikethroughStyle, (NSNumber)style, r);
}
else if (att is FontTextAttribute) {
var xa = (FontTextAttribute)att;
var nf = (NSFont)Toolkit.GetBackend (xa.Font);
- ns.AddAttribute (NSAttributedString.FontAttributeName, nf, r);
+ ns.AddAttribute (NSStringAttributeKey.Font, nf, r);
}
}
ns.EndEditing ();