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>
|
/// </summary>
|
||||||
internal UiBuilder LocalUiBuilder => this.uiBuilder;
|
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>
|
/// <summary>
|
||||||
/// Opens the <see cref="PluginInstallerWindow"/>, with an optional search term.
|
/// Opens the <see cref="PluginInstallerWindow"/>, with an optional search term.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="openTo">The page to open the installer to. Defaults to the "All Plugins" page.</param>
|
/// <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>
|
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
/// <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
|
var dalamudInterface = Service<DalamudInterface>.GetNullable(); // Can be null during boot
|
||||||
if (dalamudInterface == null)
|
if (dalamudInterface == null)
|
||||||
|
|
@ -235,7 +225,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl
|
||||||
}
|
}
|
||||||
|
|
||||||
dalamudInterface.OpenPluginInstallerTo(openTo);
|
dalamudInterface.OpenPluginInstallerTo(openTo);
|
||||||
dalamudInterface.SetPluginInstallerSearchText(searchText);
|
dalamudInterface.SetPluginInstallerSearchText(searchText ?? string.Empty);
|
||||||
|
|
||||||
return true;
|
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="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>
|
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
/// <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
|
var dalamudInterface = Service<DalamudInterface>.GetNullable(); // Can be null during boot
|
||||||
if (dalamudInterface == null)
|
if (dalamudInterface == null)
|
||||||
|
|
@ -255,7 +245,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl
|
||||||
}
|
}
|
||||||
|
|
||||||
dalamudInterface.OpenSettingsTo(openTo);
|
dalamudInterface.OpenSettingsTo(openTo);
|
||||||
dalamudInterface.SetSettingsSearchText(searchText);
|
dalamudInterface.SetSettingsSearchText(searchText ?? string.Empty);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -157,19 +157,13 @@ public interface IDalamudPluginInterface
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IEnumerable<IExposedPlugin> InstalledPlugins { get; }
|
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>
|
/// <summary>
|
||||||
/// Opens the <see cref="PluginInstallerWindow"/>, with an optional search term.
|
/// Opens the <see cref="PluginInstallerWindow"/>, with an optional search term.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="openTo">The page to open the installer to. Defaults to the "All Plugins" page.</param>
|
/// <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>
|
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
/// <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>
|
/// <summary>
|
||||||
/// Opens the <see cref="SettingsWindow"/>, with an optional search term.
|
/// 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="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>
|
/// <param name="searchText">An optional search text to input in the search box.</param>
|
||||||
/// <returns>Returns false if the DalamudInterface was null.</returns>
|
/// <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>
|
/// <summary>
|
||||||
/// Opens the dev menu bar.
|
/// Opens the dev menu bar.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue