mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
[ui][settings] more improvements and settings
This commit is contained in:
@@ -454,7 +454,31 @@ class GenericSoftwareManager(SoftwareManager):
|
||||
|
||||
form_download = FormComponent(label=self.i18n['download'].capitalize(), components=[select_dicons, select_dmthread], id_='form_download')
|
||||
|
||||
sub_comps = [form_general, form_download]
|
||||
select_sugs = self._gen_bool_component(label=self.i18n['core.config.suggestions.activated'].capitalize(),
|
||||
tooltip=self.i18n['core.config.suggestions.activated.tip'].format(app=self.context.app_name),
|
||||
id_="sugs_enabled",
|
||||
value=bool(core_config['suggestions']['enabled']))
|
||||
|
||||
form_sugs = FormComponent(label=self.i18n['core.config.suggestions'].capitalize(),
|
||||
components=[select_sugs], id_='form_sugs')
|
||||
|
||||
input_data_exp = TextInputComponent(label=self.i18n['core.config.mem_cache.data_exp'],
|
||||
tooltip=self.i18n['core.config.mem_cache.data_exp.tip'],
|
||||
value=str(core_config['memory_cache']['data_expiration']),
|
||||
only_int=True,
|
||||
id_="data_exp")
|
||||
|
||||
input_icon_exp = TextInputComponent(label=self.i18n['core.config.mem_cache.icon_exp'],
|
||||
tooltip=self.i18n['core.config.mem_cache.icon_exp.tip'],
|
||||
value=str(core_config['memory_cache']['icon_expiration']),
|
||||
only_int=True,
|
||||
id_="icon_exp")
|
||||
|
||||
form_cache = FormComponent(label=self.i18n['core.config.mem_cache'].capitalize(),
|
||||
components=[input_data_exp, input_icon_exp],
|
||||
id_='form_memcache')
|
||||
|
||||
sub_comps = [form_general, form_download, form_sugs, form_cache]
|
||||
return TabComponent(self.i18n['core.config.tab_label'].capitalize(), PanelComponent([FormComponent(sub_comps)]), None, 'core')
|
||||
|
||||
def _save_settings(self, panel: PanelComponent) -> Tuple[bool, List[str]]:
|
||||
@@ -475,6 +499,15 @@ class GenericSoftwareManager(SoftwareManager):
|
||||
download_mthreaded = main_form.get_component('form_download').get_component('down_mthread').get_selected()
|
||||
core_config['download']['multithreaded'] = download_mthreaded
|
||||
|
||||
data_exp = main_form.get_component('form_memcache').get_component('data_exp').get_int_value()
|
||||
core_config['memory_cache']['data_expiration'] = data_exp
|
||||
|
||||
icon_exp = main_form.get_component('form_memcache').get_component('icon_exp').get_int_value()
|
||||
core_config['memory_cache']['icon_expiration'] = icon_exp
|
||||
|
||||
sugs_enabled = main_form.get_component('form_sugs').get_component('sugs_enabled').get_value()
|
||||
core_config['suggestions']['enabled'] = sugs_enabled
|
||||
|
||||
try:
|
||||
config.save(core_config)
|
||||
return True, None
|
||||
|
||||
@@ -4,7 +4,8 @@ from typing import Tuple
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtGui import QIcon, QPixmap, QIntValidator
|
||||
from PyQt5.QtWidgets import QRadioButton, QGroupBox, QCheckBox, QComboBox, QGridLayout, QWidget, \
|
||||
QLabel, QSizePolicy, QLineEdit, QToolButton, QHBoxLayout, QFormLayout, QFileDialog, QTabWidget, QVBoxLayout, QSlider
|
||||
QLabel, QSizePolicy, QLineEdit, QToolButton, QHBoxLayout, QFormLayout, QFileDialog, QTabWidget, QVBoxLayout, \
|
||||
QSlider, QScrollArea, QFrame
|
||||
|
||||
from bauh.api.abstract.view import SingleSelectComponent, InputOption, MultipleSelectComponent, SelectViewType, \
|
||||
TextInputComponent, FormComponent, FileChooserComponent, ViewComponent, TabGroupComponent, PanelComponent, \
|
||||
|
||||
@@ -232,6 +232,12 @@ core.config.download.icons=Icons
|
||||
core.config.download.icons.tip=If the application icons should be downloaded and displayed on the table
|
||||
core.config.download.multithreaded=Parallelism
|
||||
core.config.download.multithreaded.tip=Whether applications, packages and files should be downloaded with a tool that works with parallelism / multi-thread (faster). At the moment only the aria2 application is supported
|
||||
core.config.mem_cache=Memory storage
|
||||
core.config.mem_cache.data_exp=Data expiration
|
||||
core.config.mem_cache.data_exp.tip=Defines the in-memory data lifetime ( in SECONDS )
|
||||
core.config.suggestions=Suggestions
|
||||
core.config.suggestions.activated=Activated
|
||||
core.config.suggestions.activated.tip=If {app} can suggest applications to install
|
||||
locale.en=anglès
|
||||
locale.es=castellà
|
||||
locale.pt=portuguès
|
||||
|
||||
@@ -187,6 +187,12 @@ core.config.download.icons=Icons
|
||||
core.config.download.icons.tip=If the application icons should be downloaded and displayed on the table
|
||||
core.config.download.multithreaded=Parallelism
|
||||
core.config.download.multithreaded.tip=Whether applications, packages and files should be downloaded with a tool that works with parallelism / multi-thread (faster). At the moment only the aria2 application is supported
|
||||
core.config.mem_cache=Memory storage
|
||||
core.config.mem_cache.data_exp=Data expiration
|
||||
core.config.mem_cache.data_exp.tip=Defines the in-memory data lifetime ( in SECONDS )
|
||||
core.config.suggestions=Suggestions
|
||||
core.config.suggestions.activated=Activated
|
||||
core.config.suggestions.activated.tip=If {app} can suggest applications to install
|
||||
locale.en=englisch
|
||||
locale.es=spanisch
|
||||
locale.pt=portugiesisch
|
||||
|
||||
@@ -190,6 +190,14 @@ core.config.download.icons=Icons
|
||||
core.config.download.icons.tip=If the application icons should be downloaded and displayed on the table
|
||||
core.config.download.multithreaded=Parallelism
|
||||
core.config.download.multithreaded.tip=Whether applications, packages and files should be downloaded with a tool that works with parallelism / multi-thread ( faster ). At the moment only the aria2 application is supported
|
||||
core.config.mem_cache=Memory storage
|
||||
core.config.mem_cache.data_exp=Data expiration
|
||||
core.config.mem_cache.data_exp.tip=Defines the in-memory data lifetime ( in SECONDS )
|
||||
core.config.mem_cache.icon_exp=Icons expiration
|
||||
core.config.mem_cache.icon_exp.tip=Defines the in-memory icons lifetime ( in SECONDS )
|
||||
core.config.suggestions=Suggestions
|
||||
core.config.suggestions.activated=Activated
|
||||
core.config.suggestions.activated.tip=If {app} can suggest applications to install
|
||||
locale.en=english
|
||||
locale.es=spanish
|
||||
locale.pt=portuguese
|
||||
|
||||
@@ -231,6 +231,14 @@ core.config.download.icons=Iconos
|
||||
core.config.download.icons.tip=Si los íconos de las aplicaciones se deben descargar y mostrar en la tabla
|
||||
core.config.download.multithreaded=Paralelismo
|
||||
core.config.download.multithreaded.tip=Si las aplicaciones, paquetes y archivos deben descargarse con una herramienta que funcione con paralelismo / multi-thread ( más rápido ). Por el momento solo se admite la aplicación aria2
|
||||
core.config.mem_cache=Almacenamiento de memoria
|
||||
core.config.mem_cache.data_exp=Expiración de datos
|
||||
core.config.mem_cache.data_exp.tip=Define la vida útil de los datos en memoria ( en SEGUNDOS )
|
||||
core.config.mem_cache.icon_exp=Expiración de íconos
|
||||
core.config.mem_cache.icon_exp.tip=Define la vida útil de los íconos en memoria ( en SEGUNDOS )
|
||||
core.config.suggestions=Sugerencias
|
||||
core.config.suggestions.activated=Activadas
|
||||
core.config.suggestions.activated.tip=Si {app} puede sugerir aplicaciones para instalar
|
||||
locale.es=inglés
|
||||
locale.es=español
|
||||
locale.pt=portugués
|
||||
|
||||
@@ -188,6 +188,12 @@ core.config.download.icons=Icons
|
||||
core.config.download.icons.tip=If the application icons should be downloaded and displayed on the table
|
||||
core.config.download.multithreaded=Parallelism
|
||||
core.config.download.multithreaded.tip=Whether applications, packages and files should be downloaded with a tool that works with parallelism / multi-thread (faster). At the moment only the aria2 application is supported
|
||||
core.config.mem_cache=Memory storage
|
||||
core.config.mem_cache.data_exp=Data expiration
|
||||
core.config.mem_cache.data_exp.tip=Defines the in-memory data lifetime ( in SECONDS )
|
||||
core.config.suggestions=Suggestions
|
||||
core.config.suggestions.activated=Activated
|
||||
core.config.suggestions.activated.tip=If {app} can suggest applications to install
|
||||
locale.en=inglese
|
||||
locale.es=spagnolo
|
||||
locale.pt=portoghese
|
||||
|
||||
@@ -234,6 +234,14 @@ core.config.download.icons=Ícones
|
||||
core.config.download.icons.tip=Se os ícones dos aplicativos devem ser baixados e exibidos na tabela
|
||||
core.config.download.multithreaded=Paralelismo
|
||||
core.config.download.multithreaded.tip=Se os aplicativos, pacotes e arquivos devem ser baixados através de uma ferramenta que trabalha com paralelismo / multi-thread ( mais rápido ). No momento somente o aplicativo aria2 é suportado.
|
||||
core.config.mem_cache=Armazenamento em memória
|
||||
core.config.mem_cache.data_exp=Expiração dos dados
|
||||
core.config.mem_cache.data_exp.tip=Define o tempo de vida dos dados em memória ( em SEGUNDOS )
|
||||
core.config.mem_cache.icon_exp=Expiração de ícones
|
||||
core.config.mem_cache.icon_exp.tip=Define o tempo de vida dos ícones em memória ( em SEGUNDOS )
|
||||
core.config.suggestions=Sugestões
|
||||
core.config.suggestions.activated=Ativadas
|
||||
core.config.suggestions.activated.tip=Se o {app} pode sugerir aplicativos para a instalação
|
||||
locale.en=inglês
|
||||
locale.es=espanhol
|
||||
locale.pt=português
|
||||
|
||||
Reference in New Issue
Block a user