Skip to content

Commit 8a4a8be

Browse files
committed
ux: remove workspace switcher popup and its hotkey binding (#1855)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 6d13ba6 commit 8a4a8be

File tree

8 files changed

+2
-274
lines changed

8 files changed

+2
-274
lines changed

src/Resources/Locales/en_US.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@
467467
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">Go to previous tab</x:String>
468468
<x:String x:Key="Text.Hotkeys.Global.NewTab" xml:space="preserve">Create new tab</x:String>
469469
<x:String x:Key="Text.Hotkeys.Global.OpenPreferences" xml:space="preserve">Open Preferences dialog</x:String>
470-
<x:String x:Key="Text.Hotkeys.Global.SwitchWorkspace" xml:space="preserve">Switch active workspace</x:String>
471470
<x:String x:Key="Text.Hotkeys.Global.SwitchTab" xml:space="preserve">Switch active tab</x:String>
472471
<x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String>
473472
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Commit staged changes</x:String>

src/ViewModels/Launcher.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ public void Quit()
127127
_ignoreIndexChange = false;
128128
}
129129

130-
public void OpenWorkspaceSwitcher()
131-
{
132-
Switcher = new WorkspaceSwitcher(this);
133-
}
134-
135130
public void OpenTabSwitcher()
136131
{
137132
Switcher = new LauncherPageSwitcher(this);

src/ViewModels/WorkspaceSwitcher.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/Views/Hotkeys.axaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Increase}}"
4646
Margin="0,0,0,8"/>
4747

48-
<Grid RowDefinitions="20,20,20,20,20,20,20,20,20" ColumnDefinitions="150,*">
48+
<Grid RowDefinitions="20,20,20,20,20,20,20,20" ColumnDefinitions="150,*">
4949
<TextBlock Grid.Row="0" Grid.Column="0" Classes="bold" Text="{OnPlatform Ctrl+\,, macOS=⌘+\,}"/>
5050
<TextBlock Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.OpenPreferences}"/>
5151

@@ -67,9 +67,6 @@
6767
<TextBlock Grid.Row="6" Grid.Column="0" Classes="bold" Text="{OnPlatform Ctrl+Q, macOS=⌘+Q}"/>
6868
<TextBlock Grid.Row="6" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Quit}" />
6969

70-
<TextBlock Grid.Row="7" Grid.Column="0" Classes="bold" Text="{OnPlatform Ctrl+Shift+P, macOS=⌘+⇧+P}"/>
71-
<TextBlock Grid.Row="7" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.SwitchWorkspace}" />
72-
7370
<TextBlock Grid.Row="8" Grid.Column="0" Classes="bold" Text="{OnPlatform Ctrl+P, macOS=⌘+P}"/>
7471
<TextBlock Grid.Row="8" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.SwitchTab}" />
7572
</Grid>

src/Views/Launcher.axaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
</ContentControl.DataTemplates>
119119
</ContentControl>
120120

121-
<!-- Workspace/Pages Switcher -->
121+
<!-- Pages Switcher -->
122122
<Border Grid.Row="0" Grid.RowSpan="2"
123123
Background="Transparent"
124124
IsVisible="{Binding Switcher, Converter={x:Static ObjectConverters.IsNotNull}}"
@@ -127,10 +127,6 @@
127127
<Border Background="{DynamicResource Brush.Popup}" CornerRadius="8">
128128
<ContentControl Margin="16,10,16,12" Content="{Binding Switcher}">
129129
<ContentControl.DataTemplates>
130-
<DataTemplate DataType="vm:WorkspaceSwitcher">
131-
<v:WorkspaceSwitcher/>
132-
</DataTemplate>
133-
134130
<DataTemplate DataType="vm:LauncherPageSwitcher">
135131
<v:LauncherPageSwitcher/>
136132
</DataTemplate>

src/Views/Launcher.axaml.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,6 @@ protected override async void OnKeyDown(KeyEventArgs e)
174174

175175
if (e.KeyModifiers.HasFlag(OperatingSystem.IsMacOS() ? KeyModifiers.Meta : KeyModifiers.Control))
176176
{
177-
if (e.KeyModifiers.HasFlag(KeyModifiers.Shift) && e.Key == Key.P)
178-
{
179-
vm.OpenWorkspaceSwitcher();
180-
e.Handled = true;
181-
return;
182-
}
183-
184177
if (e.Key == Key.P)
185178
{
186179
vm.OpenTabSwitcher();
@@ -329,7 +322,6 @@ private void OnOpenWorkspaceMenu(object sender, RoutedEventArgs e)
329322

330323
var workspaces = new MenuItem();
331324
workspaces.Header = groupHeader;
332-
workspaces.Tag = OperatingSystem.IsMacOS() ? "⌘+⇧+P" : "Ctrl+Shift+P";
333325
workspaces.IsEnabled = false;
334326
menu.Items.Add(workspaces);
335327

src/Views/WorkspaceSwitcher.axaml

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/Views/WorkspaceSwitcher.axaml.cs

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)