mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
api10 todo: remove IDalamudPluginInterface::OpenPluginInstaller(), make search text nullable
This commit is contained in:
parent
1ad87989e0
commit
39a1d54011
2 changed files with 6 additions and 22 deletions
|
|
@ -210,23 +210,13 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl
|
|||
/// </summary>
|
||||
internal UiBuilder LocalUiBuilder => this.uiBuilder;
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="PluginInstallerWindow"/> with the plugin name set as search target.
|
||||
/// </summary>
|
||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
||||
[Api10ToDo(Api10ToDoAttribute.DeleteCompatBehavior)]
|
||||
public bool OpenPluginInstaller()
|
||||
{
|
||||
return this.OpenPluginInstallerTo(PluginInstallerOpenKind.InstalledPlugins, this.plugin.InternalName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="PluginInstallerWindow"/>, with an optional search term.
|
||||
/// </summary>
|
||||
/// <param name="openTo">The page to open the installer to. Defaults to the "All Plugins" page.</param>
|
||||
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
||||
public bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string searchText = null)
|
||||
public bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string? searchText = null)
|
||||
{
|
||||
var dalamudInterface = Service<DalamudInterface>.GetNullable(); // Can be null during boot
|
||||
if (dalamudInterface == null)
|
||||
|
|
@ -235,7 +225,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl
|
|||
}
|
||||
|
||||
dalamudInterface.OpenPluginInstallerTo(openTo);
|
||||
dalamudInterface.SetPluginInstallerSearchText(searchText);
|
||||
dalamudInterface.SetPluginInstallerSearchText(searchText ?? string.Empty);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -246,7 +236,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl
|
|||
/// <param name="openTo">The tab to open the settings to. Defaults to the "General" tab.</param>
|
||||
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
||||
public bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string searchText = null)
|
||||
public bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string? searchText = null)
|
||||
{
|
||||
var dalamudInterface = Service<DalamudInterface>.GetNullable(); // Can be null during boot
|
||||
if (dalamudInterface == null)
|
||||
|
|
@ -255,7 +245,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl
|
|||
}
|
||||
|
||||
dalamudInterface.OpenSettingsTo(openTo);
|
||||
dalamudInterface.SetSettingsSearchText(searchText);
|
||||
dalamudInterface.SetSettingsSearchText(searchText ?? string.Empty);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,19 +157,13 @@ public interface IDalamudPluginInterface
|
|||
/// </summary>
|
||||
IEnumerable<IExposedPlugin> InstalledPlugins { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="PluginInstallerWindow"/> with the plugin name set as search target.
|
||||
/// </summary>
|
||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
||||
bool OpenPluginInstaller();
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="PluginInstallerWindow"/>, with an optional search term.
|
||||
/// </summary>
|
||||
/// <param name="openTo">The page to open the installer to. Defaults to the "All Plugins" page.</param>
|
||||
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
||||
bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string searchText = null);
|
||||
bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string? searchText = null);
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="SettingsWindow"/>, with an optional search term.
|
||||
|
|
@ -177,7 +171,7 @@ public interface IDalamudPluginInterface
|
|||
/// <param name="openTo">The tab to open the settings to. Defaults to the "General" tab.</param>
|
||||
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
||||
bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string searchText = null);
|
||||
bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string? searchText = null);
|
||||
|
||||
/// <summary>
|
||||
/// Opens the dev menu bar.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue