From dcb9631677e41a8425b547b54bde67ab465a2041 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 24 May 2020 13:27:31 +0200 Subject: [PATCH] Fix #2017: Make sure we never use an empty string as tab header --- ILSpy/Properties/Resources.Designer.cs | 9 +++++++++ ILSpy/Properties/Resources.resx | 3 +++ ILSpy/TextView/AvalonEditTextOutput.cs | 2 +- ILSpy/ViewModels/TabPageModel.cs | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ILSpy/Properties/Resources.Designer.cs b/ILSpy/Properties/Resources.Designer.cs index 51507cb90..2da4b683b 100644 --- a/ILSpy/Properties/Resources.Designer.cs +++ b/ILSpy/Properties/Resources.Designer.cs @@ -1533,6 +1533,15 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to New Tab. + /// + public static string NewTab { + get { + return ResourceManager.GetString("NewTab", resourceCulture); + } + } + /// /// Looks up a localized string similar to Nuget Package Browser. /// diff --git a/ILSpy/Properties/Resources.resx b/ILSpy/Properties/Resources.resx index b8708bf57..6f172298d 100644 --- a/ILSpy/Properties/Resources.resx +++ b/ILSpy/Properties/Resources.resx @@ -876,4 +876,7 @@ Do you want to continue? Do you want to proceed? + + New Tab + \ No newline at end of file diff --git a/ILSpy/TextView/AvalonEditTextOutput.cs b/ILSpy/TextView/AvalonEditTextOutput.cs index 5c2bb7203..3259ccf1b 100644 --- a/ILSpy/TextView/AvalonEditTextOutput.cs +++ b/ILSpy/TextView/AvalonEditTextOutput.cs @@ -82,7 +82,7 @@ namespace ICSharpCode.ILSpy.TextView public string IndentationString { get; set; } = "\t"; - public string Title { get; set; } + public string Title { get; set; } = Properties.Resources.NewTab; /// /// Gets/sets the that is displayed by this view. diff --git a/ILSpy/ViewModels/TabPageModel.cs b/ILSpy/ViewModels/TabPageModel.cs index d54566d3f..faa4c7f83 100644 --- a/ILSpy/ViewModels/TabPageModel.cs +++ b/ILSpy/ViewModels/TabPageModel.cs @@ -28,6 +28,11 @@ namespace ICSharpCode.ILSpy.ViewModels { private readonly Dictionary languageVersionHistory = new Dictionary(); + public TabPageModel() + { + this.Title = Properties.Resources.NewTab; + } + private Language language; public Language Language { get => language;