Organize menu items
MODIFY
WalletWasabi.Gui/Shell/MainMenu/FileMainMenuItems.cs
WalletWasabi.Gui/Shell/MainMenu/FileMainMenuItems.cs
@@ -17,69 +17,85 @@ namespace WalletWasabi.Gui.Shell.MainMenu
MenuItemFactory = menuItemFactory;
}
+ #region MainMenu
+
[ExportMainMenuItem("File")]
[DefaultOrder(0)]
public IMenuItem File => MenuItemFactory.CreateHeaderMenuItem("File", null);
+ #endregion MainMenu
+
+ #region Group
+
[ExportMainMenuDefaultGroup("File", "Wallet")]
[DefaultOrder(0)]
public object WalletGroup => null;
- [ExportMainMenuItem("File", "Generate Wallet")]
+ [ExportMainMenuDefaultGroup("File", "Disk")]
[DefaultOrder(1)]
+ public object DiskGroup => null;
+
+ [ExportMainMenuDefaultGroup("File", "Exit")]
+ [DefaultOrder(2)]
+ public object ExitGroup => null;
+
+ #endregion Group
+
+ #region MenuItem
+
+ [ExportMainMenuItem("File", "Generate Wallet")]
+ [DefaultOrder(0)]
[DefaultGroup("Wallet")]
public IMenuItem GenerateWallet => MenuItemFactory.CreateCommandMenuItem("File.GenerateWallet");
[ExportMainMenuItem("File", "Recover Wallet")]
- [DefaultOrder(2)]
+ [DefaultOrder(1)]
[DefaultGroup("Wallet")]
public IMenuItem Recover => MenuItemFactory.CreateCommandMenuItem("File.RecoverWallet");
[ExportMainMenuItem("File", "Load Wallet")]
- [DefaultOrder(3)]
+ [DefaultOrder(2)]
[DefaultGroup("Wallet")]
public IMenuItem LoadWallet => MenuItemFactory.CreateCommandMenuItem("File.LoadWallet");
- [ExportMainMenuDefaultGroup("File", "Disk")]
- [DefaultOrder(10)]
- public object DiskGroup => null;
-
[ExportMainMenuItem("File", "Open")]
- [DefaultOrder(11)]
+ [DefaultOrder(3)]
public IMenuItem Open => MenuItemFactory.CreateHeaderMenuItem("Open", null);
+ [ExportMainMenuItem("File", "Exit")]
+ [DefaultOrder(4)]
+ [DefaultGroup("Exit")]
+ public IMenuItem Exit => MenuItemFactory.CreateCommandMenuItem("File.Exit");
+
+ #endregion MenuItem
+
+ #region SubMenuItem
+
[ExportMainMenuItem("File", "Open", "Data Folder")]
- [DefaultOrder(111)]
+ [DefaultOrder(0)]
[DefaultGroup("Disk")]
public IMenuItem OpenDataFolder => MenuItemFactory.CreateCommandMenuItem("File.Open.DataFolder");
[ExportMainMenuItem("File", "Open", "Wallets Folder")]
- [DefaultOrder(112)]
+ [DefaultOrder(1)]
[DefaultGroup("Disk")]
public IMenuItem OpenWalletsFolder => MenuItemFactory.CreateCommandMenuItem("File.Open.WalletsFolder");
[ExportMainMenuItem("File", "Open", "Log File")]
- [DefaultOrder(113)]
+ [DefaultOrder(2)]
[DefaultGroup("Disk")]
public IMenuItem OpenLogFile => MenuItemFactory.CreateCommandMenuItem("File.Open.LogFile");
[ExportMainMenuItem("File", "Open", "Tor Log File")]
- [DefaultOrder(114)]
+ [DefaultOrder(3)]
[DefaultGroup("Disk")]
public IMenuItem OpenTorLogFile => MenuItemFactory.CreateCommandMenuItem("File.Open.TorLogFile");
[ExportMainMenuItem("File", "Open", "Config File")]
- [DefaultOrder(115)]
+ [DefaultOrder(4)]
[DefaultGroup("Disk")]
public IMenuItem OpenConfigFile => MenuItemFactory.CreateCommandMenuItem("File.Open.ConfigFile");
- [ExportMainMenuDefaultGroup("File", "Exit")]
- [DefaultOrder(1000)]
- public object ExitGroup => null;
-
- [ExportMainMenuItem("File", "Exit")]
- [DefaultOrder(1001)]
- [DefaultGroup("Exit")]
- public IMenuItem Exit => MenuItemFactory.CreateCommandMenuItem("File.Exit");
+ #endregion SubMenuItem
}
}

MODIFY
WalletWasabi.Gui/Shell/MainMenu/HelpMainMenuItems.cs
WalletWasabi.Gui/Shell/MainMenu/HelpMainMenuItems.cs
@@ -17,59 +17,71 @@ namespace WalletWasabi.Gui.Shell.MainMenu
MenuItemFactory = menuItemFactory;
}
+ #region MainMenu
+
[ExportMainMenuItem("Help")]
- [DefaultOrder(40)]
+ [DefaultOrder(2)]
public IMenuItem Tools => MenuItemFactory.CreateHeaderMenuItem("Help", null);
+ #endregion MainMenu
+
+ #region Group
+
[ExportMainMenuDefaultGroup("Help", "About")]
[DefaultOrder(0)]
public object AboutGroup => null;
+ [ExportMainMenuDefaultGroup("Help", "Support")]
+ [DefaultOrder(1)]
+ public object SupportGroup => null;
+
+ [ExportMainMenuDefaultGroup("Help", "Legal")]
+ [DefaultOrder(2)]
+ public object LegalGroup => null;
+
+ #endregion Group
+
+ #region MenuItem
+
[ExportMainMenuItem("Help", "About")]
[DefaultOrder(0)]
[DefaultGroup("About")]
public IMenuItem About => MenuItemFactory.CreateCommandMenuItem("Help.About");
- [ExportMainMenuDefaultGroup("Help", "Support")]
- [DefaultOrder(100)]
- public object SupportGroup => null;
+#if DEBUG
+
+ [ExportMainMenuItem("Help", "Dev Tools")]
+ [DefaultOrder(1)]
+ [DefaultGroup("About")]
+ public IMenuItem DevTools => MenuItemFactory.CreateCommandMenuItem("Help.DevTools");
+
+#endif
[ExportMainMenuItem("Help", "CustomerSupport")]
- [DefaultOrder(0)]
+ [DefaultOrder(2)]
[DefaultGroup("Support")]
public IMenuItem CustomerSupport => MenuItemFactory.CreateCommandMenuItem("Help.CustomerSupport");
[ExportMainMenuItem("Help", "ReportBug")]
- [DefaultOrder(1)]
+ [DefaultOrder(3)]
[DefaultGroup("Support")]
public IMenuItem ReportBug => MenuItemFactory.CreateCommandMenuItem("Help.ReportBug");
- [ExportMainMenuDefaultGroup("Help", "Legal")]
- [DefaultOrder(200)]
- public object LegalGroup => null;
-
[ExportMainMenuItem("Help", "PrivacyPolicy")]
- [DefaultOrder(0)]
+ [DefaultOrder(4)]
[DefaultGroup("Legal")]
public IMenuItem PrivacyPolicy => MenuItemFactory.CreateCommandMenuItem("Help.PrivacyPolicy");
[ExportMainMenuItem("Help", "TermsAndConditions")]
- [DefaultOrder(1)]
+ [DefaultOrder(5)]
[DefaultGroup("Legal")]
public IMenuItem TermsAndConditions => MenuItemFactory.CreateCommandMenuItem("Help.TermsAndConditions");
[ExportMainMenuItem("Help", "LegalIssues")]
- [DefaultOrder(2)]
+ [DefaultOrder(6)]
[DefaultGroup("Legal")]
public IMenuItem LegalIssues => MenuItemFactory.CreateCommandMenuItem("Help.LegalIssues");
-#if DEBUG
-
- [ExportMainMenuItem("Help", "Dev Tools")]
- [DefaultOrder(300)]
- [DefaultGroup("About")]
- public IMenuItem DevTools => MenuItemFactory.CreateCommandMenuItem("Help.DevTools");
-
-#endif
+ #endregion MenuItem
}
}

MODIFY
WalletWasabi.Gui/Shell/MainMenu/ToolsMainMenuItems.cs
WalletWasabi.Gui/Shell/MainMenu/ToolsMainMenuItems.cs
@@ -17,26 +17,38 @@ namespace WalletWasabi.Gui.Shell.MainMenu
_menuItemFactory = menuItemFactory;
}
+ #region MainMenu
+
[ExportMainMenuItem("Tools")]
- [DefaultOrder(20)]
+ [DefaultOrder(1)]
public IMenuItem Tools => _menuItemFactory.CreateHeaderMenuItem("Tools", null);
+ #endregion MainMenu
+
+ #region Group
+
[ExportMainMenuDefaultGroup("Tools", "Wallet")]
[DefaultOrder(0)]
public object WalletGroup => null;
+ [ExportMainMenuDefaultGroup("Tools", "Settings")]
+ [DefaultOrder(1)]
+ public object SettingsGroup => null;
+
+ #endregion Group
+
+ #region MenuItem
+
[ExportMainMenuItem("Tools", "Wallet")]
[DefaultOrder(0)]
[DefaultGroup("Wallet")]
public IMenuItem GenerateWallet => _menuItemFactory.CreateCommandMenuItem("Tools.WalletManager");
- [ExportMainMenuDefaultGroup("Tools", "Settings")]
- [DefaultOrder(1000)]
- public object SettingsGroup => null;
-
[ExportMainMenuItem("Tools", "Settings")]
- [DefaultOrder(50)]
+ [DefaultOrder(1)]
[DefaultGroup("Settings")]
public IMenuItem Settings => _menuItemFactory.CreateCommandMenuItem("Tools.Settings");
+
+ #endregion MenuItem
}
}

Organize menu items