[Settings]Order new PowerToys after renames (#20208)

This commit is contained in:
Jaime Bernardo
2022-08-31 20:43:23 +01:00
committed by GitHub
parent 9b3e8503a8
commit 82ff6400eb
5 changed files with 44 additions and 50 deletions

View File

@@ -122,11 +122,11 @@ namespace Microsoft.PowerToys.Settings.UI
case "ImageResizer": StartupPage = typeof(Views.ImageResizerPage); break; case "ImageResizer": StartupPage = typeof(Views.ImageResizerPage); break;
case "KBM": StartupPage = typeof(Views.KeyboardManagerPage); break; case "KBM": StartupPage = typeof(Views.KeyboardManagerPage); break;
case "MouseUtils": StartupPage = typeof(Views.MouseUtilsPage); break; case "MouseUtils": StartupPage = typeof(Views.MouseUtilsPage); break;
case "QuickAccent": StartupPage = typeof(Views.PowerAccentPage); break;
case "TextExtractor": StartupPage = typeof(Views.PowerOcrPage); break;
case "PowerRename": StartupPage = typeof(Views.PowerRenamePage); break; case "PowerRename": StartupPage = typeof(Views.PowerRenamePage); break;
case "QuickAccent": StartupPage = typeof(Views.PowerAccentPage); break;
case "FileExplorer": StartupPage = typeof(Views.PowerPreviewPage); break; case "FileExplorer": StartupPage = typeof(Views.PowerPreviewPage); break;
case "ShortcutGuide": StartupPage = typeof(Views.ShortcutGuidePage); break; case "ShortcutGuide": StartupPage = typeof(Views.ShortcutGuidePage); break;
case "TextExtractor": StartupPage = typeof(Views.PowerOcrPage); break;
case "VideoConference": StartupPage = typeof(Views.VideoConferencePage); break; case "VideoConference": StartupPage = typeof(Views.VideoConferencePage); break;
case "MeasureTool": StartupPage = typeof(Views.MeasureToolPage); break; case "MeasureTool": StartupPage = typeof(Views.MeasureToolPage); break;
default: Debug.Assert(false, "Unexpected SettingsWindow argument value"); break; default: Debug.Assert(false, "Unexpected SettingsWindow argument value"); break;

View File

@@ -15,11 +15,11 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Enums
ImageResizer, ImageResizer,
KBM, KBM,
MouseUtils, MouseUtils,
QuickAccent,
TextExtractor,
PowerRename, PowerRename,
Run, Run,
QuickAccent,
ShortcutGuide, ShortcutGuide,
TextExtractor,
VideoConference, VideoConference,
MeasureTool, MeasureTool,
WhatsNew, WhatsNew,

View File

@@ -97,20 +97,6 @@
ShowAsMonochrome="False" /> ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_QuickAccent" Tag="QuickAccent">
<muxc:NavigationViewItem.Icon>
<BitmapIcon
UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerAccent.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_TextExtractor" Tag="TextExtractor">
<muxc:NavigationViewItem.Icon>
<BitmapIcon
UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerOCR.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_PowerRename" Tag="PowerRename"> <muxc:NavigationViewItem x:Uid="Shell_PowerRename" Tag="PowerRename">
<muxc:NavigationViewItem.Icon> <muxc:NavigationViewItem.Icon>
<BitmapIcon <BitmapIcon
@@ -125,6 +111,13 @@
ShowAsMonochrome="False" /> ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_QuickAccent" Tag="QuickAccent">
<muxc:NavigationViewItem.Icon>
<BitmapIcon
UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerAccent.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_MeasureTool" Tag="MeasureTool"> <muxc:NavigationViewItem x:Uid="Shell_MeasureTool" Tag="MeasureTool">
<muxc:NavigationViewItem.Icon> <muxc:NavigationViewItem.Icon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
@@ -138,6 +131,13 @@
ShowAsMonochrome="False" /> ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_TextExtractor" Tag="TextExtractor">
<muxc:NavigationViewItem.Icon>
<BitmapIcon
UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerOCR.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_VideoConference" Tag="VideoConference"> <muxc:NavigationViewItem x:Uid="Shell_VideoConference" Tag="VideoConference">
<muxc:NavigationViewItem.Icon> <muxc:NavigationViewItem.Icon>
<BitmapIcon <BitmapIcon

View File

@@ -102,19 +102,6 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
ModuleName = "MouseUtils", ModuleName = "MouseUtils",
IsNew = true, IsNew = true,
}); });
Modules.Insert((int)PowerToysModules.QuickAccent, new OobePowerToysModule()
{
ModuleName = "QuickAccent",
IsNew = true,
});
Modules.Insert((int)PowerToysModules.TextExtractor, new OobePowerToysModule()
{
ModuleName = "TextExtractor",
IsNew = true,
});
Modules.Insert((int)PowerToysModules.PowerRename, new OobePowerToysModule() Modules.Insert((int)PowerToysModules.PowerRename, new OobePowerToysModule()
{ {
ModuleName = "PowerRename", ModuleName = "PowerRename",
@@ -125,11 +112,21 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
ModuleName = "Run", ModuleName = "Run",
IsNew = false, IsNew = false,
}); });
Modules.Insert((int)PowerToysModules.QuickAccent, new OobePowerToysModule()
{
ModuleName = "QuickAccent",
IsNew = true,
});
Modules.Insert((int)PowerToysModules.ShortcutGuide, new OobePowerToysModule() Modules.Insert((int)PowerToysModules.ShortcutGuide, new OobePowerToysModule()
{ {
ModuleName = "ShortcutGuide", ModuleName = "ShortcutGuide",
IsNew = false, IsNew = false,
}); });
Modules.Insert((int)PowerToysModules.TextExtractor, new OobePowerToysModule()
{
ModuleName = "TextExtractor",
IsNew = true,
});
Modules.Insert((int)PowerToysModules.VideoConference, new OobePowerToysModule() Modules.Insert((int)PowerToysModules.VideoConference, new OobePowerToysModule()
{ {
@@ -189,11 +186,11 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break; case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break;
case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break; case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break;
case "KBM": NavigationFrame.Navigate(typeof(OobeKBM)); break; case "KBM": NavigationFrame.Navigate(typeof(OobeKBM)); break;
case "QuickAccent": NavigationFrame.Navigate(typeof(OobePowerAccent)); break;
case "PowerRename": NavigationFrame.Navigate(typeof(OobePowerRename)); break; case "PowerRename": NavigationFrame.Navigate(typeof(OobePowerRename)); break;
case "TextExtractor": NavigationFrame.Navigate(typeof(OobePowerOCR)); break; case "QuickAccent": NavigationFrame.Navigate(typeof(OobePowerAccent)); break;
case "FileExplorer": NavigationFrame.Navigate(typeof(OobeFileExplorer)); break; case "FileExplorer": NavigationFrame.Navigate(typeof(OobeFileExplorer)); break;
case "ShortcutGuide": NavigationFrame.Navigate(typeof(OobeShortcutGuide)); break; case "ShortcutGuide": NavigationFrame.Navigate(typeof(OobeShortcutGuide)); break;
case "TextExtractor": NavigationFrame.Navigate(typeof(OobePowerOCR)); break;
case "VideoConference": NavigationFrame.Navigate(typeof(OobeVideoConference)); break; case "VideoConference": NavigationFrame.Navigate(typeof(OobeVideoConference)); break;
case "MouseUtils": NavigationFrame.Navigate(typeof(OobeMouseUtils)); break; case "MouseUtils": NavigationFrame.Navigate(typeof(OobeMouseUtils)); break;
case "MeasureTool": NavigationFrame.Navigate(typeof(OobeMeasureTool)); break; case "MeasureTool": NavigationFrame.Navigate(typeof(OobeMeasureTool)); break;

View File

@@ -95,33 +95,23 @@
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_QuickAccent"
helpers:NavHelper.NavigateTo="views:PowerAccentPage">
<muxc:NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerAccent.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_PowerRename" helpers:NavHelper.NavigateTo="views:PowerRenamePage"> <muxc:NavigationViewItem x:Uid="Shell_PowerRename" helpers:NavHelper.NavigateTo="views:PowerRenamePage">
<muxc:NavigationViewItem.Icon> <muxc:NavigationViewItem.Icon>
<BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerRename.png" /> <BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerRename.png" />
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_TextExtractor"
helpers:NavHelper.NavigateTo="views:PowerOcrPage">
<muxc:NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerOcr.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_PowerLauncher" helpers:NavHelper.NavigateTo="views:PowerLauncherPage"> <muxc:NavigationViewItem x:Uid="Shell_PowerLauncher" helpers:NavHelper.NavigateTo="views:PowerLauncherPage">
<muxc:NavigationViewItem.Icon> <muxc:NavigationViewItem.Icon>
<BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerToysRun.png" /> <BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerToysRun.png" />
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_QuickAccent"
helpers:NavHelper.NavigateTo="views:PowerAccentPage">
<muxc:NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerAccent.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_MeasureTool" helpers:NavHelper.NavigateTo="views:MeasureToolPage"> <muxc:NavigationViewItem x:Uid="Shell_MeasureTool" helpers:NavHelper.NavigateTo="views:MeasureToolPage">
<muxc:NavigationViewItem.Icon> <muxc:NavigationViewItem.Icon>
<BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsScreenRuler.png" /> <BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsScreenRuler.png" />
@@ -132,6 +122,13 @@
<BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsShortcutGuide.png" /> <BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/FluentIcons/FluentIconsShortcutGuide.png" />
</muxc:NavigationViewItem.Icon> </muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem> </muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_TextExtractor"
helpers:NavHelper.NavigateTo="views:PowerOcrPage">
<muxc:NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerOcr.png"
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem <muxc:NavigationViewItem
x:Uid="Shell_VideoConference" x:Uid="Shell_VideoConference"