From 30cdfd8d5207947f9384092b41a5080bf692e505 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 15 Dec 2021 16:27:10 -0300 Subject: [PATCH] [web] improvement: default pre-selected installation category is now 'Network' --- CHANGELOG.md | 1 + bauh/gems/web/controller.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e08f9899..d27ea9bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - checking for javascript fixes based on the Electron version (saved on disk as `~/.local/share/bauh/web/fixes/electron_{branch}/{app_name}.js`) - handling http redirect errors - installation form title + - default pre-selected installation category is now "Network" (Internet) - UI - only displaying a confirmation dialog for custom actions that start immediately diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 4b3929f3..94efed26 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -485,6 +485,11 @@ class WebApplicationManager(SoftwareManager): if opt.value == app.categories[0]: def_cat = opt break + else: + for op in cat_ops: + if op.value == 'Network': + def_cat = op + break inp_cat = SingleSelectComponent(label=self.i18n['category'], type_=SelectViewType.COMBO, options=cat_ops, default_option=def_cat) op_wv = InputOption(id_='widevine', label=self.i18n['web.install.option.widevine.label'] + ' (DRM)', value="--widevine", tooltip=self.i18n['web.install.option.widevine.tip'])