Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
Revert "Revert "Fix hundreds of warnings""
Browse files Browse the repository at this point in the history
Please use an up to date Mono.

This reverts commit 54a64a7.
  • Loading branch information
mhutch committed Aug 13, 2013
1 parent a44f19c commit a47449b
Show file tree
Hide file tree
Showing 102 changed files with 450 additions and 507 deletions.
Expand Up @@ -50,7 +50,7 @@ public interface IValueVisualizer
/// The value
/// </param>
/// <remarks>
/// This method must check the value and return <c>true</v> if it is able to display that value.
/// This method must check the value and return <c>true</c> if it is able to display that value.
/// Typically, this method will check the TypeName of the value.
/// </remarks>
bool CanVisualize (ObjectValue val);
Expand Down
Expand Up @@ -145,7 +145,7 @@ protected static void FillGradient (Cairo.Context cr, Cairo.Color color1, Cairo.
using (var pat = new Cairo.LinearGradient (x + size / 4, y, x + size / 2, y + size - 4)) {
pat.AddColorStop (0, color1);
pat.AddColorStop (1, color2);
cr.Pattern = pat;
cr.SetSource (pat);
cr.FillPreserve ();
}
}
Expand All @@ -154,7 +154,7 @@ protected static void DrawBorder (Cairo.Context cr, Cairo.Color color, double x,
{
using (var pat = new Cairo.LinearGradient (x, y + size, x + size, y)) {
pat.AddColorStop (0, color);
cr.Pattern = pat;
cr.SetSource (pat);
cr.Stroke ();
}
}
Expand Down
Expand Up @@ -234,15 +234,15 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
else
messageLayout.SetText (MonoDevelop.Core.GettextCatalog.GetString ("There are no tools available for the current document."));
cr.MoveTo (Allocation.Width * 1 / 6, 12);
cr.Color = Style.Text (StateType.Normal).ToCairoColor ();
cr.SetSourceColor (Style.Text (StateType.Normal).ToCairoColor ());
Pango.CairoHelper.ShowLayout (cr, messageLayout);
messageLayout.Dispose ();
((IDisposable)cr).Dispose ();
return true;
}

var backColor = Style.Base (StateType.Normal).ToCairoColor ();
cr.Color = backColor;
cr.SetSourceColor (backColor);
cr.Rectangle (area.X, area.Y, area.Width, area.Height);
cr.Fill ();

Expand All @@ -261,7 +261,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
using (var pat = new Cairo.LinearGradient (xpos, ypos, xpos, ypos + itemDimension.Height)) {
pat.AddColorStop (0, CategoryBackgroundGradientStartColor);
pat.AddColorStop (1, CategoryBackgroundGradientEndColor);
cr.Pattern = pat;
cr.SetSource (pat);
cr.Fill ();
}
if (lastCategory == null || lastCategory.IsExpanded || lastCategory.AnimatingExpand) {
Expand All @@ -270,13 +270,13 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
}
cr.MoveTo (0, ypos + itemDimension.Height - 0.5);
cr.LineTo (xpos + Allocation.Width, ypos + itemDimension.Height - 0.5);
cr.Color = CategoryBorderColor;
cr.SetSourceColor (CategoryBorderColor);
cr.LineWidth = 1;
cr.Stroke ();

headerLayout.SetText (category.Text);
int width, height;
cr.Color = CategoryLabelColor;
cr.SetSourceColor (CategoryLabelColor);
layout.GetPixelSize (out width, out height);
cr.MoveTo (xpos + CategoryLeftPadding, ypos + (itemDimension.Height - height) / 2);
Pango.CairoHelper.ShowLayout (cr, headerLayout);
Expand All @@ -290,7 +290,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)

}, delegate (Category curCategory, Item item, Gdk.Size itemDimension) {
if (item == SelectedItem) {
cr.Color = Style.Base (StateType.Selected).ToCairoColor ();
cr.SetSourceColor (Style.Base (StateType.Selected).ToCairoColor ());
cr.Rectangle (xpos, ypos, itemDimension.Width, itemDimension.Height);
cr.Fill ();
}
Expand All @@ -300,7 +300,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
layout.SetText (item.Text);
int width, height;
layout.GetPixelSize (out width, out height);
cr.Color = Style.Text (item != this.SelectedItem ? StateType.Normal : StateType.Selected).ToCairoColor ();
cr.SetSourceColor (Style.Text (item != this.SelectedItem ? StateType.Normal : StateType.Selected).ToCairoColor ());
cr.MoveTo (xpos + ItemLeftPadding + IconSize.Width + ItemIconTextItemSpacing, ypos + (itemDimension.Height - height) / 2);
Pango.CairoHelper.ShowLayout (cr, layout);
} else {
Expand All @@ -309,7 +309,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
}

if (item == mouseOverItem) {
cr.Color = Style.Dark (StateType.Prelight).ToCairoColor ();
cr.SetSourceColor (Style.Dark (StateType.Prelight).ToCairoColor ());
cr.Rectangle (xpos + 0.5, ypos + 0.5, itemDimension.Width - 1, itemDimension.Height - 1);
cr.Stroke ();
}
Expand All @@ -321,7 +321,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
// Closing line when animating the last group of the toolbox
cr.MoveTo (area.X, ypos + 0.5);
cr.RelLineTo (area.Width, 0);
cr.Color = CategoryBorderColor;
cr.SetSourceColor (CategoryBorderColor);
cr.Stroke ();
}

Expand All @@ -344,7 +344,7 @@ void ProcessExpandAnimation (Cairo.Context cr, Category lastCategory, int lastCa

// Clear the area where the category will be drawn since it will be
// drawn over the items being hidden/shown
cr.Color = backColor;
cr.SetSourceColor (backColor);
cr.Rectangle (area.X, newypos, area.Width, ypos - lastCategoryYpos);
cr.Fill ();
ypos = newypos;
Expand Down
Expand Up @@ -41,7 +41,7 @@ namespace MonoDevelop.DesignerSupport
/// This implementation uses a primary sort key (int based on node's group) and
/// a secondary sort key (string based on node's name) for comparison.
/// </remarks>
/// <seealso cref="MonoDevelop.DesignerSupport.ClassOutlineSortingProperties"/>
/// <seealso cref="MonoDevelop.DesignerSupport.ClassOutlineSettings"/>
class ClassOutlineNodeComparer : IComparer<TreeIter>
{
const string DEFAULT_REGION_NAME = "region";
Expand All @@ -54,13 +54,12 @@ class ClassOutlineNodeComparer : IComparer<TreeIter>
/// <param name="ambience">
/// The ambience used on retrieval of node names.
/// </param>
/// <param name="properties">
/// <param name="settings">
/// The properties used on retrieval of node sort keys and sorting settings.
/// </param>
/// <param name="model">
/// The model containing the nodes to compare.
/// </param>

public ClassOutlineNodeComparer (Ambience ambience, ClassOutlineSettings settings, TreeModel model)
{
this.ambience = ambience;
Expand Down Expand Up @@ -91,9 +90,9 @@ public int Compare (TreeIter a, TreeIter b)
/// The second tree node that will be compared.
/// </param>
/// <returns>
/// Less than zero if nodeA < nodeB
/// Less than zero if nodeA &lt; nodeB
/// Zero if nodeA == nodeB.
/// Greater than zero if nodeA > nodeB.
/// Greater than zero if nodeA &gt; nodeB.
/// </returns>
public int CompareNodes (TreeModel model, TreeIter node1, TreeIter node2)
{
Expand Down
Expand Up @@ -54,7 +54,7 @@ namespace MonoDevelop.DesignerSupport
/// The string comparison ignores symbols (e.g. sort 'Foo()' next to '~Foo()').
/// </remarks>
/// <seealso cref="MonoDevelop.DesignerSupport.ClassOutlineNodeComparer"/>
/// <seealso cref="MonoDevelop.DesignerSupport.ClassOutlineSortingProperties"/>
/// <seealso cref="MonoDevelop.DesignerSupport.ClassOutlineSettings"/>
public class ClassOutlineTextEditorExtension : TextEditorExtension, IOutlinedDocument
{
ParsedDocument lastCU = null;
Expand Down
Expand Up @@ -8,7 +8,6 @@ public abstract class PluggableWidget: Gtk.EventBox
internal Application app;
bool initialized;
Gtk.Socket socket;
bool customWidget;
Gtk.Notebook book;

public PluggableWidget (Application app)
Expand Down Expand Up @@ -39,12 +38,10 @@ protected void AddCustomWidget (Gtk.Widget w)
}
else
initialized = true;
customWidget = true;
}

protected void ResetCustomWidget ()
{
customWidget = false;
}

protected override void OnRealized ()
Expand Down
Expand Up @@ -199,7 +199,7 @@ void CreateBgBuffer ()
if (TextEditor.ColorStyle != null) {
using (var cr = Gdk.CairoHelper.Create (backgroundPixbuf)) {
cr.Rectangle (0, 0, curWidth, curHeight);
cr.Color = TextEditor.ColorStyle.PlainText.Background;
cr.SetSourceColor (TextEditor.ColorStyle.PlainText.Background);
cr.Fill ();
}
}
Expand Down Expand Up @@ -229,7 +229,7 @@ public BgBufferUpdate (Minimpap mode)
int h = mode.backgroundBuffer.ClipRegion.Clipbox.Height;
cr.Rectangle (0, 0, w, h);
if (mode.TextEditor.ColorStyle != null)
cr.Color = mode.TextEditor.ColorStyle.PlainText.Background;
cr.SetSourceColor (mode.TextEditor.ColorStyle.PlainText.Background);
cr.Fill ();

maxLine = mode.TextEditor.GetTextEditorData ().VisibleLineCount;
Expand Down Expand Up @@ -306,7 +306,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
} else {
cr.Rectangle (0, 0, Allocation.Width, Allocation.Height);
if (TextEditor.ColorStyle != null)
cr.Color = TextEditor.ColorStyle.PlainText.Background;
cr.SetSourceColor (TextEditor.ColorStyle.PlainText.Background);
cr.Fill ();
}
/*
Expand All @@ -329,7 +329,7 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
lineHeight * vadjustment.PageSize / TextEditor.LineHeight);
var c = (Cairo.Color)(HslColor)Style.Dark (State);
c.A = 0.2;
cr.Color = c;
cr.SetSourceColor (c);
cr.Fill ();
}
DrawLeftBorder (cr);
Expand Down
Expand Up @@ -406,19 +406,19 @@ protected void DrawSearchIndicator (Cairo.Context cr)

if (flatStyle) {
using (var pattern = new Cairo.SolidPattern (TextEditor.ColorStyle.SearchResultMain.Color)) {
cr.Pattern = pattern;
cr.SetSource (pattern);
cr.FillPreserve ();
}
} else {
using (var pattern = new Cairo.RadialGradient (x1, y1, Allocation.Width / 2, x1 - Allocation.Width, y1 - Allocation.Width, Allocation.Width)) {
pattern.AddColorStop (0, darkColor);
pattern.AddColorStop (1, TextEditor.ColorStyle.SearchResultMain.Color);
cr.Pattern = pattern;
cr.SetSource (pattern);
cr.FillPreserve ();
}
}

cr.Color = darkColor;
cr.SetSourceColor (darkColor);
cr.Stroke ();
}

Expand Down Expand Up @@ -452,7 +452,7 @@ protected void DrawCaret (Cairo.Context cr)
cr.LineTo (7, y);
cr.LineTo (0, y + 4);
cr.ClosePath ();
cr.Color = TextEditor.ColorStyle.PlainText.Foreground;
cr.SetSourceColor (TextEditor.ColorStyle.PlainText.Foreground);
cr.Fill ();
}

Expand Down Expand Up @@ -485,7 +485,7 @@ protected Severity DrawQuickTasks (Cairo.Context cr)
foreach (var task in AllTasks) {
double y = GetYPosition (task.Location.Line);

cr.Color = GetBarColor (task.Severity);
cr.SetSourceColor (GetBarColor (task.Severity));
cr.Rectangle (barPadding, Math.Round (y) - 1, Allocation.Width - barPadding * 2, 2);
cr.Fill ();

Expand All @@ -511,7 +511,7 @@ protected void DrawLeftBorder (Cairo.Context cr)
if (!flatStyle) {
col.L *= 0.88;
}
cr.Color = col;
cr.SetSourceColor (col);
}
cr.Stroke ();
}
Expand Down Expand Up @@ -544,7 +544,7 @@ protected virtual void DrawBar (Cairo.Context cr)
color.L = flatStyle? 0.7 : 0.5;
var c = (Cairo.Color)color;
c.A = 0.6;
cr.Color = c;
cr.SetSourceColor (c);
cr.Fill ();
}

Expand All @@ -556,7 +556,7 @@ protected void DrawSearchResults (Cairo.Context cr)
bool isMainSelection = false;
if (!TextEditor.TextViewMargin.MainSearchResult.IsInvalid)
isMainSelection = region.Offset == TextEditor.TextViewMargin.MainSearchResult.Offset;
cr.Color = isMainSelection ? TextEditor.ColorStyle.SearchResultMain.Color : TextEditor.ColorStyle.SearchResult.Color;
cr.SetSourceColor (isMainSelection ? TextEditor.ColorStyle.SearchResultMain.Color : TextEditor.ColorStyle.SearchResult.Color);
cr.Rectangle (barPadding, Math.Round (y) - 1, Allocation.Width - barPadding * 2, 2);
cr.Fill ();
}
Expand All @@ -575,14 +575,14 @@ protected override bool OnExposeEvent (Gdk.EventExpose e)
col.L *= 0.95;
if (flatStyle) {
using (var pattern = new Cairo.SolidPattern (col)) {
cr.Pattern = pattern;
cr.SetSource (pattern);
}
} else {
using (var grad = new Cairo.LinearGradient (0, 0, Allocation.Width, 0)) {
grad.AddColorStop (0, col);
grad.AddColorStop (0.7, TextEditor.ColorStyle.PlainText.Background);
grad.AddColorStop (1, col);
cr.Pattern = grad;
cr.SetSource (grad);
}
}
}
Expand Down
Expand Up @@ -112,15 +112,15 @@ protected override void OnDrawContent (Gdk.EventExpose evnt, Cairo.Context g)
{
Theme.BorderColor = marker.TagColor.Color;
g.Rectangle (0, 0, Allocation.Width, Allocation.Height);
g.Color = marker.TagColor.Color;
g.SetSourceColor (marker.TagColor.Color);
g.Fill ();

double y = 8;
double x = 4;
foreach (var layout in marker.Layouts) {
g.Save ();
g.Translate (x, y);
g.Color = marker.TagColor.SecondColor;
g.SetSourceColor (marker.TagColor.SecondColor);
g.ShowLayout (layout.Layout);
g.Restore ();
y += layout.Height;
Expand Down

0 comments on commit a47449b

Please sign in to comment.