From 6e3dbf08aedc72574f1711465bf0bd09ad0c873a Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 22 Apr 2024 19:29:31 +0530 Subject: [PATCH 1/3] Fix for error caused when disable button was missing --- CHANGELOG.md | 4 ++++ index.json | 1 + plugin_manager.py | 12 +++++++----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54aebecd..57c6fbec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Plugin Manager (dd-mm-yyyy) +### 1.0.16 (22-04-2024) + +- Fix for error caused when disable button was missing + ### 1.0.15 (22-04-2024) - Plugins can now be viewed in A-Z and Z-A order. diff --git a/index.json b/index.json index c5b8ab18..f291296c 100644 --- a/index.json +++ b/index.json @@ -1,6 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { + "1.0.16": null, "1.0.15": { "api_version": 8, "commit_sha": "fd170eb", diff --git a/plugin_manager.py b/plugin_manager.py index 014c8904..32b849cf 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -31,7 +31,7 @@ from threading import Thread import logging -PLUGIN_MANAGER_VERSION = "1.0.15" +PLUGIN_MANAGER_VERSION = "1.0.16" 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. @@ -1095,7 +1095,7 @@ async def draw_ui(self): button1_action = self.install if to_draw_button1: - button1 = bui.buttonwidget(parent=self._root_widget, + selected_btn = bui.buttonwidget(parent=self._root_widget, position=( width * ( 0.1 if self.plugin.is_installed and has_update else @@ -1110,7 +1110,7 @@ async def draw_ui(self): label=button1_label) if self.plugin.is_installed: - bui.buttonwidget(parent=self._root_widget, + selected_btn = bui.buttonwidget(parent=self._root_widget, position=(width * (0.4 if has_update else 0.55), pos), size=button_size, on_activate_call=button2_action, @@ -1121,7 +1121,7 @@ async def draw_ui(self): label=button2_label) if has_update: - button1 = bui.buttonwidget(parent=self._root_widget, + selected_btn = bui.buttonwidget(parent=self._root_widget, position=(width * 0.7, pos), size=button_size, on_activate_call=button3_action, @@ -1131,9 +1131,11 @@ async def draw_ui(self): button_type='square', text_scale=1, label=button3_label) + + bui.containerwidget(edit=self._root_widget, on_cancel_call=self._cancel, - selected_child=button1) + selected_child=selected_btn) open_pos_x = (390 if _uiscale is babase.UIScale.SMALL else 450 if _uiscale is babase.UIScale.MEDIUM else 440) From 0839999901649bc78012e7ab10962da45a702c70 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 22 Apr 2024 14:00:14 +0000 Subject: [PATCH 2/3] [ci] auto-format --- plugin_manager.py | 59 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index 32b849cf..77256f05 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1096,42 +1096,41 @@ async def draw_ui(self): if to_draw_button1: selected_btn = bui.buttonwidget(parent=self._root_widget, - position=( - width * ( - 0.1 if self.plugin.is_installed and has_update else - 0.25 if self.plugin.is_installed else - 0.4), pos), - size=button_size, - on_activate_call=button1_action, - color=b1_color, - textcolor=b_text_color, - button_type='square', - text_scale=1, - label=button1_label) + position=( + width * ( + 0.1 if self.plugin.is_installed and has_update else + 0.25 if self.plugin.is_installed else + 0.4), pos), + size=button_size, + on_activate_call=button1_action, + color=b1_color, + textcolor=b_text_color, + button_type='square', + text_scale=1, + label=button1_label) if self.plugin.is_installed: selected_btn = bui.buttonwidget(parent=self._root_widget, - position=(width * (0.4 if has_update else 0.55), pos), - size=button_size, - on_activate_call=button2_action, - color=b2_color, - textcolor=b_text_color, - button_type='square', - text_scale=1, - label=button2_label) + position=(width * (0.4 if has_update else 0.55), pos), + size=button_size, + on_activate_call=button2_action, + color=b2_color, + textcolor=b_text_color, + button_type='square', + text_scale=1, + label=button2_label) if has_update: selected_btn = bui.buttonwidget(parent=self._root_widget, - position=(width * 0.7, pos), - size=button_size, - on_activate_call=button3_action, - color=b3_color, - textcolor=b_text_color, - autoselect=True, - button_type='square', - text_scale=1, - label=button3_label) - + position=(width * 0.7, pos), + size=button_size, + on_activate_call=button3_action, + color=b3_color, + textcolor=b_text_color, + autoselect=True, + button_type='square', + text_scale=1, + label=button3_label) bui.containerwidget(edit=self._root_widget, on_cancel_call=self._cancel, From 6e10e127ba98e5282cdbf17961f7b284ce69e129 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 22 Apr 2024 14:00:15 +0000 Subject: [PATCH 3/3] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index f291296c..8e02d1c1 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.0.16": null, + "1.0.16": { + "api_version": 8, + "commit_sha": "0839999", + "released_on": "22-04-2024", + "md5sum": "f9f3f7d3ff9fcbeee7ae01c8dc1a4ab8" + }, "1.0.15": { "api_version": 8, "commit_sha": "fd170eb",