mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Adding 'Installed' category to show Installed plugins.
This commit is contained in:
parent
5186033e29
commit
2d2a8d673b
2 changed files with 8 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
||||
"versions": {
|
||||
"1.0.15": null,
|
||||
"1.0.14": {
|
||||
"api_version": 8,
|
||||
"commit_sha": "fc5a7f1",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ from datetime import datetime
|
|||
from threading import Thread
|
||||
import logging
|
||||
|
||||
PLUGIN_MANAGER_VERSION = "1.0.14"
|
||||
PLUGIN_MANAGER_VERSION = "1.0.15"
|
||||
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
||||
# Current tag can be changed to "staging" or any other branch in
|
||||
# plugin manager repo for testing purpose.
|
||||
|
|
@ -1589,7 +1589,7 @@ class PluginSourcesWindow(popup.PopupWindow):
|
|||
|
||||
class PluginCategoryWindow(popup.PopupMenuWindow):
|
||||
def __init__(self, choices, current_choice, origin_widget, asyncio_callback):
|
||||
choices = (*choices, "Custom Sources")
|
||||
choices = (*choices, "Installed", "Custom Sources")
|
||||
self._asyncio_callback = asyncio_callback
|
||||
self.scale_origin = origin_widget.get_screen_space_center()
|
||||
super().__init__(
|
||||
|
|
@ -1967,7 +1967,7 @@ class PluginManagerWindow(bui.Window):
|
|||
return
|
||||
|
||||
try:
|
||||
category_plugins = await self.plugin_manager.categories[category].get_plugins()
|
||||
category_plugins = await self.plugin_manager.categories[category if category != 'Installed' else 'All'].get_plugins()
|
||||
except (KeyError, AttributeError):
|
||||
raise CategoryDoesNotExist(f"{category} does not exist.")
|
||||
|
||||
|
|
@ -1990,6 +1990,9 @@ class PluginManagerWindow(bui.Window):
|
|||
self._last_filter_text = search_term
|
||||
self._last_filter_plugins = plugins
|
||||
|
||||
if category == 'Installed':
|
||||
plugin_names_to_draw = tuple(self.draw_plugin_name(plugin) for plugin in plugins if plugin.is_installed)
|
||||
else:
|
||||
plugin_names_to_draw = tuple(self.draw_plugin_name(plugin) for plugin in plugins)
|
||||
|
||||
for plugin in self._columnwidget.get_children():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue