Browse Source

Fix #2017: Make sure we never use an empty string as tab header

pull/2030/head
Siegfried Pammer 5 years ago
parent
commit
dcb9631677
  1. 9
      ILSpy/Properties/Resources.Designer.cs
  2. 3
      ILSpy/Properties/Resources.resx
  3. 2
      ILSpy/TextView/AvalonEditTextOutput.cs
  4. 5
      ILSpy/ViewModels/TabPageModel.cs

9
ILSpy/Properties/Resources.Designer.cs generated

@ -1533,6 +1533,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -1533,6 +1533,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to New Tab.
/// </summary>
public static string NewTab {
get {
return ResourceManager.GetString("NewTab", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Nuget Package Browser.
/// </summary>

3
ILSpy/Properties/Resources.resx

@ -876,4 +876,7 @@ Do you want to continue?</value> @@ -876,4 +876,7 @@ Do you want to continue?</value>
Do you want to proceed?</value>
</data>
<data name="NewTab" xml:space="preserve">
<value>New Tab</value>
</data>
</root>

2
ILSpy/TextView/AvalonEditTextOutput.cs

@ -82,7 +82,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -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;
/// <summary>
/// Gets/sets the <see cref="Uri"/> that is displayed by this view.

5
ILSpy/ViewModels/TabPageModel.cs

@ -28,6 +28,11 @@ namespace ICSharpCode.ILSpy.ViewModels @@ -28,6 +28,11 @@ namespace ICSharpCode.ILSpy.ViewModels
{
private readonly Dictionary<Language, LanguageVersion> languageVersionHistory = new Dictionary<Language, LanguageVersion>();
public TabPageModel()
{
this.Title = Properties.Resources.NewTab;
}
private Language language;
public Language Language {
get => language;

Loading…
Cancel
Save