Browse Source

Drop the redundant "Freeze current tab" main-menu entry

Freezing the preview tab is already offered by the on-tab snowflake button and
the tab's right-click "Freeze tab" entry, so the Window-menu command duplicated
an action that is more naturally invoked on the tab itself. DockWorkspace.
FreezeCurrentTab stays -- both remaining affordances call it.

Assisted-by: Claude:claude-opus-4-8:Claude Code
pull/3755/head
Siegfried Pammer 1 month ago
parent
commit
18f6087ab5
  1. 15
      ILSpy/Commands/WindowCommands.cs
  2. 9
      ILSpy/Properties/Resources.Designer.cs
  3. 3
      ILSpy/Properties/Resources.resx

15
ILSpy/Commands/WindowCommands.cs

@ -39,19 +39,4 @@ namespace ILSpy.Commands
{ {
public override void Execute(object? parameter) => dockWorkspace.ResetLayout(); public override void Execute(object? parameter) => dockWorkspace.ResetLayout();
} }
/// <summary>
/// VS-style "promote preview tab" command. The persistent MainTab starts as preview
/// (its content is replaced by tree-node selections); freezing makes it a regular tab
/// that keeps its content, and a fresh preview MainTab takes over the
/// tree-selection slot. <see cref="DockWorkspace.FreezeCurrentTab"/> is a no-op when
/// there's nothing freezable (no MainTab, or MainTab already frozen).
/// </summary>
[ExportMainMenuCommand(Header = nameof(Resources.Window_FreezeCurrentTab), ParentMenuID = nameof(Resources._Window), MenuCategory = "Window", MenuOrder = 0)]
[Shared]
[method: ImportingConstructor]
sealed class FreezeCurrentTabCommand(DockWorkspace dockWorkspace) : SimpleCommand
{
public override void Execute(object? parameter) => dockWorkspace.FreezeCurrentTab();
}
} }

9
ILSpy/Properties/Resources.Designer.cs generated

@ -3160,15 +3160,6 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to _Pin current tab.
/// </summary>
public static string Window_FreezeCurrentTab {
get {
return ResourceManager.GetString("Window_FreezeCurrentTab", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to _Reset layout. /// Looks up a localized string similar to _Reset layout.
/// </summary> /// </summary>

3
ILSpy/Properties/Resources.resx

@ -1084,9 +1084,6 @@ Do you want to continue?</value>
<data name="Window_CloseAllDocuments" xml:space="preserve"> <data name="Window_CloseAllDocuments" xml:space="preserve">
<value>_Close all documents</value> <value>_Close all documents</value>
</data> </data>
<data name="Window_FreezeCurrentTab" xml:space="preserve">
<value>_Freeze current tab</value>
</data>
<data name="Window_ResetLayout" xml:space="preserve"> <data name="Window_ResetLayout" xml:space="preserve">
<value>_Reset layout</value> <value>_Reset layout</value>
</data> </data>

Loading…
Cancel
Save