Hide view apps using this runtime

Hide the view apps using this runtime button in the properties_window when the current runtime is not a dependant runtime
This commit is contained in:
heliguy
2023-11-29 02:42:47 -05:00
parent 598e142369
commit 39163d124e
3 changed files with 5 additions and 2 deletions

View File

@@ -77,6 +77,7 @@ template PropertiesWindow: Adw.Window {
Adw.ActionRow view_apps {
title: _("Show Apps Using this Runtime");
activatable: true;
visible: false;
[suffix]
Image {

View File

@@ -74,9 +74,10 @@ class PropertiesWindow(Adw.Window):
self.spinner.set_visible(False)
if "runtime" in self.current_flatpak[12]:
# Pak is a runtime
self.runtime.set_visible(False)
else:
self.view_apps.set_visible(False)
if self.app_ref in self.parent_window.dependent_runtimes:
self.view_apps.set_visible(True)
def generateLower(self):
column_headers = [

View File

@@ -280,6 +280,7 @@ class WarehouseWindow(Adw.ApplicationWindow):
def generate_list_of_flatpaks(self):
self.host_flatpaks = self.my_utils.getHostFlatpaks()
self.dependent_runtimes = self.my_utils.getDependentRuntimes()
self.set_title(self.main_window_title)
self.eol_list = []
self.system_mask_list = self.my_utils.getHostMasks("system")