mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
[fix][ui][settings] not displaying all available gems
This commit is contained in:
@@ -615,7 +615,7 @@ class GenericSoftwareManager(SoftwareManager):
|
||||
gem_opts, def_gem_opts, gem_tabs = [], set(), []
|
||||
|
||||
for man in self.managers:
|
||||
if self._can_work(man):
|
||||
if man.can_work():
|
||||
man_comp = man.get_settings()
|
||||
modname = man.__module__.split('.')[-2]
|
||||
icon_path = "{r}/gems/{n}/resources/img/{n}.svg".format(r=ROOT_DIR, n=modname)
|
||||
@@ -637,6 +637,7 @@ class GenericSoftwareManager(SoftwareManager):
|
||||
|
||||
if gem_opts:
|
||||
type_help = TextComponent(html=self.i18n['core.config.types.tip'])
|
||||
gem_opts.sort(key=lambda o: o.value)
|
||||
gem_selector = MultipleSelectComponent(label=None,
|
||||
tooltip=None,
|
||||
options=gem_opts,
|
||||
|
||||
@@ -579,6 +579,8 @@ def to_widget(comp: ViewComponent, i18n: I18n, parent: QWidget = None) -> QWidge
|
||||
elif isinstance(comp, TwoStateButtonComponent):
|
||||
return TwoStateButtonQt(comp)
|
||||
elif isinstance(comp, TextComponent):
|
||||
return QLabel(comp.value)
|
||||
label = QLabel(comp.value)
|
||||
label.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
|
||||
return label
|
||||
else:
|
||||
raise Exception("Cannot render instances of " + comp.__class__.__name__)
|
||||
|
||||
@@ -56,7 +56,7 @@ class SettingsWindow(QWidget):
|
||||
if success:
|
||||
if dialog.ask_confirmation(title=self.i18n['warning'].capitalize(),
|
||||
body="<p>{}</p><p>{}</p>".format(self.i18n['settings.changed.success.warning'],
|
||||
self.i18n['settings.changed.success.reboot']),
|
||||
self.i18n['settings.changed.success.reboot']),
|
||||
i18n=self.i18n):
|
||||
util.restart_app(self.tray)
|
||||
else:
|
||||
@@ -70,11 +70,10 @@ class SettingsWindow(QWidget):
|
||||
self.close()
|
||||
else:
|
||||
msg = StringIO()
|
||||
msg.write("<p>It was not possible to properly save the settings</p>")
|
||||
msg.write("<p>{}</p>".format(self.i18n['settings.error']))
|
||||
|
||||
for w in warnings:
|
||||
msg.write('<p style="font-weight: bold">* ' + w + '</p><br/>')
|
||||
|
||||
msg.seek(0)
|
||||
|
||||
dialog.show_message(title="Warning", body=msg.read(), type_=MessageType.WARNING)
|
||||
|
||||
@@ -254,6 +254,7 @@ core.config.suggestions.by_type.tip=Maximum number of suggestions that should be
|
||||
core.config.types.tip=Check the application types you want to manage
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after the restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
locale.en=anglès
|
||||
locale.es=castellà
|
||||
locale.pt=portuguès
|
||||
|
||||
@@ -209,6 +209,7 @@ core.config.suggestions.by_type.tip=Maximum number of suggestions that should be
|
||||
core.config.types.tip=Check the application types you want to manage
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after the restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
locale.en=englisch
|
||||
locale.es=spanisch
|
||||
locale.pt=portugiesisch
|
||||
|
||||
@@ -216,6 +216,7 @@ core.config.suggestions.by_type.tip=Maximum number of suggestions that should be
|
||||
core.config.types.tip=Check the application types you want to manage
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after the restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
locale.en=english
|
||||
locale.es=spanish
|
||||
locale.pt=portuguese
|
||||
|
||||
@@ -257,6 +257,7 @@ core.config.suggestions.by_type.tip=Número máximo de sugerencias que deberían
|
||||
core.config.types.tip=Marque los tipos de aplicaciones que desea administrar
|
||||
settings.changed.success.warning=Las configuraciones se cambiaron con éxito. Algunas solo tendrán efecto después del reinicio.
|
||||
settings.changed.success.reboot=¿Reiniciar ahora?
|
||||
settings.error=No fue posible cambiar correctamente todas las configuraciones
|
||||
locale.es=inglés
|
||||
locale.es=español
|
||||
locale.pt=portugués
|
||||
|
||||
@@ -209,6 +209,7 @@ core.config.suggestions.by_type.tip=Maximum number of suggestions that should be
|
||||
core.config.types.tip=Check the application types you want to manage
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after the restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
locale.en=inglese
|
||||
locale.es=spagnolo
|
||||
locale.pt=portoghese
|
||||
|
||||
@@ -260,6 +260,7 @@ core.config.suggestions.by_type.tip=Número máximo de sugestões que devem ser
|
||||
core.config.types.tip=Marque os tipos de aplicativo que você quer gerenciar
|
||||
settings.changed.success.warning=Configurações alteradas com sucesso ! Algumas delas só surtirão após a reinicialização.
|
||||
settings.changed.success.reboot=Reiniciar agora ?
|
||||
settings.error=Não foi possível alterar todas as configurações adequadamente
|
||||
locale.en=inglês
|
||||
locale.es=espanhol
|
||||
locale.pt=português
|
||||
|
||||
Reference in New Issue
Block a user