mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
Build Fixing Part 1
This commit is contained in:
parent
f4721502d9
commit
8ad43be72f
1 changed files with 52 additions and 41 deletions
|
|
@ -1059,16 +1059,18 @@ class PluginSourcesWindow(popup.PopupWindow):
|
|||
return
|
||||
ba.app.config["Community Plugin Manager"]["Custom Sources"].append(source)
|
||||
ba.app.config.commit()
|
||||
ba.screenmessage("Plugin source added, refresh plugin list to see changes", color = (0,1,0))
|
||||
ba.screenmessage("Plugin source added, refresh plugin list to see changes",
|
||||
color=(0, 1, 0))
|
||||
self.draw_sources()
|
||||
|
||||
def delete_selected_source(self):
|
||||
try:
|
||||
ba.app.config["Community Plugin Manager"]["Custom Sources"].remove(self.selected_source)
|
||||
ba.app.config.commit()
|
||||
ba.screenmessage("Plugin source deleted, refresh plugin list to see changes", color = (0,1,0))
|
||||
ba.screenmessage("Plugin source deleted, refresh plugin list to see changes",
|
||||
color=(0, 1, 0))
|
||||
self.draw_sources()
|
||||
except:
|
||||
except Exception:
|
||||
ba.screenmessage("No Plugin Selected to Delete", color=(1, 0, 0))
|
||||
|
||||
def _ok(self) -> None:
|
||||
|
|
@ -1235,7 +1237,6 @@ class PluginManagerWindow(ba.Window):
|
|||
border=2,
|
||||
margin=0)
|
||||
|
||||
|
||||
def draw_category_selection_button(self, post_label):
|
||||
category_pos_x = (330 if _uiscale is ba.UIScale.SMALL else
|
||||
285 if _uiscale is ba.UIScale.MEDIUM else 350)
|
||||
|
|
@ -1252,7 +1253,8 @@ class PluginManagerWindow(ba.Window):
|
|||
position=(category_pos_x,
|
||||
category_pos_y),
|
||||
size=b_size,
|
||||
on_activate_call=self.show_categories_window,
|
||||
on_activate_call=(
|
||||
self.show_categories_window),
|
||||
label=label,
|
||||
button_type="square",
|
||||
color=b_color,
|
||||
|
|
@ -1371,7 +1373,8 @@ class PluginManagerWindow(ba.Window):
|
|||
size=(30, 30),
|
||||
button_type="square",
|
||||
label="",
|
||||
on_activate_call=lambda: loop.create_task(self.refresh()))
|
||||
on_activate_call=lambda:
|
||||
loop.create_task(self.refresh()))
|
||||
ba.imagewidget(parent=self._root_widget,
|
||||
position=(settings_pos_x, settings_pos_y),
|
||||
size=(30, 30),
|
||||
|
|
@ -1389,7 +1392,8 @@ class PluginManagerWindow(ba.Window):
|
|||
|
||||
# XXX: Not sure if this is the best way to handle search filters.
|
||||
async def draw_plugin_names(self, category, search_filter=""):
|
||||
to_draw_plugin_names = (search_filter, category) != (self._last_filter_text, self.selected_category)
|
||||
to_draw_plugin_names = (search_filter, category) != (self._last_filter_text,
|
||||
self.selected_category)
|
||||
if not to_draw_plugin_names:
|
||||
return
|
||||
|
||||
|
|
@ -1591,15 +1595,22 @@ class PluginManagerSettingsWindow(popup.PopupWindow):
|
|||
text_color = (0.75, 0.2, 0.2)
|
||||
loop = asyncio.get_event_loop()
|
||||
button_size = (95 * s, 32 * s)
|
||||
update_button_label = f'Update to v{plugin_manager_update_available[0]}'
|
||||
self._update_button = ba.buttonwidget(parent=self._root_widget,
|
||||
position=((width * 0.77) - button_size[0] / 2, pos),
|
||||
position=((width * 0.77) - button_size[0] / 2,
|
||||
pos),
|
||||
size=button_size,
|
||||
on_activate_call=lambda: loop.create_task(self.update(*plugin_manager_update_available)),
|
||||
on_activate_call=lambda:
|
||||
loop.create_task(
|
||||
self.update(
|
||||
*plugin_manager_update_available
|
||||
)
|
||||
),
|
||||
textcolor=b_text_color,
|
||||
button_type='square',
|
||||
text_scale=1,
|
||||
color=(0, 0.7, 0),
|
||||
label=f'Update to v{plugin_manager_update_available[0]}')
|
||||
label=update_button_label)
|
||||
self._restart_to_reload_changes_text = ba.textwidget(parent=self._root_widget,
|
||||
position=(width * 0.79, pos + 20),
|
||||
size=(0, 0),
|
||||
|
|
@ -1645,7 +1656,7 @@ class PluginManagerSettingsWindow(popup.PopupWindow):
|
|||
await self._plugin_manager.update(to_version, commit_sha)
|
||||
except TypeError:
|
||||
# TODO: Catch a more fitting exception here.
|
||||
ba.screenmessage(f"md5sum check failed", color=(1, 0, 0))
|
||||
ba.screenmessage("md5sum check failed", color=(1, 0, 0))
|
||||
else:
|
||||
ba.screenmessage("Update successful.", color=(0, 1, 0))
|
||||
ba.textwidget(edit=self._restart_to_reload_changes_text,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue