Merge branch 'staging' into modules

# Conflicts:
#	CHANGELOG.md
#	fpakman/app.py
#	fpakman/core/controller.py
#	fpakman/core/snap/controller.py
#	fpakman/core/snap/snap.py
This commit is contained in:
Vinicius Moreira
2019-07-29 10:42:40 -03:00
8 changed files with 55 additions and 12 deletions

View File

@@ -18,6 +18,7 @@ from fpakman.core.flatpak.model import FlatpakApplication
from fpakman.util import util
from fpakman.util.cache import Cache
from fpakman.util.memory import CacheCleaner
from fpakman.view.qt import dialog
from fpakman.view.qt.systray import TrayIcon
@@ -81,21 +82,20 @@ managers = []
if args.flatpak:
flatpak_api_cache = Cache(expiration_time=args.cache_exp)
cache_map[FlatpakApplication] = flatpak_api_cache
managers.append(FlatpakManager(app_args=args, api_cache=flatpak_api_cache, disk_cache=args.disk_cache, http_session=http_session))
managers.append(FlatpakManager(app_args=args, api_cache=flatpak_api_cache, disk_cache=args.disk_cache, http_session=http_session, locale_keys=locale_keys))
caches.append(flatpak_api_cache)
if args.disk_cache:
Path(FLATPAK_CACHE_PATH).mkdir(parents=True, exist_ok=True)
if args.snap:
pass
# snap_api_cache = Cache(expiration_time=args.cache_exp)
# cache_map[SnapApplication] = snap_api_cache
# managers.append(SnapManager(app_args=args, disk_cache=args.disk_cache, api_cache=snap_api_cache, http_session=http_session))
# managers.append(SnapManager(app_args=args, disk_cache=args.disk_cache, api_cache=snap_api_cache, http_session=http_session, locale_keys=locale_keys))
# caches.append(snap_api_cache)
#
# if args.disk_cache:
# Path(SNAP_CACHE_PATH).mkdir(parents=True, exist_ok=True)
# Path(SNAP_CACHE_PATH).mkdir(parents=True, exist_ok=True)
icon_cache = Cache(expiration_time=args.icon_exp)
caches.append(icon_cache)
@@ -121,4 +121,10 @@ trayIcon.show()
CacheCleaner(caches).start()
warnings = manager.list_warnings()
if warnings:
for warning in warnings:
dialog.show_warning(title=locale_keys['warning'].capitalize(), body=warning)
sys.exit(app.exec_())