app suggenstions when no app is installed

This commit is contained in:
Vinicius Moreira
2019-08-05 22:06:37 -03:00
parent 193c8bc2bc
commit 3f01ba8c3b
10 changed files with 133 additions and 23 deletions

View File

@@ -47,6 +47,7 @@ parser.add_argument('--flatpak', action="store", default=os.getenv('FPAKMAN_FLAT
parser.add_argument('--snap', action="store", default=os.getenv('FPAKMAN_SNAP', 1), choices=[0, 1], type=int, help='Enables / disables snap usage. Default: %(default)s')
parser.add_argument('-co', '--check-packaging-once', action="store", default=os.getenv('FPAKMAN_CHECK_PACKAGING_ONCE', 0), choices=[0, 1], type=int, help='If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Default: %(default)s')
parser.add_argument('--tray', action="store", default=os.getenv('FPAKMAN_TRAY', 1), choices=[0, 1], type=int, help='If the tray icon and update-check daemon should be created. Default: %(default)s')
parser.add_argument('--sugs', action="store", default=os.getenv('FPAKMAN_SUGGESTIONS', 1), choices=[0, 1], type=int, help='If app suggestions should be displayed if no app is installed (runtimes do not count as apps). Default: %(default)s')
args = parser.parse_args()
if args.cache_exp < 0:
@@ -78,6 +79,9 @@ if args.download_icons == 0:
if args.check_packaging_once == 1:
log_msg("'check-packaging-once' is enabled", Fore.YELLOW)
if args.sugs == 0:
log_msg("suggestions are disabled", Fore.YELLOW)
locale_keys = util.get_locale_keys(args.locale)
http_session = requests.Session()
@@ -122,7 +126,8 @@ manage_window = ManageWindow(locale_keys=locale_keys,
icon_cache=icon_cache,
disk_cache=args.disk_cache,
download_icons=bool(args.download_icons),
screen_size=screen_size)
screen_size=screen_size,
suggestions=args.sugs)
if args.tray:
trayIcon = TrayIcon(locale_keys=locale_keys,