mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-19 05:46:00 +00:00
Fixing same previous bug for Category window
This commit is contained in:
parent
6569a037b7
commit
bc0abfe7ae
1 changed files with 17 additions and 28 deletions
|
|
@ -29,7 +29,7 @@ from datetime import datetime
|
||||||
# Modules used for overriding AllSettingsWindow
|
# Modules used for overriding AllSettingsWindow
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
PLUGIN_MANAGER_VERSION = "1.2.1"
|
PLUGIN_MANAGER_VERSION = "1.2.0"
|
||||||
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
||||||
# Current tag can be changed to "staging" or any other branch in
|
# Current tag can be changed to "staging" or any other branch in
|
||||||
# plugin manager repo for testing purpose.
|
# plugin manager repo for testing purpose.
|
||||||
|
|
@ -48,17 +48,14 @@ loop = babase._asyncio._asyncio_event_loop
|
||||||
|
|
||||||
open_popups = []
|
open_popups = []
|
||||||
|
|
||||||
|
|
||||||
def _add_popup(popup): open_popups.append(popup)
|
def _add_popup(popup): open_popups.append(popup)
|
||||||
|
|
||||||
|
|
||||||
def _remove_popup(popup):
|
def _remove_popup(popup):
|
||||||
try:
|
try:
|
||||||
open_popups.remove(popup)
|
open_popups.remove(popup)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _uiscale(): return bui.app.ui_v1.uiscale
|
def _uiscale(): return bui.app.ui_v1.uiscale
|
||||||
def _regexp_friendly_class_name_shortcut(string): return string.replace(".", "\\.")
|
def _regexp_friendly_class_name_shortcut(string): return string.replace(".", "\\.")
|
||||||
|
|
||||||
|
|
@ -1043,8 +1040,7 @@ class ChangelogWindow(popup.PopupWindow):
|
||||||
size=(width, height),
|
size=(width, height),
|
||||||
on_outside_click_call=self._back,
|
on_outside_click_call=self._back,
|
||||||
transition=transition,
|
transition=transition,
|
||||||
scale=(1.5 if _uiscale() is babase.UIScale.SMALL else 1.5 if _uiscale()
|
scale=(1.5 if _uiscale() is babase.UIScale.SMALL else 1.5 if _uiscale() is babase.UIScale.MEDIUM else 1.0),
|
||||||
is babase.UIScale.MEDIUM else 1.0),
|
|
||||||
scale_origin_stack_offset=self.scale_origin
|
scale_origin_stack_offset=self.scale_origin
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -1291,8 +1287,7 @@ class PluginWindow(popup.PopupWindow):
|
||||||
if self.p_n_plugins[0] is not None:
|
if self.p_n_plugins[0] is not None:
|
||||||
previous_plugin_button = bui.buttonwidget(
|
previous_plugin_button = bui.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(-12.5*s + (4 if _uiscale() is babase.UIScale.SMALL else -5),
|
position=(-12.5*s + (4 if _uiscale() is babase.UIScale.SMALL else -5), height/2 - 20*s),
|
||||||
height/2 - 20*s),
|
|
||||||
label='<',
|
label='<',
|
||||||
size=(25, 40),
|
size=(25, 40),
|
||||||
color=(1, 0.5, 0.5),
|
color=(1, 0.5, 0.5),
|
||||||
|
|
@ -1303,8 +1298,7 @@ class PluginWindow(popup.PopupWindow):
|
||||||
if self.p_n_plugins[1] is not None:
|
if self.p_n_plugins[1] is not None:
|
||||||
next_plugin_button = bui.buttonwidget(
|
next_plugin_button = bui.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(width - 12.5*s - (8 if _uiscale()
|
position=(width - 12.5*s - (8 if _uiscale() is babase.UIScale.SMALL else 0), height/2 - 20*s),
|
||||||
is babase.UIScale.SMALL else 0), height/2 - 20*s),
|
|
||||||
label='>',
|
label='>',
|
||||||
size=(25, 40),
|
size=(25, 40),
|
||||||
color=(1, 0.5, 0.5),
|
color=(1, 0.5, 0.5),
|
||||||
|
|
@ -1823,6 +1817,8 @@ class PluginCategoryWindow(popup.PopupMenuWindow):
|
||||||
current_choice=current_choice,
|
current_choice=current_choice,
|
||||||
delegate=self
|
delegate=self
|
||||||
)
|
)
|
||||||
|
self._root_widget = self.root_widget
|
||||||
|
_add_popup(self)
|
||||||
self._update_custom_sources_widget()
|
self._update_custom_sources_widget()
|
||||||
|
|
||||||
def _update_custom_sources_widget(self):
|
def _update_custom_sources_widget(self):
|
||||||
|
|
@ -1958,8 +1954,7 @@ class PluginManagerWindow(bui.MainWindow):
|
||||||
for popup in open_popups:
|
for popup in open_popups:
|
||||||
try:
|
try:
|
||||||
bui.containerwidget(edit=popup._root_widget, transition='out_scale')
|
bui.containerwidget(edit=popup._root_widget, transition='out_scale')
|
||||||
except:
|
except: pass
|
||||||
pass
|
|
||||||
cls = type(self)
|
cls = type(self)
|
||||||
return bui.BasicMainWindowState(
|
return bui.BasicMainWindowState(
|
||||||
create_call=lambda transition, origin_widget: cls(
|
create_call=lambda transition, origin_widget: cls(
|
||||||
|
|
@ -2072,10 +2067,7 @@ class PluginManagerWindow(bui.MainWindow):
|
||||||
textcolor=b_textcolor,
|
textcolor=b_textcolor,
|
||||||
text_scale=0.6
|
text_scale=0.6
|
||||||
)
|
)
|
||||||
bui.buttonwidget(
|
bui.buttonwidget(edit=b, on_activate_call=lambda: self.show_categories_window(source=b)),
|
||||||
edit=b,
|
|
||||||
on_activate_call=lambda: self.show_categories_window(source=b)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
b = self.category_selection_button
|
b = self.category_selection_button
|
||||||
bui.buttonwidget(
|
bui.buttonwidget(
|
||||||
|
|
@ -2282,10 +2274,8 @@ class PluginManagerWindow(bui.MainWindow):
|
||||||
|
|
||||||
plugin_names_ready_to_draw = []
|
plugin_names_ready_to_draw = []
|
||||||
for plugin in plugin_names_to_draw:
|
for plugin in plugin_names_to_draw:
|
||||||
try:
|
try: lcv = plugin.latest_compatible_version
|
||||||
lcv = plugin.latest_compatible_version
|
except NoCompatibleVersion: continue
|
||||||
except NoCompatibleVersion:
|
|
||||||
continue
|
|
||||||
plugin_names_ready_to_draw += [plugin]
|
plugin_names_ready_to_draw += [plugin]
|
||||||
|
|
||||||
for i, plugin in enumerate(plugin_names_ready_to_draw):
|
for i, plugin in enumerate(plugin_names_ready_to_draw):
|
||||||
|
|
@ -2559,8 +2549,7 @@ class PluginManagerSettingsWindow(popup.PopupWindow):
|
||||||
parent=self._root_widget,
|
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,
|
size=button_size,
|
||||||
on_activate_call=lambda: loop.create_task(
|
on_activate_call=lambda: loop.create_task(self.update(*plugin_manager_update_available)),
|
||||||
self.update(*plugin_manager_update_available)),
|
|
||||||
textcolor=b_text_color,
|
textcolor=b_text_color,
|
||||||
button_type='square',
|
button_type='square',
|
||||||
text_scale=1,
|
text_scale=1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue