From 93826f5e3cd0917f1e5ba7fc228a82f80424804d Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 5 Feb 2011 00:46:55 +0100 Subject: [PATCH] Bugfixes. --- ICSharpCode.Decompiler/GraphVizGraph.cs | 1 + ILSpy/FilterSettings.cs | 4 ++-- ILSpy/MainWindow.xaml.cs | 2 ++ ILSpy/TypeTreeNode.cs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.Decompiler/GraphVizGraph.cs b/ICSharpCode.Decompiler/GraphVizGraph.cs index 8b4be1465..fcfb65234 100644 --- a/ICSharpCode.Decompiler/GraphVizGraph.cs +++ b/ICSharpCode.Decompiler/GraphVizGraph.cs @@ -93,6 +93,7 @@ namespace ICSharpCode.Decompiler public void Save(TextWriter writer) { writer.WriteLine("digraph G {"); + writer.WriteLine("node [fontsize = 14.5];"); WriteGraphAttribute(writer, "rankdir", rankdir); foreach (GraphVizNode node in nodes) { node.Save(writer); diff --git a/ILSpy/FilterSettings.cs b/ILSpy/FilterSettings.cs index 4b25fa7b6..49556dedb 100644 --- a/ILSpy/FilterSettings.cs +++ b/ILSpy/FilterSettings.cs @@ -45,12 +45,12 @@ namespace ICSharpCode.ILSpy public bool SearchTermMatches(string text) { - if (searchTerm == null) + if (string.IsNullOrEmpty(searchTerm)) return true; return text.IndexOf(searchTerm, StringComparison.OrdinalIgnoreCase) >= 0; } - bool showInternalApi; + bool showInternalApi = true; public bool ShowInternalApi { get { return showInternalApi; } diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 7c8619bfb..7fe33f836 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -138,6 +138,8 @@ namespace ICSharpCode.ILSpy void ShowGraph(string name, GraphVizGraph graph) { + foreach (char c in Path.GetInvalidFileNameChars()) + name = name.Replace(c, '-'); string fileName = Path.Combine(Path.GetTempPath(), name); graph.Save(fileName + ".gv"); Process.Start("dot", "\"" + fileName + ".gv\" -Tpng -o \"" + fileName + ".png\"").WaitForExit(); diff --git a/ILSpy/TypeTreeNode.cs b/ILSpy/TypeTreeNode.cs index 552df5033..4bca4e0b4 100644 --- a/ILSpy/TypeTreeNode.cs +++ b/ILSpy/TypeTreeNode.cs @@ -79,7 +79,7 @@ namespace ICSharpCode.ILSpy public override FilterResult Filter(FilterSettings settings) { - if (settings.ShowInternalApi == false && IsPublicAPI) + if (!settings.ShowInternalApi && !IsPublicAPI) return FilterResult.Hidden; if (settings.SearchTermMatches(type.Name)) return FilterResult.Match;