mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
not adding flathub remote when it is not set
This commit is contained in:
@@ -8,10 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Improvements
|
||||
- new environment variable / argument to enable / disable the tray icon and update-check daemon: FPAKMAN_TRAY (--tray)
|
||||
- search results sorting takes an average of 35% less time, reaching 60% in some scenarios
|
||||
- app boot takes an average of 80% less time
|
||||
- showing a warning popup when no Flatpak remotes are set after initialization.
|
||||
### Fixes:
|
||||
- apps table not showing empty descriptions
|
||||
- replacing default app icons by null icons
|
||||
- i18n fixes
|
||||
### Comments:
|
||||
- not adding Flatpak default remote (flathub) when initializing. It requires root actions, and will be addressed in a different way in future releases.
|
||||
|
||||
## [0.4.2] - 2019-07-28
|
||||
### Improvements
|
||||
|
||||
@@ -108,6 +108,7 @@ caches.append(icon_cache)
|
||||
|
||||
disk_loader_factory = DiskCacheLoaderFactory(disk_cache=args.disk_cache, cache_map=cache_map)
|
||||
manager = GenericApplicationManager(managers, disk_loader_factory=disk_loader_factory, app_args=args)
|
||||
manager.prepare()
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName(__app_name__)
|
||||
@@ -136,12 +137,11 @@ else:
|
||||
manage_window.refresh_apps()
|
||||
manage_window.show()
|
||||
|
||||
CacheCleaner(caches).start()
|
||||
|
||||
warnings = manager.list_warnings()
|
||||
|
||||
if warnings:
|
||||
for warning in warnings:
|
||||
dialog.show_warning(title=locale_keys['warning'].capitalize(), body=warning)
|
||||
|
||||
CacheCleaner(caches).start()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
@@ -99,7 +99,6 @@ class GenericApplicationManager(ApplicationManager):
|
||||
self.map = {m.get_app_type(): m for m in self.managers}
|
||||
self.disk_loader_factory = disk_loader_factory
|
||||
self._enabled_map = {} if app_args.check_packaging_once else None
|
||||
self.prepare()
|
||||
|
||||
def _sort(self, apps: List[Application], word: str) -> List[Application]:
|
||||
exact_name_matches, contains_name_matches, others = [], [], []
|
||||
|
||||
@@ -147,7 +147,7 @@ class FlatpakManager(ApplicationManager):
|
||||
raise Exception("'refresh' is not supported for {}".format(app.__class__.__name__))
|
||||
|
||||
def prepare(self):
|
||||
flatpak.set_default_remotes()
|
||||
pass
|
||||
|
||||
def list_updates(self) -> List[ApplicationUpdate]:
|
||||
updates = []
|
||||
@@ -179,4 +179,5 @@ class FlatpakManager(ApplicationManager):
|
||||
return updates
|
||||
|
||||
def list_warnings(self) -> List[str]:
|
||||
return None
|
||||
if not flatpak.has_remotes_set():
|
||||
return [self.locale_keys['flatpak.notification.no_remotes']]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
import subprocess
|
||||
from typing import List, Set
|
||||
from typing import List
|
||||
|
||||
from fpakman.core import system
|
||||
from fpakman.core.exception import NoInternetException
|
||||
@@ -219,3 +219,7 @@ def install_and_stream(app_id: str, origin: str):
|
||||
|
||||
def set_default_remotes():
|
||||
system.run_cmd('flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo')
|
||||
|
||||
|
||||
def has_remotes_set() -> bool:
|
||||
return bool(system.run_cmd('{} remotes'.format(BASE_CMD)).strip())
|
||||
|
||||
@@ -103,3 +103,4 @@ version.unknown=not informed
|
||||
app.name=application name
|
||||
warning=warning
|
||||
snap.notification.snapd_unavailable=snapd seems not to be enabled. snap packages will not be available.
|
||||
flatpak.notification.no_remotes=No Flatpak remotes set. It will not be possible to search for Flatpak apps.
|
||||
@@ -104,3 +104,4 @@ version.unknown=versión no informada
|
||||
app.name=nombre del aplicativo
|
||||
warning=aviso
|
||||
snap.notification.snapd_unavailable=snapd no parece estar habilitado. los paquetes snap estarán indisponibles.
|
||||
flatpak.notification.no_remotes=No hay repositorios (remotes) Flatpak configurados. No será posible buscar aplicativos Flatpak.
|
||||
@@ -104,3 +104,4 @@ version.unknown=versão não informada
|
||||
app.name=nome do aplicativo
|
||||
warning=aviso
|
||||
snap.notification.snapd_unavailable=snapd não parece estar habilitado. os pacotes snap estarão indisponíveis.
|
||||
flatpak.notification.no_remotes=Não há repositórios (remotes) Flatpak configurados. Não será possível buscar aplicativos Flatpak.
|
||||
Reference in New Issue
Block a user