~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
Import upstream version 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
using MonoDevelop.Projects.Dom;
36
36
using MonoDevelop.Projects.Dom.Output;
37
37
using MonoDevelop.Projects.Dom.Parser;
 
38
using MonoDevelop.Ide.Fonts;
38
39
 
39
40
namespace MonoDevelop.SourceEditor
40
41
{
41
42
        public class LanguageItemWindow: MonoDevelop.Components.TooltipWindow
42
43
        {
43
 
                Pango.FontDescription fontDescription;
44
 
                
45
44
                public bool IsEmpty { get; set; }
46
45
                
47
46
                public LanguageItemWindow (ExtensibleTextEditor ed, Gdk.ModifierType modifierState, ResolveResult result, string errorInformations, ICompilationUnit unit)
108
107
                {
109
108
                        if (label == null)
110
109
                                return;
111
 
                        if (fontDescription != null) {
112
 
                                fontDescription.Dispose ();
113
 
                        }
114
 
                        fontDescription = new Gtk.Label ("").Style.FontDescription.Copy ();
115
 
                        fontDescription.Size = DefaultSourceEditorOptions.Instance.Font.Size;
116
 
                        label.FontDescription = fontDescription;
117
 
                }
118
 
                
119
 
                protected override void OnDestroyed ()
120
 
                {
121
 
                        base.OnDestroyed ();
122
 
                        
123
 
                        if (fontDescription != null) {
124
 
                                fontDescription.Dispose ();
125
 
                                fontDescription = null;
126
 
                        }
127
 
                }
128
 
                
129
 
                
130
 
/*              static string GetCref (string cref)
131
 
                {
132
 
                        if (cref == null)
133
 
                                return "";
134
 
                        
135
 
                        if (cref.Length < 2)
136
 
                                return cref;
137
 
                        
138
 
                        if (cref.Substring(1, 1) == ":")
139
 
                                return cref.Substring (2, cref.Length - 2);
140
 
                        
141
 
                        return cref;
142
 
                }*/
 
110
                        label.FontDescription = FontService.GetFontDescription ("LanguageTooltips");
 
111
                        
 
112
                }
143
113
        }
144
114
}