Fixing Build in Plugin Manager File

This commit is contained in:
Vishal 2022-08-07 00:52:33 +05:30 committed by GitHub
parent d5674531f1
commit 833bdf0957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,13 +132,15 @@ class PluginLocal:
@property
def version(self):
try:
version = ba.app.config["Community Plugin Manager"]["Installed Plugins"][self.name]["version"]
version = (ba.app.config["Community Plugin Manager"]
["Installed Plugins"][self.name]["version"])
except KeyError:
version = None
return version
def set_version(self, version):
ba.app.config["Community Plugin Manager"]["Installed Plugins"][self.name]["version"] = version
v = version
ba.app.config["Community Plugin Manager"]["Installed Plugins"][self.name]["version"] = v
return self
def save(self):
@ -315,7 +317,8 @@ class PluginWindow(popup.PopupWindow):
label=button2_label)
if has_update:
button3 = ba.buttonwidget(parent=self._root_widget,
# button3 =
ba.buttonwidget(parent=self._root_widget,
position=(width * 0.7, pos),
size=button_size,
on_activate_call=button3_action,
@ -423,7 +426,6 @@ class PluginManagerWindow(ba.Window, PluginManager):
loop = asyncio.get_event_loop()
loop.create_task(self.plugin_index())
self._width = (570 if _uiscale is ba.UIScale.MEDIUM else 650)
self._height = (540 if _uiscale is ba.UIScale.SMALL
else 420 if _uiscale is ba.UIScale.MEDIUM
@ -519,7 +521,8 @@ class PluginManagerWindow(ba.Window, PluginManager):
# b_textcolor = (0.75, 0.7, 0.8)
# b_color = (0.6, 0.53, 0.63)
# s = 1.0 if _uiscale is ba.UIScale.SMALL else 1.27 if _uiscale is ba.UIScale.MEDIUM else 1.57
# s = (1.0 if _uiscale is ba.UIScale.SMALL else
# 1.27 if _uiscale is ba.UIScale.MEDIUM else 1.57)
# b_size = (90, 60 * s)
# v -= 63 * s
@ -630,7 +633,8 @@ class PluginManagerWindow(ba.Window, PluginManager):
if self.category_selection_button is None:
self.category_selection_button = ba.buttonwidget(parent=self._root_widget,
position=(category_pos_x, category_pos_y),
position=(category_pos_x,
category_pos_y),
size=b_size,
on_activate_call=self.show_categories,
label=label,
@ -748,7 +752,10 @@ class PluginManagerWindow(ba.Window, PluginManager):
# on_select_call=lambda: None,
text=plugin.name,
click_activate=True,
on_activate_call=ba.Call(PluginWindow, plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)),
on_activate_call=ba.Call(PluginWindow, plugin,
self._root_widget,
(lambda:
self.draw_plugin_name(plugin))),
h_align='left',
v_align='center',
maxwidth=420)