diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs index fe11b619e..8d99bf37d 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs @@ -13,7 +13,7 @@ namespace Flow.Launcher.Plugin.PluginsManager { public class Main : ISettingProvider, IPlugin, ISavable, IContextMenu, IPluginI18n { - internal static PluginInitContext Context { get; set; } + internal PluginInitContext Context { get; set; } internal Settings Settings; diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index c6f127387..29ff9cb54 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -50,6 +50,43 @@ namespace Flow.Launcher.Plugin.PluginsManager await pluginsManifest.DownloadManifest(); } + internal List GetDefaultHotKeys() + { + return new List() + { + new Result() + { + Title = Settings.HotKeyInstall, + IcoPath = icoPath, + Action = _ => + { + Context.API.ChangeQuery("pm install "); + return false; + } + }, + new Result() + { + Title = Settings.HotkeyUninstall, + IcoPath = icoPath, + Action = _ => + { + Context.API.ChangeQuery("pm uninstall "); + return false; + } + }, + new Result() + { + Title = Settings.HotkeyUpdate, + IcoPath = icoPath, + Action = _ => + { + Context.API.ChangeQuery("pm update "); + return false; + } + } + }; + } + internal void InstallOrUpdate(UserPlugin plugin) { if (PluginExists(plugin.ID)) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs index 5fc3916c0..3753056f7 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs @@ -12,46 +12,6 @@ namespace Flow.Launcher.Plugin.PluginsManager internal string HotkeyUpdate { get; set; } = "update"; internal readonly string icoPath = "Images\\pluginsmanager.png"; - - - internal List HotKeys - { - get - { - return new List() - { - new Result() - { - Title = HotKeyInstall, - IcoPath = icoPath, - Action = _ => - { - Main.Context.API.ChangeQuery("pm install "); - return false; - } - }, - new Result() - { - Title = HotkeyUninstall, - IcoPath = icoPath, - Action = _ => - { - Main.Context.API.ChangeQuery("pm uninstall "); - return false; - } - }, - new Result() - { - Title = HotkeyUpdate, - IcoPath = icoPath, - Action = _ => - { - Main.Context.API.ChangeQuery("pm update "); - return false; - } - } - }; - } } } } \ No newline at end of file