Add get pins function

This commit is contained in:
heliguy4599
2023-10-05 21:06:40 -04:00
parent 5be071fb2a
commit bfd1af7412
2 changed files with 7 additions and 1 deletions

View File

@@ -77,6 +77,13 @@ class myUtils:
image.set_icon_size(Gtk.IconSize.LARGE)
return image
def getHostPins(self):
output = subprocess.run(["flatpak-spawn", "--host", "flatpak", "pin"], capture_output=True, text=True, env=self.new_env).stdout
data = output.strip().split("\n")
for i in range(len(data)):
data[i] = data[i].strip()
return data
def getHostRemotes(self):
output = subprocess.run(["flatpak-spawn", "--host", "flatpak", "remotes", "--columns=all"], capture_output=True, text=True, env=self.new_env).stdout
lines = output.strip().split("\n")

View File

@@ -548,4 +548,3 @@ class WarehouseWindow(Adw.ApplicationWindow):
self.filter_button.connect("toggled", self.filterWindowHandler)