From 9ffa3d6cbab4cc2ec97451aa52d56581fa61847e Mon Sep 17 00:00:00 2001 From: heliguy Date: Sun, 24 Sep 2023 02:59:51 -0400 Subject: [PATCH] Find remote installation type in a better way Make it so that the options in the remote Options column are looped through to find user or system, instead of always assuming is the first option --- src/common.py | 12 ++++++++++-- src/window.blp | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/common.py b/src/common.py index 355e848..7e653b3 100644 --- a/src/common.py +++ b/src/common.py @@ -85,9 +85,17 @@ class myUtils: data.append(row) try: for i in range(len(data)): - data[i][7] = data[i][7].split(",")[0] + data[i][7] = data[i][7].split(",") + for j in range(len(data[i])): + if data[i][7][j] == "user": + data[i][7] = "user" + break + + if data[i][7][j] == "system": + data[i][7] = "system" + break except: - pass + print("error getting remote installation types") return data def getHostFlatpaks(self): diff --git a/src/window.blp b/src/window.blp index 5d6d952..32aa89e 100644 --- a/src/window.blp +++ b/src/window.blp @@ -75,7 +75,7 @@ template WarehouseWindow : Adw.ApplicationWindow { Adw.StatusPage no_flatpaks { icon-name: "error-symbolic"; title: _("No Flatpaks Found"); - description: _("Warehouse cannot see the list of installed Flatpaks or the system has no Flatpaks installed."); + description: _("There are either no Flatpaks that match the current filter, Warehouse cannot see the list of installed Flatpaks, or the system has no Flatpaks installed."); } } };